LLVM  3.7.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::RawInstrProfReader< IntPtrT > Class Template Reference

Reader for the raw instrprof binary format from runtime. More...

#include <InstrProfReader.h>

Inheritance diagram for llvm::RawInstrProfReader< IntPtrT >:
[legend]
Collaboration diagram for llvm::RawInstrProfReader< IntPtrT >:
[legend]

Public Member Functions

 RawInstrProfReader (std::unique_ptr< MemoryBuffer > DataBuffer)
 
std::error_code readHeader () override
 Read the header. Required before reading first record. More...
 
std::error_code readNextRecord (InstrProfRecord &Record) override
 Read a single record. More...
 
- Public Member Functions inherited from llvm::InstrProfReader
 InstrProfReader ()
 
virtual ~InstrProfReader ()
 
InstrProfIterator begin ()
 Iterator over profile data. More...
 
InstrProfIterator end ()
 
bool isEOF ()
 Return true if the reader has finished reading the profile data. More...
 
bool hasError ()
 Return true if the reader encountered an error reading profiling data. More...
 
std::error_code getError ()
 Get the current error code. More...
 

Static Public Member Functions

static bool hasFormat (const MemoryBuffer &DataBuffer)
 
- Static Public Member Functions inherited from llvm::InstrProfReader
static ErrorOr
< std::unique_ptr
< InstrProfReader > > 
create (std::string Path)
 Factory method to create an appropriately typed reader for the given instrprof file. More...
 
static ErrorOr
< std::unique_ptr
< InstrProfReader > > 
create (std::unique_ptr< MemoryBuffer > Buffer)
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::InstrProfReader
std::error_code error (std::error_code EC)
 Set the current std::error_code and return same. More...
 
std::error_code success ()
 Clear the current error code and return a successful one. More...
 

Detailed Description

template<class IntPtrT>
class llvm::RawInstrProfReader< IntPtrT >

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 128 of file InstrProfReader.h.

Constructor & Destructor Documentation

template<class IntPtrT >
llvm::RawInstrProfReader< IntPtrT >::RawInstrProfReader ( std::unique_ptr< MemoryBuffer DataBuffer)
inline

Definition at line 161 of file InstrProfReader.h.

Member Function Documentation

template<class IntPtrT >
bool RawInstrProfReader::hasFormat ( const MemoryBuffer DataBuffer)
static
template<class IntPtrT >
std::error_code RawInstrProfReader::readHeader ( )
overridevirtual

Read the header. Required before reading first record.

Implements llvm::InstrProfReader.

Definition at line 182 of file InstrProfReader.cpp.

References llvm::bad_header, llvm::bad_magic, and error().

template<class IntPtrT >
std::error_code RawInstrProfReader::readNextRecord ( InstrProfRecord Record)
overridevirtual

The documentation for this class was generated from the following files: