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

#include "llvm/ProfileData/SampleProf.h"

Public Member Functions

 SampleContext ()
 
 SampleContext (StringRef ContextStr, ContextStateMask CState=UnknownContext)
 
void promoteOnPath (StringRef ContextStrToRemove)
 
StringRef getContextWithLastKFrames (uint32_t K)
 
 operator StringRef () 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 getNameWithoutContext () const
 
StringRef getCallingContext () const
 
StringRef getNameWithContext () const
 

Static Public Member Functions

static std::pair< StringRef, StringRefsplitContextString (StringRef ContextStr)
 
static void decodeContextString (StringRef ContextStr, StringRef &FName, LineLocation &LineLoc)
 

Detailed Description

Definition at line 408 of file SampleProf.h.

Constructor & Destructor Documentation

◆ SampleContext() [1/2]

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

Definition at line 410 of file SampleProf.h.

◆ SampleContext() [2/2]

llvm::sampleprof::SampleContext::SampleContext ( StringRef  ContextStr,
ContextStateMask  CState = UnknownContext 
)
inline

Definition at line 411 of file SampleProf.h.

Member Function Documentation

◆ clearState()

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

Definition at line 479 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 475 of file SampleProf.h.

◆ getCallingContext()

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

Definition at line 483 of file SampleProf.h.

◆ getContextWithLastKFrames()

StringRef llvm::sampleprof::SampleContext::getContextWithLastKFrames ( uint32_t  K)
inline

◆ getNameWithContext()

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

◆ getNameWithoutContext()

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

◆ hasAttribute()

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

Definition at line 473 of file SampleProf.h.

◆ hasContext()

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

◆ hasState()

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

Definition at line 477 of file SampleProf.h.

References S.

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

◆ isBaseContext()

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

Definition at line 481 of file SampleProf.h.

References llvm::StringRef::empty().

◆ operator StringRef()

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

Definition at line 472 of file SampleProf.h.

◆ promoteOnPath()

void llvm::sampleprof::SampleContext::promoteOnPath ( StringRef  ContextStrToRemove)
inline

◆ setAllAttributes()

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

Definition at line 476 of file SampleProf.h.

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

◆ setAttribute()

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

Definition at line 474 of file SampleProf.h.

◆ setState()

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

◆ splitContextString()

static std::pair<StringRef, StringRef> llvm::sampleprof::SampleContext::splitContextString ( StringRef  ContextStr)
inlinestatic

Definition at line 429 of file SampleProf.h.

References llvm::StringRef::split().


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