class InstrProfWriter
Declaration
class InstrProfWriter { /* full declaration omitted */ };
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:33
Method Overview
- public InstrProfWriter(bool Sparse = false)
- public void addRecord(llvm::NamedInstrProfRecord && I, uint64_t Weight, function_ref<void (llvm::Error)> Warn)
- public void addRecord(llvm::NamedInstrProfRecord && I, function_ref<void (llvm::Error)> Warn)
- public void mergeRecordsFromWriter(llvm::InstrProfWriter && IPW, function_ref<void (llvm::Error)> Warn)
- public void overlapRecord(llvm::NamedInstrProfRecord && Other, llvm::OverlapStats & Overlap, llvm::OverlapStats & FuncLevelOverlap, const llvm::OverlapFuncFilters & FuncFilter)
- public llvm::Error setIsIRLevelProfile(bool IsIRLevel, bool WithCS)
- public void setOutputSparse(bool Sparse)
- public void setValueProfDataEndianness(support::endianness Endianness)
- public void write(llvm::raw_fd_ostream & OS)
- public std::unique_ptr<MemoryBuffer> writeBuffer()
- public static void writeRecordInText(llvm::StringRef Name, uint64_t Hash, const llvm::InstrProfRecord & Counters, llvm::InstrProfSymtab & Symtab, llvm::raw_fd_ostream & OS)
- public llvm::Error writeText(llvm::raw_fd_ostream & OS)
- public ~InstrProfWriter()
Methods
¶InstrProfWriter(bool Sparse = false)
InstrProfWriter(bool Sparse = false)
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:47
Parameters
- bool Sparse = false
¶void addRecord(
llvm::NamedInstrProfRecord&& I,
uint64_t Weight,
function_ref<void(llvm::Error)> Warn)
void addRecord(
llvm::NamedInstrProfRecord&& I,
uint64_t Weight,
function_ref<void(llvm::Error)> Warn)
Description
Add function counts for the given function. If there are already counts for this function and the hash and number of counts match, each counter is summed. Optionally scale counts by \p Weight.
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:53
Parameters
- llvm::NamedInstrProfRecord&& I
- uint64_t Weight
- function_ref<void(llvm::Error)> Warn
¶void addRecord(
llvm::NamedInstrProfRecord&& I,
function_ref<void(llvm::Error)> Warn)
void addRecord(
llvm::NamedInstrProfRecord&& I,
function_ref<void(llvm::Error)> Warn)
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:55
Parameters
- llvm::NamedInstrProfRecord&& I
- function_ref<void(llvm::Error)> Warn
¶void mergeRecordsFromWriter(
llvm::InstrProfWriter&& IPW,
function_ref<void(llvm::Error)> Warn)
void mergeRecordsFromWriter(
llvm::InstrProfWriter&& IPW,
function_ref<void(llvm::Error)> Warn)
Description
Merge existing function counts from the given writer.
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:60
Parameters
- llvm::InstrProfWriter&& IPW
- function_ref<void(llvm::Error)> Warn
¶void overlapRecord(
llvm::NamedInstrProfRecord&& Other,
llvm::OverlapStats& Overlap,
llvm::OverlapStats& FuncLevelOverlap,
const llvm::OverlapFuncFilters& FuncFilter)
void overlapRecord(
llvm::NamedInstrProfRecord&& Other,
llvm::OverlapStats& Overlap,
llvm::OverlapStats& FuncLevelOverlap,
const llvm::OverlapFuncFilters& FuncFilter)
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:105
Parameters
- llvm::NamedInstrProfRecord&& Other
- llvm::OverlapStats& Overlap
- llvm::OverlapStats& FuncLevelOverlap
- const llvm::OverlapFuncFilters& FuncFilter
¶llvm::Error setIsIRLevelProfile(bool IsIRLevel,
bool WithCS)
llvm::Error setIsIRLevelProfile(bool IsIRLevel,
bool WithCS)
Description
Set the ProfileKind. Report error if mixing FE and IR level profiles.\c WithCS indicates if this is for contenxt sensitive instrumentation.
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:79
Parameters
- bool IsIRLevel
- bool WithCS
¶void setOutputSparse(bool Sparse)
void setOutputSparse(bool Sparse)
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:102
Parameters
- bool Sparse
¶void setValueProfDataEndianness(
support::endianness Endianness)
void setValueProfDataEndianness(
support::endianness Endianness)
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:101
Parameters
- support::endianness Endianness
¶void write(llvm::raw_fd_ostream& OS)
void write(llvm::raw_fd_ostream& OS)
Description
Write the profile to \c OS
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:64
Parameters
¶std::unique_ptr<MemoryBuffer> writeBuffer()
std::unique_ptr<MemoryBuffer> writeBuffer()
Description
Write the profile, returning the raw data. For testing.
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:75
¶static void writeRecordInText(
llvm::StringRef Name,
uint64_t Hash,
const llvm::InstrProfRecord& Counters,
llvm::InstrProfSymtab& Symtab,
llvm::raw_fd_ostream& OS)
static void writeRecordInText(
llvm::StringRef Name,
uint64_t Hash,
const llvm::InstrProfRecord& Counters,
llvm::InstrProfSymtab& Symtab,
llvm::raw_fd_ostream& OS)
Description
Write \c Record in text format to \c OS
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:70
Parameters
- llvm::StringRef Name
- uint64_t Hash
- const llvm::InstrProfRecord& Counters
- llvm::InstrProfSymtab& Symtab
- llvm::raw_fd_ostream& OS
¶llvm::Error writeText(llvm::raw_fd_ostream& OS)
llvm::Error writeText(llvm::raw_fd_ostream& OS)
Description
Write the profile in text format to \c OS
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:67
Parameters
¶~InstrProfWriter()
~InstrProfWriter()
Declared at: llvm/include/llvm/ProfileData/InstrProfWriter.h:48