Reader for the simple text based instrprof format.

Synopsis

Declared in <llvm/ProfileData/InstrProfReader.h>

class TextInstrProfReader
    : public InstrProfReader

Description

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.

Base Classes

Name

Description

InstrProfReader

Base class and interface for reading profiling data of any known instrprof format. Provides an iterator over NamedInstrProfRecords.

Member Functions

Name

Description

TextInstrProfReader [constructor]

Constructors

operator= [deleted]

Deleted copy assignment.

accumulateCounts

Compute the sum of counts and return in Sum.

begin

Iterator over profile data.

end

Return an end iterator for the profile data.

functionEntryOnly [virtual]

Return true if the profile only instruments function entries.

getError

Get the current error.

getProfileKind [virtual]

Returns a BitsetEnum describing the attributes of the profile.

getSymtab [virtual]

Return the PGO symbol table.

getTemporalProfTraceStreamSize

Return the total number of temporal profile traces seen.

getTemporalProfTraces [virtual]

Return the temporal profile traces.

getVersion [virtual]

Return the profile version (always 0 for the text format).

hasCSIRLevelProfile [virtual]

Return true if this is a context‐sensitive IR‐level profile.

hasError

Return true if the reader encountered an error reading profiling data.

hasMemoryProfile [virtual]

Return true if profile includes a memory profile.

hasSingleByteCoverage [virtual]

Return true if the profile has single byte counters representing coverage.

hasTemporalProfile [virtual]

Return true if this has a temporal profile.

instrEntryBBEnabled [virtual]

Return true if the profile instruments function entries.

instrLoopEntriesEnabled [virtual]

Return true if the profile instruments all loop entries.

isEOF

Return true if the reader has finished reading the profile data.

isIRLevelProfile [virtual]

Return true if this is an IR‐level instrumentation profile.

printBinaryIds [virtual]

Print binary ids.

readBinaryIds [virtual]

Read a list of binary ids.

readHeader [virtual]

Read the header.

readNextRecord [virtual]

Read a single record.

Static Member Functions

Name

Description

create

create overloads

hasFormat

Return true if the given buffer is in text instrprof format.

Protected Member Functions

Name

Description

error

error overloads

success

Clear the current error and return a successful one.

Protected Data Members

Name

Description

Symtab

Optional PGO symbol table owned by the reader.

TemporalProfTraceStreamSize

The total number of temporal profile traces seen.

TemporalProfTraces

A list of temporal profile traces.

Created with MrDocs