class RawInstrProfReader
Declaration
template <class IntPtrT>
class RawInstrProfReader : public InstrProfReader { /* full declaration omitted */ };
Description
Reader for the raw instrprof binary format from runtime. This format is a raw memory dump of the instrumentation-baed profiling data from the runtime. It has no index. Templated on the unsigned type whose size matches pointers on the platform that wrote the profile.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:187
Inherits from: InstrProfReader
Templates
- IntPtrT
Member Variables
Inherited from InstrProfReader:
Method Overview
- public RawInstrProfReader<IntPtrT>(std::unique_ptr<MemoryBuffer> DataBuffer)
- public RawInstrProfReader<IntPtrT>(const RawInstrProfReader<IntPtrT> &)
- public llvm::InstrProfSymtab & getSymtab()
- public bool hasCSIRLevelProfile() const
- public static bool hasFormat(const llvm::MemoryBuffer & DataBuffer)
- public bool isIRLevelProfile() const
- public llvm::Error readHeader()
- public llvm::Error readNextRecord(llvm::NamedInstrProfRecord & Record)
Inherited from InstrProfReader:
- public accumulateCounts
- public begin
- public create
- public create
- public end
- protected error
- protected error
- public getError
- public getSymtab
- public hasCSIRLevelProfile
- public hasError
- public isEOF
- public isIRLevelProfile
- public readHeader
- public readNextRecord
- protected success
Methods
¶RawInstrProfReader<IntPtrT>(
std::unique_ptr<MemoryBuffer> DataBuffer)
RawInstrProfReader<IntPtrT>(
std::unique_ptr<MemoryBuffer> DataBuffer)
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:210
Parameters
- std::unique_ptr<MemoryBuffer> DataBuffer
¶RawInstrProfReader<IntPtrT>(
const RawInstrProfReader<IntPtrT>&)
RawInstrProfReader<IntPtrT>(
const RawInstrProfReader<IntPtrT>&)
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:212
Parameters
- const RawInstrProfReader<IntPtrT>&
¶llvm::InstrProfSymtab& getSymtab()
llvm::InstrProfSymtab& getSymtab()
Description
Return the PGO symtab. There are three different readers: Raw, Text, and Indexed profile readers. The first two types of readers are used only by llvm-profdata tool, while the indexed profile reader is also used by llvm-cov tool and the compiler ( backend or frontend). Since creating PGO symtab can create significant runtime and memory overhead (as it touches data for the whole program), InstrProfSymtab for the indexed profile reader should be created on demand and it is recommended to be only used for dumping purpose with llvm-proftool, not with the compiler.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:227
¶bool hasCSIRLevelProfile() const
bool hasCSIRLevelProfile() const
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:223
¶static bool hasFormat(
const llvm::MemoryBuffer& DataBuffer)
static bool hasFormat(
const llvm::MemoryBuffer& DataBuffer)
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:215
Parameters
- const llvm::MemoryBuffer& DataBuffer
¶bool isIRLevelProfile() const
bool isIRLevelProfile() const
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:219
¶llvm::Error readHeader()
llvm::Error readHeader()
Description
Read the header. Required before reading first record.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:216
¶llvm::Error readNextRecord(
llvm::NamedInstrProfRecord& Record)
llvm::Error readNextRecord(
llvm::NamedInstrProfRecord& Record)
Description
Read a single record.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:217
Parameters
- llvm::NamedInstrProfRecord& Record