LLVM  15.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::memprof::RawMemProfReader Class Reference

#include "llvm/ProfileData/RawMemProfReader.h"

Public Types

using GuidMemProfRecordPair = std::pair< GlobalValue::GUID, MemProfRecord >
 
using Iterator = InstrProfIterator< GuidMemProfRecordPair, RawMemProfReader >
 

Public Member Functions

 RawMemProfReader (const RawMemProfReader &)=delete
 
RawMemProfReaderoperator= (const RawMemProfReader &)=delete
 
void printYAML (raw_ostream &OS)
 
Iterator end ()
 
Iterator begin ()
 
Error readNextRecord (GuidMemProfRecordPair &GuidRecord)
 
InstrProfKind getProfileKind () const
 
 RawMemProfReader (std::unique_ptr< llvm::symbolize::SymbolizableModule > Sym, llvm::SmallVectorImpl< SegmentEntry > &Seg, llvm::MapVector< uint64_t, MemInfoBlock > &Prof, CallStackMap &SM, bool KeepName=false)
 
const llvm::DenseMap< FrameId, Frame > & getFrameMapping () const
 
const llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > & getProfileData () const
 

Static Public Member Functions

static bool hasFormat (const MemoryBuffer &DataBuffer)
 
static bool hasFormat (const StringRef Path)
 
static Expected< std::unique_ptr< RawMemProfReader > > create (const Twine &Path, const StringRef ProfiledBinary, bool KeepName=false)
 

Detailed Description

Definition at line 39 of file RawMemProfReader.h.

Member Typedef Documentation

◆ GuidMemProfRecordPair

Definition at line 61 of file RawMemProfReader.h.

◆ Iterator

Definition at line 62 of file RawMemProfReader.h.

Constructor & Destructor Documentation

◆ RawMemProfReader() [1/2]

llvm::memprof::RawMemProfReader::RawMemProfReader ( const RawMemProfReader )
delete

Referenced by create().

◆ RawMemProfReader() [2/2]

llvm::memprof::RawMemProfReader::RawMemProfReader ( std::unique_ptr< llvm::symbolize::SymbolizableModule Sym,
llvm::SmallVectorImpl< SegmentEntry > &  Seg,
llvm::MapVector< uint64_t, MemInfoBlock > &  Prof,
CallStackMap SM,
bool  KeepName = false 
)
inline

Definition at line 75 of file RawMemProfReader.h.

References E, move, and llvm::report_fatal_error().

Member Function Documentation

◆ begin()

Iterator llvm::memprof::RawMemProfReader::begin ( )
inline

Definition at line 64 of file RawMemProfReader.h.

◆ create()

Expected< std::unique_ptr< RawMemProfReader > > llvm::memprof::RawMemProfReader::create ( const Twine Path,
const StringRef  ProfiledBinary,
bool  KeepName = false 
)
static

◆ end()

Iterator llvm::memprof::RawMemProfReader::end ( )
inline

Definition at line 63 of file RawMemProfReader.h.

◆ getFrameMapping()

const llvm::DenseMap<FrameId, Frame>& llvm::memprof::RawMemProfReader::getFrameMapping ( ) const
inline

Definition at line 93 of file RawMemProfReader.h.

◆ getProfileData()

const llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord>& llvm::memprof::RawMemProfReader::getProfileData ( ) const
inline

Definition at line 99 of file RawMemProfReader.h.

◆ getProfileKind()

InstrProfKind llvm::memprof::RawMemProfReader::getProfileKind ( ) const
inline

Definition at line 72 of file RawMemProfReader.h.

References llvm::MemProf.

◆ hasFormat() [1/2]

bool llvm::memprof::RawMemProfReader::hasFormat ( const MemoryBuffer DataBuffer)
static

◆ hasFormat() [2/2]

bool llvm::memprof::RawMemProfReader::hasFormat ( const StringRef  Path)
static

Definition at line 201 of file RawMemProfReader.cpp.

References llvm::MemoryBuffer::getFileOrSTDIN(), and hasFormat().

◆ operator=()

RawMemProfReader& llvm::memprof::RawMemProfReader::operator= ( const RawMemProfReader )
delete

◆ printYAML()

void llvm::memprof::RawMemProfReader::printYAML ( raw_ostream OS)

◆ readNextRecord()

Error llvm::memprof::RawMemProfReader::readNextRecord ( GuidMemProfRecordPair GuidRecord)

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