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:

protected Symtab

Method Overview

Inherited from InstrProfReader:

Methods

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&)

Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:157

Parameters

const llvm::TextInstrProfReader&

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

Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:165

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

Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:163

llvm::Error readHeader()

Description

Read the header.

Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:168

llvm::Error readNextRecord(
    llvm::NamedInstrProfRecord& Record)

Description

Read a single record.

Declared at: llvm/include/llvm/ProfileData/InstrProfReader.h:171

Parameters

llvm::NamedInstrProfRecord& Record