LLVM 22.0.0git
llvm::memprof::MemProfSummary Class Reference

#include "llvm/ProfileData/MemProfSummary.h"

Public Member Functions

 MemProfSummary (uint64_t NumContexts, uint64_t NumColdContexts, uint64_t NumHotContexts, uint64_t MaxColdTotalSize, uint64_t MaxWarmTotalSize, uint64_t MaxHotTotalSize)
uint64_t getNumContexts () const
uint64_t getNumColdContexts () const
uint64_t getNumHotContexts () const
uint64_t getMaxColdTotalSize () const
uint64_t getMaxWarmTotalSize () const
uint64_t getMaxHotTotalSize () const
LLVM_ABI void printSummaryYaml (raw_ostream &OS) const
LLVM_ABI void write (ProfOStream &OS) const
 Write to indexed MemProf profile.

Static Public Member Functions

static constexpr unsigned getNumSummaryFields ()
static LLVM_ABI std::unique_ptr< MemProfSummarydeserialize (const unsigned char *&)
 Read from indexed MemProf profile.

Detailed Description

Definition at line 22 of file MemProfSummary.h.

Constructor & Destructor Documentation

◆ MemProfSummary()

llvm::memprof::MemProfSummary::MemProfSummary ( uint64_t NumContexts,
uint64_t NumColdContexts,
uint64_t NumHotContexts,
uint64_t MaxColdTotalSize,
uint64_t MaxWarmTotalSize,
uint64_t MaxHotTotalSize )
inline

Definition at line 36 of file MemProfSummary.h.

Member Function Documentation

◆ deserialize()

std::unique_ptr< MemProfSummary > MemProfSummary::deserialize ( const unsigned char *& Ptr)
static

Read from indexed MemProf profile.

Definition at line 47 of file MemProfSummary.cpp.

References assert(), getNumSummaryFields(), Ptr, llvm::support::endian::read(), and llvm::support::endian::readNext().

◆ getMaxColdTotalSize()

uint64_t llvm::memprof::MemProfSummary::getMaxColdTotalSize ( ) const
inline

Definition at line 47 of file MemProfSummary.h.

◆ getMaxHotTotalSize()

uint64_t llvm::memprof::MemProfSummary::getMaxHotTotalSize ( ) const
inline

Definition at line 49 of file MemProfSummary.h.

◆ getMaxWarmTotalSize()

uint64_t llvm::memprof::MemProfSummary::getMaxWarmTotalSize ( ) const
inline

Definition at line 48 of file MemProfSummary.h.

◆ getNumColdContexts()

uint64_t llvm::memprof::MemProfSummary::getNumColdContexts ( ) const
inline

Definition at line 45 of file MemProfSummary.h.

◆ getNumContexts()

uint64_t llvm::memprof::MemProfSummary::getNumContexts ( ) const
inline

Definition at line 44 of file MemProfSummary.h.

◆ getNumHotContexts()

uint64_t llvm::memprof::MemProfSummary::getNumHotContexts ( ) const
inline

Definition at line 46 of file MemProfSummary.h.

◆ getNumSummaryFields()

constexpr unsigned llvm::memprof::MemProfSummary::getNumSummaryFields ( )
inlinestaticconstexpr

Definition at line 43 of file MemProfSummary.h.

Referenced by deserialize(), and write().

◆ printSummaryYaml()

void MemProfSummary::printSummaryYaml ( raw_ostream & OS) const

Definition at line 18 of file MemProfSummary.cpp.

◆ write()

void MemProfSummary::write ( ProfOStream & OS) const

Write to indexed MemProf profile.

Definition at line 30 of file MemProfSummary.cpp.

References assert(), getNumSummaryFields(), llvm::ProfOStream::tell(), llvm::ProfOStream::write(), and llvm::ProfOStream::write32().


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