LLVM API Documentation
Writer for instrumentation based profile data. More...
#include <InstrProfWriter.h>
Public Types | |
typedef SmallDenseMap < uint64_t, std::vector < uint64_t >, 1 > | CounterData |
Public Member Functions | |
InstrProfWriter () | |
std::error_code | addFunctionCounts (StringRef FunctionName, uint64_t FunctionHash, ArrayRef< uint64_t > Counters) |
void | write (raw_fd_ostream &OS) |
Ensure that all data is written to disk. |
Writer for instrumentation based profile data.
Definition at line 30 of file InstrProfWriter.h.
typedef SmallDenseMap<uint64_t, std::vector<uint64_t>, 1> llvm::InstrProfWriter::CounterData |
Definition at line 32 of file InstrProfWriter.h.
llvm::InstrProfWriter::InstrProfWriter | ( | ) | [inline] |
Definition at line 37 of file InstrProfWriter.h.
std::error_code InstrProfWriter::addFunctionCounts | ( | StringRef | FunctionName, |
uint64_t | FunctionHash, | ||
ArrayRef< uint64_t > | Counters | ||
) |
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.
Definition at line 76 of file InstrProfWriter.cpp.
References llvm::count_mismatch, llvm::counter_overflow, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), I, llvm::ArrayRef< T >::size(), and llvm::success.
void InstrProfWriter::write | ( | raw_fd_ostream & | OS | ) |
Ensure that all data is written to disk.
Definition at line 110 of file InstrProfWriter.cpp.
References llvm::OnDiskChainedHashTableGenerator< Info >::Emit(), llvm::IndexedInstrProf::HashType, I, llvm::AArch64CC::LE, Magic, llvm::raw_fd_ostream::seek(), llvm::raw_ostream::tell(), llvm::IndexedInstrProf::Version, and llvm::support::endian::Writer< endian >::write().