class SampleProfileWriterCompactBinary

Declaration

class SampleProfileWriterCompactBinary
    : public SampleProfileWriterBinary { /* full declaration omitted */ };

Description

Sample-based profile writer (binary format).

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:376

Inherits from: SampleProfileWriterBinary

Member Variables

protected MapVector<llvm::StringRef, uint64_t> FuncOffsetTable
The table mapping from function name to the offset of its FunctionSample towards profile start.
protected uint64_t TableOffset
The offset of the slot to be filled with the offset of FuncOffsetTable towards profile start.

Inherited from SampleProfileWriterBinary:

protected NameTable

Inherited from SampleProfileWriter:

protected OutputStream
protected Summary
protected Format = SPF_None

Method Overview

  • public std::error_code write(const llvm::sampleprof::SampleProfileMap & ProfileMap)
  • protected std::error_code writeFuncOffsetTable()
  • protected std::error_code writeHeader(const llvm::sampleprof::SampleProfileMap & ProfileMap)
  • protected std::error_code writeNameTable()
  • public std::error_code writeSample(const llvm::sampleprof::FunctionSamples & S)

Inherited from SampleProfileWriterBinary:

Inherited from SampleProfileWriter:

Methods

std::error_code write(
    const llvm::sampleprof::SampleProfileMap&
        ProfileMap)

Description

Write all the sample profiles in the given map of samples.

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:381

Parameters

const llvm::sampleprof::SampleProfileMap& ProfileMap

Returns

status code of the file update operation.

std::error_code writeFuncOffsetTable()

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:392

std::error_code writeHeader(
    const llvm::sampleprof::SampleProfileMap&
        ProfileMap)

Description

Write a file header for the profile file.

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:391

Parameters

const llvm::sampleprof::SampleProfileMap& ProfileMap

std::error_code writeNameTable()

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:390

std::error_code writeSample(
    const llvm::sampleprof::FunctionSamples& S)

Description

Write sample profiles in \p S.

Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:380

Parameters

const llvm::sampleprof::FunctionSamples& S

Returns

status code of the file update operation.