|
LLVM 23.0.0git
|
Classes | |
| struct | BaseConfigTy |
Boolean option bitset with a compile-time number of bits to store as many options as the enumeration type EnumTy defines. More... | |
| struct | BaseConfigurationOption |
| An option for the base configuration. More... | |
| struct | InstructionIO |
| The base instrumentation opportunity class for instruction opportunities. More... | |
| struct | InstrumentationCaches |
| Helper that represent the caches for instrumentation call arguments. More... | |
| struct | InstrumentationConfig |
| The class that contains the configuration for the instrumentor. More... | |
| struct | InstrumentationLocation |
| Helper to represent an instrumentation location, which is composed of an instrumentation opportunity type and a position. More... | |
| struct | InstrumentationOpportunity |
| Base class for instrumentation opportunities. More... | |
| struct | InstrumentorIRBuilderTy |
| An IR builder augmented with extra information for the instrumentor pass. More... | |
| struct | IRTArg |
| } More... | |
| struct | IRTCallDescription |
| Helper to represent an instrumentation runtime function that is related to an instrumentation opportunity. More... | |
| struct | LoadIO |
| The instrumentation opportunity for load instructions. More... | |
| struct | StoreIO |
| The instrumentation opportunity for store instructions. More... | |
Typedefs | |
| using | GetterCallbackTy |
| Callback type for getting/setting a value for a instrumented opportunity. | |
| using | SetterCallbackTy |
Functions | |
| void | writeConfigToJSON (InstrumentationConfig &IConf, StringRef OutputFile, LLVMContext &Ctx) |
Write the configuration in /p IConf to the file with path OutputFile. | |
| bool | readConfigFromJSON (InstrumentationConfig &IConf, StringRef InputFile, LLVMContext &Ctx) |
Read the configuration from the file with path InputFile into /p IConf. | |
| void | printRuntimeStub (const InstrumentationConfig &IConf, StringRef StubRuntimeName, LLVMContext &Ctx) |
| Print a runtime stub file with the implementation of the instrumentation runtime functions corresponding to the instrumentation opportunities enabled. | |
| static std::pair< std::string, std::string > | getAsCType (Type *Ty, unsigned Flags) |
Get the string representation of an argument with type Ty. | |
| static std::string | getPrintfFormatString (Type *Ty, unsigned Flags) |
Get the string representation of the C printf format of an argument with type Ty. | |
Callback type for getting/setting a value for a instrumented opportunity.
{
Definition at line 49 of file Instrumentor.h.
Definition at line 51 of file Instrumentor.h.
|
static |
Get the string representation of an argument with type Ty.
Two strings are returned: one for direct arguments and another for indirect arguments. The flags in Flags describe the properties of the argument. See IRTArg::IRArgFlagTy.
Definition at line 32 of file InstrumentorStubPrinter.cpp.
References llvm::instrumentor::IRTArg::STRING.
Referenced by llvm::instrumentor::IRTCallDescription::createCSignature().
Get the string representation of the C printf format of an argument with type Ty.
The flags in Flags describe the properties of the argument. See IRTArg::IRArgFlagTy.
Definition at line 53 of file InstrumentorStubPrinter.cpp.
References assert(), and llvm::instrumentor::IRTArg::STRING.
Referenced by llvm::instrumentor::IRTCallDescription::createCBodies().
| void llvm::instrumentor::printRuntimeStub | ( | const InstrumentationConfig & | IConf, |
| StringRef | StubRuntimeName, | ||
| LLVMContext & | Ctx ) |
Print a runtime stub file with the implementation of the instrumentation runtime functions corresponding to the instrumentation opportunities enabled.
Definition at line 174 of file InstrumentorStubPrinter.cpp.
References _, llvm::instrumentor::IRTCallDescription::createCBodies(), llvm::instrumentor::IRTCallDescription::createCSignature(), llvm::StringRef::empty(), and llvm::instrumentor::InstrumentationConfig::IChoices.
| bool llvm::instrumentor::readConfigFromJSON | ( | InstrumentationConfig & | IConf, |
| StringRef | InputFile, | ||
| LLVMContext & | Ctx ) |
Read the configuration from the file with path InputFile into /p IConf.
Definition at line 98 of file InstrumentorConfigFile.cpp.
References llvm::instrumentor::InstrumentationConfig::BaseConfigurationOptions, llvm::instrumentor::BaseConfigurationOption::BOOLEAN, llvm::SmallPtrSetImpl< PtrType >::count(), llvm::DS_Warning, llvm::StringRef::empty(), llvm::StringRef::ends_with(), llvm::instrumentor::IRTArg::Flags, llvm::MemoryBuffer::getFileOrSTDIN(), llvm::instrumentor::InstrumentationLocation::getKindFromStr(), llvm::instrumentor::InstrumentationConfig::IChoices, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::StringMap< ValueTy, AllocatorTy >::lookup(), llvm::json::parse(), ReplaceMap, llvm::StringSaver::save(), llvm::instrumentor::InstrumentationConfig::SS, llvm::Twine::str(), llvm::instrumentor::BaseConfigurationOption::STRING, and llvm::toString().
| void llvm::instrumentor::writeConfigToJSON | ( | InstrumentationConfig & | IConf, |
| StringRef | OutputFile, | ||
| LLVMContext & | Ctx ) |
Write the configuration in /p IConf to the file with path OutputFile.
Definition at line 29 of file InstrumentorConfigFile.cpp.
References llvm::json::OStream::attribute(), llvm::json::OStream::attributeBegin(), llvm::json::OStream::attributeEnd(), llvm::instrumentor::InstrumentationConfig::BaseConfigurationOptions, llvm::instrumentor::BaseConfigurationOption::BOOLEAN, llvm::DS_Warning, llvm::StringRef::empty(), llvm::instrumentor::InstrumentationLocation::getKindStr(), llvm::instrumentor::InstrumentationConfig::IChoices, llvm::instrumentor::InstrumentationLocation::Last, llvm::json::OStream::objectBegin(), llvm::json::OStream::objectEnd(), llvm::instrumentor::IRTArg::REPLACABLE, llvm::instrumentor::IRTArg::REPLACABLE_CUSTOM, and llvm::instrumentor::BaseConfigurationOption::STRING.