LLVM  14.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::sampleprof::SampleContext Class Reference

#include "llvm/ProfileData/SampleProf.h"

Classes

struct  Hash
 

Public Member Functions

 SampleContext ()
 
 SampleContext (StringRef Name)
 
 SampleContext (SampleContextFrames Context, ContextStateMask CState=RawContext)
 
 SampleContext (StringRef ContextStr, std::list< SampleContextFrameVector > &CSNameTable, ContextStateMask CState=RawContext)
 
void promoteOnPath (uint32_t ContextFramesToRemove)
 
 operator SampleContextFrames () const
 
bool hasAttribute (ContextAttributeMask A)
 
void setAttribute (ContextAttributeMask A)
 
uint32_t getAllAttributes ()
 
void setAllAttributes (uint32_t A)
 
bool hasState (ContextStateMask S)
 
void setState (ContextStateMask S)
 
void clearState (ContextStateMask S)
 
bool hasContext () const
 
bool isBaseContext () const
 
StringRef getName () const
 
SampleContextFrames getContextFrames () const
 
std::string toString () const
 
uint64_t getHashCode () const
 
void setName (StringRef FunctionName)
 Set the name of the function. More...
 
void setContext (SampleContextFrames Context, ContextStateMask CState=RawContext)
 
bool operator== (const SampleContext &That) const
 
bool operator!= (const SampleContext &That) const
 
bool operator< (const SampleContext &That) const
 
bool IsPrefixOf (const SampleContext &That) const
 

Static Public Member Functions

static void decodeContextString (StringRef ContextStr, StringRef &FName, LineLocation &LineLoc)
 
static std::string getContextString (SampleContextFrames Context, bool IncludeLeafLineLocation=false)
 

Detailed Description

Definition at line 469 of file SampleProf.h.

Constructor & Destructor Documentation

◆ SampleContext() [1/4]

llvm::sampleprof::SampleContext::SampleContext ( )
inline

Definition at line 471 of file SampleProf.h.

◆ SampleContext() [2/4]

llvm::sampleprof::SampleContext::SampleContext ( StringRef  Name)
inline

Definition at line 473 of file SampleProf.h.

◆ SampleContext() [3/4]

llvm::sampleprof::SampleContext::SampleContext ( SampleContextFrames  Context,
ContextStateMask  CState = RawContext 
)
inline

Definition at line 476 of file SampleProf.h.

References assert(), Context, and setContext().

◆ SampleContext() [4/4]

llvm::sampleprof::SampleContext::SampleContext ( StringRef  ContextStr,
std::list< SampleContextFrameVector > &  CSNameTable,
ContextStateMask  CState = RawContext 
)
inline

Member Function Documentation

◆ clearState()

void llvm::sampleprof::SampleContext::clearState ( ContextStateMask  S)
inline

Definition at line 560 of file SampleProf.h.

References S.

◆ decodeContextString()

static void llvm::sampleprof::SampleContext::decodeContextString ( StringRef  ContextStr,
StringRef FName,
LineLocation LineLoc 
)
inlinestatic

◆ getAllAttributes()

uint32_t llvm::sampleprof::SampleContext::getAllAttributes ( )
inline

Definition at line 556 of file SampleProf.h.

◆ getContextFrames()

SampleContextFrames llvm::sampleprof::SampleContext::getContextFrames ( ) const
inline

Definition at line 564 of file SampleProf.h.

Referenced by getHashCode(), and llvm::sampleprof::hash_value().

◆ getContextString()

static std::string llvm::sampleprof::SampleContext::getContextString ( SampleContextFrames  Context,
bool  IncludeLeafLineLocation = false 
)
inlinestatic

Definition at line 566 of file SampleProf.h.

References Context, and I.

Referenced by toString().

◆ getHashCode()

uint64_t llvm::sampleprof::SampleContext::getHashCode ( ) const
inline

◆ getName()

StringRef llvm::sampleprof::SampleContext::getName ( ) const
inline

◆ hasAttribute()

bool llvm::sampleprof::SampleContext::hasAttribute ( ContextAttributeMask  A)
inline

Definition at line 554 of file SampleProf.h.

◆ hasContext()

bool llvm::sampleprof::SampleContext::hasContext ( ) const
inline

◆ hasState()

bool llvm::sampleprof::SampleContext::hasState ( ContextStateMask  S)
inline

Definition at line 558 of file SampleProf.h.

References S.

Referenced by llvm::SampleContextTracker::promoteMergeContextSamplesTree().

◆ isBaseContext()

bool llvm::sampleprof::SampleContext::isBaseContext ( ) const
inline

Definition at line 562 of file SampleProf.h.

References llvm::ArrayRef< T >::size().

◆ IsPrefixOf()

bool llvm::sampleprof::SampleContext::IsPrefixOf ( const SampleContext That) const
inline

◆ operator SampleContextFrames()

llvm::sampleprof::SampleContext::operator SampleContextFrames ( ) const
inline

Definition at line 553 of file SampleProf.h.

◆ operator!=()

bool llvm::sampleprof::SampleContext::operator!= ( const SampleContext That) const
inline

Definition at line 610 of file SampleProf.h.

◆ operator<()

bool llvm::sampleprof::SampleContext::operator< ( const SampleContext That) const
inline

◆ operator==()

bool llvm::sampleprof::SampleContext::operator== ( const SampleContext That) const
inline

Definition at line 605 of file SampleProf.h.

◆ promoteOnPath()

void llvm::sampleprof::SampleContext::promoteOnPath ( uint32_t  ContextFramesToRemove)
inline

◆ setAllAttributes()

void llvm::sampleprof::SampleContext::setAllAttributes ( uint32_t  A)
inline

Definition at line 557 of file SampleProf.h.

Referenced by llvm::sampleprof::SampleProfileReaderText::readImpl().

◆ setAttribute()

void llvm::sampleprof::SampleContext::setAttribute ( ContextAttributeMask  A)
inline

Definition at line 555 of file SampleProf.h.

◆ setContext()

void llvm::sampleprof::SampleContext::setContext ( SampleContextFrames  Context,
ContextStateMask  CState = RawContext 
)
inline

Definition at line 597 of file SampleProf.h.

References assert(), Context, and llvm::sampleprof::UnknownContext.

Referenced by SampleContext().

◆ setName()

void llvm::sampleprof::SampleContext::setName ( StringRef  FunctionName)
inline

Set the name of the function.

Definition at line 591 of file SampleProf.h.

References assert(), and llvm::ArrayRef< T >::empty().

Referenced by llvm::sampleprof::FunctionSamples::setName().

◆ setState()

void llvm::sampleprof::SampleContext::setState ( ContextStateMask  S)
inline

◆ toString()

std::string llvm::sampleprof::SampleContext::toString ( ) const
inline

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