LLVM 18.0.0git
|
InstrProfCorrelator - A base class used to create raw instrumentation data to their functions. More...
#include "llvm/ProfileData/InstrProfCorrelator.h"
Classes | |
struct | Context |
struct | CorrelationData |
struct | Probe |
Public Types | |
enum | InstrProfCorrelatorKind { CK_32Bit , CK_64Bit } |
Public Member Functions | |
virtual Error | correlateProfileData (int MaxWarnings)=0 |
Construct a ProfileData vector used to correlate raw instrumentation data to their functions. | |
virtual Error | correlateCovUnusedFuncNames (int MaxWarnings)=0 |
virtual Error | dumpYaml (int MaxWarnings, raw_ostream &OS)=0 |
Process debug info and dump the correlation data. | |
std::optional< size_t > | getDataSize () const |
Return the number of ProfileData elements. | |
const char * | getNamesPointer () const |
Return a pointer to the names string that this class constructs. | |
size_t | getNamesSize () const |
Return the number of bytes in the names string. | |
const char * | getCovUnusedFuncNamesPointer () const |
size_t | getCovUnusedFuncNamesSize () const |
uint64_t | getCountersSectionSize () const |
Return the size of the counters section in bytes. | |
InstrProfCorrelatorKind | getKind () const |
virtual | ~InstrProfCorrelator ()=default |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< InstrProfCorrelator > > | get (StringRef DebugInfoFilename) |
Static Public Attributes | |
static const char * | FunctionNameAttributeName = "Function Name" |
static const char * | CFGHashAttributeName = "CFG Hash" |
static const char * | NumCountersAttributeName = "Num Counters" |
static const char * | CovFunctionNameAttributeName |
Protected Member Functions | |
InstrProfCorrelator (InstrProfCorrelatorKind K, std::unique_ptr< Context > Ctx) | |
Protected Attributes | |
const std::unique_ptr< Context > | Ctx |
std::string | Names |
std::vector< std::string > | NamesVec |
std::string | CovUnusedFuncNames |
Friends | |
struct | yaml::MappingTraits< Probe > |
struct | yaml::SequenceElementTraits< Probe > |
struct | yaml::MappingTraits< CorrelationData > |
InstrProfCorrelator - A base class used to create raw instrumentation data to their functions.
Definition at line 32 of file InstrProfCorrelator.h.
Enumerator | |
---|---|
CK_32Bit | |
CK_64Bit |
Definition at line 73 of file InstrProfCorrelator.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 90 of file InstrProfCorrelator.h.
|
pure virtual |
|
pure virtual |
Construct a ProfileData vector used to correlate raw instrumentation data to their functions.
MaxWarnings | the maximum number of warnings to emit (0 = no limit) |
Implemented in llvm::InstrProfCorrelatorImpl< IntPtrT >.
|
pure virtual |
Process debug info and dump the correlation data.
MaxWarnings | the maximum number of warnings to emit (0 = no limit) |
Implemented in llvm::InstrProfCorrelatorImpl< IntPtrT >.
|
static |
Definition at line 59 of file InstrProfCorrelator.cpp.
References llvm::StringRef::begin(), llvm::errorOrToExpected(), llvm::object::MachOObjectFile::findDsymObjectMembers(), get(), llvm::MemoryBuffer::getFile(), and llvm::unable_to_correlate_profile.
Referenced by get(), and getProfileNamesFromDebugInfo().
|
inline |
Return the size of the counters section in bytes.
Definition at line 64 of file InstrProfCorrelator.h.
References Ctx.
Definition at line 57 of file InstrProfCorrelator.h.
References CovUnusedFuncNames.
|
inline |
Definition at line 61 of file InstrProfCorrelator.h.
References CovUnusedFuncNames.
std::optional< size_t > InstrProfCorrelator::getDataSize | ( | ) | const |
Return the number of ProfileData elements.
Definition at line 101 of file InstrProfCorrelator.cpp.
References llvm::CallingConv::C, and llvm::dyn_cast().
|
inline |
Definition at line 74 of file InstrProfCorrelator.h.
Return a pointer to the names string that this class constructs.
Definition at line 52 of file InstrProfCorrelator.h.
References Names.
|
inline |
Return the number of bytes in the names string.
Definition at line 55 of file InstrProfCorrelator.h.
References Names.
|
friend |
Definition at line 95 of file InstrProfCorrelator.h.
|
friend |
Definition at line 95 of file InstrProfCorrelator.h.
|
friend |
Definition at line 95 of file InstrProfCorrelator.h.
Definition at line 69 of file InstrProfCorrelator.h.
Definition at line 71 of file InstrProfCorrelator.h.
|
protected |
Definition at line 95 of file InstrProfCorrelator.h.
Referenced by getCovUnusedFuncNamesPointer(), and getCovUnusedFuncNamesSize().
Definition at line 88 of file InstrProfCorrelator.h.
Referenced by getCountersSectionSize().
Definition at line 68 of file InstrProfCorrelator.h.
|
protected |
Definition at line 93 of file InstrProfCorrelator.h.
Referenced by getNamesPointer(), and getNamesSize().
|
protected |
Definition at line 94 of file InstrProfCorrelator.h.
Definition at line 70 of file InstrProfCorrelator.h.