LLVM  16.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::InstrProfCorrelator Class Referenceabstract

InstrProfCorrelator - A base class used to create raw instrumentation data to their functions. More...

#include "llvm/ProfileData/InstrProfCorrelator.h"

Inheritance diagram for llvm::InstrProfCorrelator:
Inheritance graph
[legend]
Collaboration diagram for llvm::InstrProfCorrelator:
Collaboration graph
[legend]

Classes

struct  Context
 
struct  CorrelationData
 
struct  Probe
 

Public Types

enum  InstrProfCorrelatorKind { CK_32Bit, CK_64Bit }
 

Public Member Functions

virtual Error correlateProfileData ()=0
 Construct a ProfileData vector used to correlate raw instrumentation data to their functions. More...
 
virtual Error dumpYaml (raw_ostream &OS)=0
 Process debug info and dump the correlation data. More...
 
llvm::Optional< size_t > getDataSize () const
 Return the number of ProfileData elements. More...
 
const char * getNamesPointer () const
 Return a pointer to the names string that this class constructs. More...
 
size_t getNamesSize () const
 Return the number of bytes in the names string. More...
 
uint64_t getCountersSectionSize () const
 Return the size of the counters section in bytes. More...
 
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"
 

Protected Member Functions

 InstrProfCorrelator (InstrProfCorrelatorKind K, std::unique_ptr< Context > Ctx)
 

Protected Attributes

const std::unique_ptr< ContextCtx
 
std::string Names
 
std::vector< std::string > NamesVec
 

Friends

struct yaml::MappingTraits< Probe >
 
struct yaml::SequenceElementTraits< Probe >
 
struct yaml::MappingTraits< CorrelationData >
 

Detailed Description

InstrProfCorrelator - A base class used to create raw instrumentation data to their functions.

Definition at line 31 of file InstrProfCorrelator.h.

Member Enumeration Documentation

◆ InstrProfCorrelatorKind

Enumerator
CK_32Bit 
CK_64Bit 

Definition at line 61 of file InstrProfCorrelator.h.

Constructor & Destructor Documentation

◆ ~InstrProfCorrelator()

virtual llvm::InstrProfCorrelator::~InstrProfCorrelator ( )
virtualdefault

◆ InstrProfCorrelator()

llvm::InstrProfCorrelator::InstrProfCorrelator ( InstrProfCorrelatorKind  K,
std::unique_ptr< Context Ctx 
)
inlineprotected

Definition at line 78 of file InstrProfCorrelator.h.

Member Function Documentation

◆ correlateProfileData()

virtual Error llvm::InstrProfCorrelator::correlateProfileData ( )
pure virtual

Construct a ProfileData vector used to correlate raw instrumentation data to their functions.

Implemented in llvm::InstrProfCorrelatorImpl< IntPtrT >.

◆ dumpYaml()

virtual Error llvm::InstrProfCorrelator::dumpYaml ( raw_ostream OS)
pure virtual

Process debug info and dump the correlation data.

Implemented in llvm::InstrProfCorrelatorImpl< IntPtrT >.

◆ get()

llvm::Expected< std::unique_ptr< InstrProfCorrelator > > InstrProfCorrelator::get ( StringRef  DebugInfoFilename)
static

◆ getCountersSectionSize()

uint64_t llvm::InstrProfCorrelator::getCountersSectionSize ( ) const
inline

Return the size of the counters section in bytes.

Definition at line 53 of file InstrProfCorrelator.h.

References Ctx.

◆ getDataSize()

Optional< size_t > InstrProfCorrelator::getDataSize ( ) const

Return the number of ProfileData elements.

Definition at line 96 of file InstrProfCorrelator.cpp.

References llvm::dyn_cast().

◆ getKind()

InstrProfCorrelatorKind llvm::InstrProfCorrelator::getKind ( ) const
inline

Definition at line 62 of file InstrProfCorrelator.h.

◆ getNamesPointer()

const char* llvm::InstrProfCorrelator::getNamesPointer ( ) const
inline

Return a pointer to the names string that this class constructs.

Definition at line 47 of file InstrProfCorrelator.h.

References Names.

◆ getNamesSize()

size_t llvm::InstrProfCorrelator::getNamesSize ( ) const
inline

Return the number of bytes in the names string.

Definition at line 50 of file InstrProfCorrelator.h.

References Names.

Friends And Related Function Documentation

◆ yaml::MappingTraits< CorrelationData >

friend struct yaml::MappingTraits< CorrelationData >
friend

Definition at line 100 of file InstrProfCorrelator.h.

◆ yaml::MappingTraits< Probe >

friend struct yaml::MappingTraits< Probe >
friend

Definition at line 98 of file InstrProfCorrelator.h.

◆ yaml::SequenceElementTraits< Probe >

friend struct yaml::SequenceElementTraits< Probe >
friend

Definition at line 99 of file InstrProfCorrelator.h.

Member Data Documentation

◆ CFGHashAttributeName

const char * InstrProfCorrelator::CFGHashAttributeName = "CFG Hash"
static

Definition at line 58 of file InstrProfCorrelator.h.

◆ Ctx

const std::unique_ptr<Context> llvm::InstrProfCorrelator::Ctx
protected

Definition at line 76 of file InstrProfCorrelator.h.

Referenced by getCountersSectionSize().

◆ FunctionNameAttributeName

const char * InstrProfCorrelator::FunctionNameAttributeName = "Function Name"
static

Definition at line 57 of file InstrProfCorrelator.h.

◆ Names

std::string llvm::InstrProfCorrelator::Names
protected

Definition at line 81 of file InstrProfCorrelator.h.

Referenced by getNamesPointer(), and getNamesSize().

◆ NamesVec

std::vector<std::string> llvm::InstrProfCorrelator::NamesVec
protected

Definition at line 82 of file InstrProfCorrelator.h.

◆ NumCountersAttributeName

const char * InstrProfCorrelator::NumCountersAttributeName = "Num Counters"
static

Definition at line 59 of file InstrProfCorrelator.h.


The documentation for this class was generated from the following files: