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

#include "llvm/ProfileData/MemProfReader.h"

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

Public Member Functions

 YAMLMemProfReader ()=default
 
void parse (StringRef YAMLData)
 
- Public Member Functions inherited from llvm::memprof::MemProfReader
InstrProfKind getProfileKind () const
 
Iterator end ()
 
Iterator begin ()
 
IndexedMemProfData takeMemProfData ()
 
virtual Error readNextRecord (GuidMemProfRecordPair &GuidRecord, std::function< const Frame(const FrameId)> Callback=nullptr)
 
 MemProfReader ()=default
 
virtual ~MemProfReader ()=default
 
 MemProfReader (IndexedMemProfData &&MemProfData)
 

Static Public Member Functions

static bool hasFormat (const MemoryBuffer &DataBuffer)
 
static bool hasFormat (const StringRef Path)
 
static Expected< std::unique_ptr< YAMLMemProfReader > > create (const Twine &Path)
 
static Expected< std::unique_ptr< YAMLMemProfReader > > create (std::unique_ptr< MemoryBuffer > Buffer)
 

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
IndexedMemProfData MemProfData
 
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord >::iterator Iter
 

Detailed Description

Definition at line 213 of file MemProfReader.h.

Constructor & Destructor Documentation

◆ YAMLMemProfReader()

llvm::memprof::YAMLMemProfReader::YAMLMemProfReader ( )
default

Member Function Documentation

◆ create() [1/2]

Expected< std::unique_ptr< YAMLMemProfReader > > llvm::memprof::YAMLMemProfReader::create ( const Twine Path)
static

Definition at line 755 of file MemProfReader.cpp.

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

Referenced by create().

◆ create() [2/2]

Expected< std::unique_ptr< YAMLMemProfReader > > llvm::memprof::YAMLMemProfReader::create ( std::unique_ptr< MemoryBuffer Buffer)
static

Definition at line 765 of file MemProfReader.cpp.

◆ hasFormat() [1/2]

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

Definition at line 780 of file MemProfReader.cpp.

References llvm::MemoryBuffer::getBuffer(), and llvm::StringRef::starts_with().

Referenced by hasFormat().

◆ hasFormat() [2/2]

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

Definition at line 771 of file MemProfReader.cpp.

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

◆ parse()

void llvm::memprof::YAMLMemProfReader::parse ( StringRef  YAMLData)

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