LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::memprof::RawMemProfReader Class Referencefinal

#include "llvm/ProfileData/MemProfReader.h"

Inheritance diagram for llvm::memprof::RawMemProfReader:
Inheritance graph
[legend]

Public Member Functions

 RawMemProfReader (const RawMemProfReader &)=delete
 
RawMemProfReaderoperator= (const RawMemProfReader &)=delete
 
virtual ~RawMemProfReader () override
 
void printYAML (raw_ostream &OS)
 
Error readNextRecord (GuidMemProfRecordPair &GuidRecord, std::function< const Frame(const FrameId)> Callback) override
 
 RawMemProfReader (std::unique_ptr< llvm::symbolize::SymbolizableModule > Sym, llvm::SmallVectorImpl< SegmentEntry > &Seg, llvm::MapVector< uint64_t, MemInfoBlock > &Prof, CallStackMap &SM, bool KeepName=false)
 
- Public Member Functions inherited from llvm::memprof::MemProfReader
InstrProfKind getProfileKind () const
 
Iterator end ()
 
Iterator begin ()
 
const llvm::DenseMap< FrameId, Frame > & getFrameMapping () const
 
const llvm::DenseMap< CallStackId, llvm::SmallVector< FrameId > > & getCallStacks () const
 
const llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > & getProfileData () const
 
virtual Error readNextRecord (GuidMemProfRecordPair &GuidRecord, std::function< const Frame(const FrameId)> Callback=nullptr)
 
 MemProfReader ()=default
 
virtual ~MemProfReader ()=default
 
 MemProfReader (llvm::DenseMap< FrameId, Frame > FrameIdMap, llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > ProfData)
 
 MemProfReader (llvm::DenseMap< FrameId, Frame > FrameIdMap, llvm::DenseMap< CallStackId, llvm::SmallVector< FrameId > > CSIdMap, llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > ProfData)
 

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, StringRef ProfiledBinary, bool KeepName=false)
 
static Expected< std::unique_ptr< RawMemProfReader > > create (std::unique_ptr< MemoryBuffer > Buffer, StringRef ProfiledBinary, bool KeepName=false)
 
static std::vector< std::string > peekBuildIds (MemoryBuffer *DataBuffer)
 

Additional Inherited Members

- Public Types inherited from llvm::memprof::MemProfReader
using GuidMemProfRecordPair = std::pair< GlobalValue::GUID, MemProfRecord >
 
using Iterator = InstrProfIterator< GuidMemProfRecordPair, MemProfReader >
 
- Protected Member Functions inherited from llvm::memprof::MemProfReader
const FrameidToFrame (const FrameId Id) const
 
- Protected Attributes inherited from llvm::memprof::MemProfReader
llvm::DenseMap< FrameId, FrameIdToFrame
 
llvm::DenseMap< CallStackId, llvm::SmallVector< FrameId > > CSIdToCallStack
 
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecordFunctionProfileData
 
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord >::iterator Iter
 

Detailed Description

Definition at line 136 of file MemProfReader.h.

Constructor & Destructor Documentation

◆ RawMemProfReader() [1/2]

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

◆ ~RawMemProfReader()

llvm::memprof::RawMemProfReader::~RawMemProfReader ( )
overridevirtual

Definition at line 305 of file MemProfReader.cpp.

References _.

◆ 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 169 of file MemProfReader.h.

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

Member Function Documentation

◆ create() [1/2]

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

Definition at line 259 of file MemProfReader.cpp.

References create(), llvm::errorCodeToError(), and llvm::MemoryBuffer::getFileOrSTDIN().

Referenced by create().

◆ create() [2/2]

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

◆ 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 313 of file MemProfReader.cpp.

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

◆ operator=()

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

◆ peekBuildIds()

std::vector< std::string > llvm::memprof::RawMemProfReader::peekBuildIds ( MemoryBuffer DataBuffer)
static

◆ printYAML()

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

◆ readNextRecord()

Error llvm::memprof::RawMemProfReader::readNextRecord ( GuidMemProfRecordPair GuidRecord,
std::function< const Frame(const FrameId)>  Callback 
)
overridevirtual

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