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:267

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 virtual std::error_code write(const StringMap<llvm::sampleprof::FunctionSamples> & ProfileMap)
  • protected std::error_code writeFuncOffsetTable()
  • protected virtual std::error_code writeHeader(const StringMap<llvm::sampleprof::FunctionSamples> & ProfileMap)
  • protected virtual std::error_code writeNameTable()
  • public virtual std::error_code writeSample(const llvm::sampleprof::FunctionSamples & S)

Inherited from SampleProfileWriterBinary:

Inherited from SampleProfileWriter:

Methods

virtual std::error_code write(
    const StringMap<
        llvm::sampleprof::FunctionSamples>&
        ProfileMap)

Description

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

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

Parameters

const StringMap< llvm::sampleprof::FunctionSamples>& ProfileMap

Returns

status code of the file update operation.

std::error_code writeFuncOffsetTable()

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

virtual std::error_code writeHeader(
    const StringMap<
        llvm::sampleprof::FunctionSamples>&
        ProfileMap)

Description

Write a file header for the profile file.

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

Parameters

const StringMap< llvm::sampleprof::FunctionSamples>& ProfileMap

virtual std::error_code writeNameTable()

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

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

Description

Write sample profiles in \p S.

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

Parameters

const llvm::sampleprof::FunctionSamples& S

Returns

status code of the file update operation.