LLVM  15.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::InstrProfCorrelatorImpl< IntPtrT > Class Template Referenceabstract

InstrProfCorrelatorImpl - A child of InstrProfCorrelator with a template pointer type so that the ProfileData vector can be materialized. More...

#include "llvm/ProfileData/InstrProfCorrelator.h"

Inheritance diagram for llvm::InstrProfCorrelatorImpl< IntPtrT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::InstrProfCorrelatorImpl< IntPtrT >:
Collaboration graph
[legend]

Public Member Functions

 InstrProfCorrelatorImpl (std::unique_ptr< InstrProfCorrelator::Context > Ctx)
 
const RawInstrProf::ProfileData< IntPtrT > * getDataPointer () const
 Return a pointer to the underlying ProfileData vector that this class constructs. More...
 
size_t getDataSize () const
 Return the number of ProfileData elements. More...
 
 InstrProfCorrelatorImpl (std::unique_ptr< InstrProfCorrelator::Context > Ctx)
 
 InstrProfCorrelatorImpl (std::unique_ptr< InstrProfCorrelator::Context > Ctx)
 
bool classof (const InstrProfCorrelator *C)
 
bool classof (const InstrProfCorrelator *C)
 
- Public Member Functions inherited from llvm::InstrProfCorrelator
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 bool classof (const InstrProfCorrelator *C)
 
static llvm::Expected< std::unique_ptr< InstrProfCorrelatorImpl< IntPtrT > > > get (std::unique_ptr< InstrProfCorrelator::Context > Ctx, const object::ObjectFile &Obj)
 
- Static Public Member Functions inherited from llvm::InstrProfCorrelator
static llvm::Expected< std::unique_ptr< InstrProfCorrelator > > get (StringRef DebugInfoFilename)
 

Protected Member Functions

Error correlateProfileData () override
 Construct a ProfileData vector used to correlate raw instrumentation data to their functions. More...
 
virtual void correlateProfileDataImpl ()=0
 
void addProbe (StringRef FunctionName, uint64_t CFGHash, IntPtrT CounterOffset, IntPtrT FunctionPtr, uint32_t NumCounters)
 
- Protected Member Functions inherited from llvm::InstrProfCorrelator
 InstrProfCorrelator (InstrProfCorrelatorKind K, std::unique_ptr< Context > Ctx)
 

Protected Attributes

std::vector< RawInstrProf::ProfileData< IntPtrT > > Data
 
- Protected Attributes inherited from llvm::InstrProfCorrelator
const std::unique_ptr< InstrProfCorrelator::ContextCtx
 
std::string Names
 
std::vector< std::string > NamesVec
 

Additional Inherited Members

- Public Types inherited from llvm::InstrProfCorrelator
enum  InstrProfCorrelatorKind { CK_32Bit, CK_64Bit }
 
- Static Public Attributes inherited from llvm::InstrProfCorrelator
static const char * FunctionNameAttributeName = "Function Name"
 
static const char * CFGHashAttributeName = "CFG Hash"
 
static const char * NumCountersAttributeName = "Num Counters"
 

Detailed Description

template<class IntPtrT>
class llvm::InstrProfCorrelatorImpl< IntPtrT >

InstrProfCorrelatorImpl - A child of InstrProfCorrelator with a template pointer type so that the ProfileData vector can be materialized.

Definition at line 90 of file InstrProfCorrelator.h.

Constructor & Destructor Documentation

◆ InstrProfCorrelatorImpl() [1/3]

template<class IntPtrT >
llvm::InstrProfCorrelatorImpl< IntPtrT >::InstrProfCorrelatorImpl ( std::unique_ptr< InstrProfCorrelator::Context Ctx)

◆ InstrProfCorrelatorImpl() [2/3]

Definition at line 108 of file InstrProfCorrelator.cpp.

◆ InstrProfCorrelatorImpl() [3/3]

Definition at line 113 of file InstrProfCorrelator.cpp.

Member Function Documentation

◆ addProbe()

template<class IntPtrT >
void InstrProfCorrelatorImpl::addProbe ( StringRef  FunctionName,
uint64_t  CFGHash,
IntPtrT  CounterOffset,
IntPtrT  FunctionPtr,
uint32_t  NumCounters 
)
protected

◆ classof() [1/3]

template<class IntPtrT >
static bool llvm::InstrProfCorrelatorImpl< IntPtrT >::classof ( const InstrProfCorrelator C)
static

◆ classof() [2/3]

Definition at line 118 of file InstrProfCorrelator.cpp.

◆ classof() [3/3]

Definition at line 122 of file InstrProfCorrelator.cpp.

◆ correlateProfileData()

template<class IntPtrT >
Error InstrProfCorrelatorImpl::correlateProfileData ( )
overrideprotectedvirtual

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

Implements llvm::InstrProfCorrelator.

Definition at line 144 of file InstrProfCorrelator.cpp.

References assert(), llvm::collectPGOFuncNameStrings(), and llvm::Data.

◆ correlateProfileDataImpl()

template<class IntPtrT >
virtual void llvm::InstrProfCorrelatorImpl< IntPtrT >::correlateProfileDataImpl ( )
protectedpure virtual

◆ get()

template<class IntPtrT >
llvm::Expected< std::unique_ptr< InstrProfCorrelatorImpl< IntPtrT > > > InstrProfCorrelatorImpl::get ( std::unique_ptr< InstrProfCorrelator::Context Ctx,
const object::ObjectFile Obj 
)
static

◆ getDataPointer()

template<class IntPtrT >
const RawInstrProf::ProfileData<IntPtrT>* llvm::InstrProfCorrelatorImpl< IntPtrT >::getDataPointer ( ) const
inline

Return a pointer to the underlying ProfileData vector that this class constructs.

Definition at line 97 of file InstrProfCorrelator.h.

References llvm::InstrProfCorrelatorImpl< IntPtrT >::Data.

◆ getDataSize()

template<class IntPtrT >
size_t llvm::InstrProfCorrelatorImpl< IntPtrT >::getDataSize ( ) const
inline

Return the number of ProfileData elements.

Definition at line 102 of file InstrProfCorrelator.h.

References llvm::InstrProfCorrelatorImpl< IntPtrT >::Data.

Member Data Documentation

◆ Data

template<class IntPtrT >
std::vector<RawInstrProf::ProfileData<IntPtrT> > llvm::InstrProfCorrelatorImpl< IntPtrT >::Data
protected

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