LLVM 20.0.0git
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::memprof::MemProfReader Class Reference

#include "llvm/ProfileData/MemProfReader.h"

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

Public Types

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

Public Member Functions

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)
 

Protected Member Functions

const FrameidToFrame (const FrameId Id) const
 

Protected Attributes

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

Member Typedef Documentation

◆ GuidMemProfRecordPair

Definition at line 41 of file MemProfReader.h.

◆ Iterator

Definition at line 42 of file MemProfReader.h.

Constructor & Destructor Documentation

◆ MemProfReader() [1/3]

llvm::memprof::MemProfReader::MemProfReader ( )
default

◆ ~MemProfReader()

virtual llvm::memprof::MemProfReader::~MemProfReader ( )
virtualdefault

◆ MemProfReader() [2/3]

llvm::memprof::MemProfReader::MemProfReader ( llvm::DenseMap< FrameId, Frame FrameIdMap,
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord ProfData 
)

◆ MemProfReader() [3/3]

llvm::memprof::MemProfReader::MemProfReader ( llvm::DenseMap< FrameId, Frame FrameIdMap,
llvm::DenseMap< CallStackId, llvm::SmallVector< FrameId > >  CSIdMap,
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord ProfData 
)
inline

Definition at line 105 of file MemProfReader.h.

Member Function Documentation

◆ begin()

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

Definition at line 44 of file MemProfReader.h.

References FunctionProfileData, and Iter.

◆ end()

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

Definition at line 43 of file MemProfReader.h.

◆ getCallStacks()

const llvm::DenseMap< CallStackId, llvm::SmallVector< FrameId > > & llvm::memprof::MemProfReader::getCallStacks ( ) const
inline

Definition at line 56 of file MemProfReader.h.

References CSIdToCallStack.

◆ getFrameMapping()

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

Definition at line 50 of file MemProfReader.h.

References IdToFrame.

◆ getProfileData()

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

Definition at line 62 of file MemProfReader.h.

References FunctionProfileData.

◆ getProfileKind()

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

Definition at line 39 of file MemProfReader.h.

References llvm::MemProf.

◆ idToFrame()

const Frame & llvm::memprof::MemProfReader::idToFrame ( const FrameId  Id) const
inlineprotected

Definition at line 114 of file MemProfReader.h.

References assert(), and IdToFrame.

Referenced by llvm::memprof::RawMemProfReader::readNextRecord(), and readNextRecord().

◆ readNextRecord()

virtual Error llvm::memprof::MemProfReader::readNextRecord ( GuidMemProfRecordPair GuidRecord,
std::function< const Frame(const FrameId)>  Callback = nullptr 
)
inlinevirtual

Member Data Documentation

◆ CSIdToCallStack

llvm::DenseMap<CallStackId, llvm::SmallVector<FrameId> > llvm::memprof::MemProfReader::CSIdToCallStack
protected

Definition at line 122 of file MemProfReader.h.

Referenced by getCallStacks(), MemProfReader(), and readNextRecord().

◆ FunctionProfileData

llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord> llvm::memprof::MemProfReader::FunctionProfileData
protected

◆ IdToFrame

llvm::DenseMap<FrameId, Frame> llvm::memprof::MemProfReader::IdToFrame
protected

Definition at line 120 of file MemProfReader.h.

Referenced by getFrameMapping(), and idToFrame().

◆ Iter

llvm::MapVector<GlobalValue::GUID,IndexedMemProfRecord>::iterator llvm::memprof::MemProfReader::Iter
protected

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