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:

protected Symtab

Method Overview

Inherited from InstrProfReader:

Methods

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

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

Parameters

const RawInstrProfReader<IntPtrT>&

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

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

static bool hasFormat(
    const llvm::MemoryBuffer& DataBuffer)

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

Parameters

const llvm::MemoryBuffer& DataBuffer

bool isIRLevelProfile() const

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

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)

Description

Read a single record.

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

Parameters

llvm::NamedInstrProfRecord& Record