class TextInstrProfReader
Declaration
class TextInstrProfReader : public InstrProfReader { /* full declaration omitted */ };
Description
Reader for the simple text based instrprof format. This format is a simple text format that's suitable for test data. Records are separated by one or more blank lines, and record fields are separated by new lines. Each record consists of a function name, a function hash, a number of counters, and then each counter value, in that order.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:143
Inherits from: InstrProfReader
Member Variables
Inherited from InstrProfReader:
Method Overview
- public TextInstrProfReader(std::unique_ptr<MemoryBuffer> DataBuffer_)
- public TextInstrProfReader(const llvm::TextInstrProfReader &)
- public llvm::InstrProfSymtab & getSymtab()
- public bool hasCSIRLevelProfile() const
- public static bool hasFormat(const llvm::MemoryBuffer & Buffer)
- 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
¶TextInstrProfReader(
std::unique_ptr<MemoryBuffer> DataBuffer_)
TextInstrProfReader(
std::unique_ptr<MemoryBuffer> DataBuffer_)
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:155
Parameters
- std::unique_ptr<MemoryBuffer> DataBuffer_
¶TextInstrProfReader(
const llvm::TextInstrProfReader&)
TextInstrProfReader(
const llvm::TextInstrProfReader&)
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:157
Parameters
- const llvm::TextInstrProfReader&
¶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:173
¶bool hasCSIRLevelProfile() const
bool hasCSIRLevelProfile() const
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:165
¶static bool hasFormat(
const llvm::MemoryBuffer& Buffer)
static bool hasFormat(
const llvm::MemoryBuffer& Buffer)
Description
Return true if the given buffer is in text instrprof format.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:161
Parameters
- const llvm::MemoryBuffer& Buffer
¶bool isIRLevelProfile() const
bool isIRLevelProfile() const
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:163
¶llvm::Error readHeader()
llvm::Error readHeader()
Description
Read the header.
Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:168
¶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:171
Parameters
- llvm::NamedInstrProfRecord& Record