#include "bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h"
#include "bolt/Core/BinaryFunction.h"
#include "bolt/Core/JumpTable.h"
#include "bolt/Core/Linker.h"
#include "bolt/Utils/CommandLineOpts.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/CommandLine.h"
usingnamespacellvm;
usingnamespacebolt;
namespace opts {
cl::opt<std::string> RuntimeInstrumentationLib(
"runtime-instrumentation-lib",
cl::desc("specify path of the runtime instrumentation library"),
cl::init("libbolt_rt_instr.a"), cl::cat(BoltOptCategory));
extern cl::opt<bool> InstrumentationFileAppendPID;
extern cl::opt<bool> ConservativeInstrumentation;
extern cl::opt<std::string> InstrumentationFilename;
extern cl::opt<std::string> InstrumentationBinpath;
extern cl::opt<uint32_t> InstrumentationSleepTime;
extern cl::opt<bool> InstrumentationNoCountersClear;
extern cl::opt<bool> InstrumentationWaitForks;
extern cl::opt<JumpTableSupportLevel> JumpTables;
}
void InstrumentationRuntimeLibrary::adjustCommandLineOptions(
const BinaryContext &BC) const { … }
void InstrumentationRuntimeLibrary::emitBinary(BinaryContext &BC,
MCStreamer &Streamer) { … }
void InstrumentationRuntimeLibrary::link(
BinaryContext &BC, StringRef ToolPath, BOLTLinker &Linker,
BOLTLinker::SectionsMapper MapSections) { … }
std::string InstrumentationRuntimeLibrary::buildTables(BinaryContext &BC) { … }
void InstrumentationRuntimeLibrary::emitTablesAsELFNote(BinaryContext &BC) { … }