LLVM API Documentation
#include <InstrProfReader.h>
Classes | |
struct | ProfileData |
struct | RawHeader |
Public Member Functions | |
RawInstrProfReader (std::unique_ptr< MemoryBuffer > DataBuffer) | |
std::error_code | readHeader () override |
Read the header. Required before reading first record. | |
std::error_code | readNextRecord (InstrProfRecord &Record) override |
Read a single record. | |
Static Public Member Functions | |
static bool | hasFormat (const MemoryBuffer &DataBuffer) |
Reader for the raw instrprof binary format from runtime.
This format is a raw memory dump of the instrumentation-baed profiling data from the runtime. It has no index.
Templated on the unsigned type whose size matches pointers on the platform that wrote the profile.
Definition at line 139 of file InstrProfReader.h.
llvm::RawInstrProfReader< IntPtrT >::RawInstrProfReader | ( | std::unique_ptr< MemoryBuffer > | DataBuffer | ) | [inline] |
Definition at line 175 of file InstrProfReader.h.
bool RawInstrProfReader::hasFormat | ( | const MemoryBuffer & | DataBuffer | ) | [static] |
Definition at line 158 of file InstrProfReader.cpp.
References llvm::MemoryBuffer::getBufferSize(), llvm::MemoryBuffer::getBufferStart(), llvm::sys::getSwappedBytes(), and Magic.
Referenced by llvm::InstrProfReader::create().
std::error_code RawInstrProfReader::readHeader | ( | ) | [override, virtual] |
Read the header. Required before reading first record.
Implements llvm::InstrProfReader.
Definition at line 168 of file InstrProfReader.cpp.
References llvm::bad_header, and llvm::bad_magic.
std::error_code RawInstrProfReader::readNextRecord | ( | InstrProfRecord & | Record | ) | [override, virtual] |
Read a single record.
Implements llvm::InstrProfReader.
Definition at line 242 of file InstrProfReader.cpp.
References llvm::InstrProfRecord::Counts, llvm::StringRef::data(), llvm::Intrinsic::getName(), llvm::InstrProfRecord::Hash, llvm::makeArrayRef(), llvm::malformed, llvm::InstrProfRecord::Name, llvm::StringRef::size(), llvm::success, and std::swap().