LLVM  10.0.0svn
Classes | Typedefs | Enumerations | Functions
llvm::sampleprof Namespace Reference

Classes

class  FunctionSamples
 Representation of the samples collected for a function. More...
 
struct  LineLocation
 Represents the relative location of an instruction. More...
 
class  ProfileSymbolList
 ProfileSymbolList records the list of function symbols shown up in the binary used to generate the profile. More...
 
class  SampleProfileReader
 Sample-based profile reader. More...
 
class  SampleProfileReaderBinary
 
class  SampleProfileReaderCompactBinary
 
class  SampleProfileReaderExtBinary
 
class  SampleProfileReaderExtBinaryBase
 SampleProfileReaderExtBinaryBase/SampleProfileWriterExtBinaryBase defines the basic structure of the extensible binary format. More...
 
class  SampleProfileReaderGCC
 
class  SampleProfileReaderItaniumRemapper
 A profile data reader proxy that remaps the profile data from another sample profile data reader, by applying a provided set of equivalences between components of the symbol names in the profile. More...
 
class  SampleProfileReaderRawBinary
 
class  SampleProfileReaderText
 
class  SampleProfileWriter
 Sample-based profile writer. Base class. More...
 
class  SampleProfileWriterBinary
 Sample-based profile writer (binary format). More...
 
class  SampleProfileWriterCompactBinary
 
class  SampleProfileWriterExtBinary
 
class  SampleProfileWriterExtBinaryBase
 
class  SampleProfileWriterRawBinary
 
class  SampleProfileWriterText
 Sample-based profile writer (text format). More...
 
class  SampleRecord
 Representation of a single sample record. More...
 
class  SampleSorter
 Sort a LocationT->SampleT map by LocationT. More...
 
struct  SecHdrTableEntry
 

Typedefs

using BodySampleMap = std::map< LineLocation, SampleRecord >
 
using FunctionSamplesMap = std::map< std::string, FunctionSamples, std::less<> >
 
using CallsiteSampleMap = std::map< LineLocation, FunctionSamplesMap >
 
using InlineCallStack = SmallVector< FunctionSamples *, 10 >
 

Enumerations

enum  SampleProfileFormat {
  SPF_None = 0, SPF_Text = 0x1, SPF_Compact_Binary = 0x2, SPF_GCC = 0x3,
  SPF_Ext_Binary = 0x4, SPF_Binary = 0xff
}
 
enum  SecType {
  SecInValid = 0, SecProfSummary = 1, SecNameTable = 2, SecProfileSymbolList = 3,
  SecFuncOffsetTable = 4, SecFuncProfileFirst = 32, SecLBRProfile = SecFuncProfileFirst
}
 
enum  SecFlags { SecFlagInValid = 0, SecFlagCompress = (1 << 0) }
 
enum  HistType {
  HIST_TYPE_INTERVAL, HIST_TYPE_POW2, HIST_TYPE_SINGLE_VALUE, HIST_TYPE_CONST_DELTA,
  HIST_TYPE_INDIR_CALL, HIST_TYPE_AVERAGE, HIST_TYPE_IOR, HIST_TYPE_INDIR_CALL_TOPN
}
 

Functions

static uint64_t SPMagic (SampleProfileFormat Format=SPF_Binary)
 
static StringRef getRepInFormat (StringRef Name, SampleProfileFormat Format, std::string &GUIDBuf)
 
static uint64_t SPVersion ()
 
static std::string getSecName (SecType Type)
 
static void addSecFlags (SecHdrTableEntry &Entry, uint64_t Flags)
 
static void removeSecFlags (SecHdrTableEntry &Entry, uint64_t Flags)
 
static bool hasSecFlag (SecHdrTableEntry &Entry, SecFlags Flag)
 
raw_ostreamoperator<< (raw_ostream &OS, const LineLocation &Loc)
 
raw_ostreamoperator<< (raw_ostream &OS, const SampleRecord &Sample)
 
raw_ostreamoperator<< (raw_ostream &OS, const FunctionSamples &FS)
 

Typedef Documentation

◆ BodySampleMap

Definition at line 289 of file SampleProf.h.

◆ CallsiteSampleMap

Definition at line 293 of file SampleProf.h.

◆ FunctionSamplesMap

using llvm::sampleprof::FunctionSamplesMap = typedef std::map<std::string, FunctionSamples, std::less<> >

Definition at line 292 of file SampleProf.h.

◆ InlineCallStack

Definition at line 590 of file SampleProfReader.h.

Enumeration Type Documentation

◆ HistType

Enumerator
HIST_TYPE_INTERVAL 
HIST_TYPE_POW2 
HIST_TYPE_SINGLE_VALUE 
HIST_TYPE_CONST_DELTA 
HIST_TYPE_INDIR_CALL 
HIST_TYPE_AVERAGE 
HIST_TYPE_IOR 
HIST_TYPE_INDIR_CALL_TOPN 

Definition at line 594 of file SampleProfReader.h.

◆ SampleProfileFormat

Enumerator
SPF_None 
SPF_Text 
SPF_Compact_Binary 
SPF_GCC 
SPF_Ext_Binary 
SPF_Binary 

Definition at line 87 of file SampleProf.h.

◆ SecFlags

Enumerator
SecFlagInValid 
SecFlagCompress 

Definition at line 156 of file SampleProf.h.

◆ SecType

Enumerator
SecInValid 
SecProfSummary 
SecNameTable 
SecProfileSymbolList 
SecFuncOffsetTable 
SecFuncProfileFirst 
SecLBRProfile 

Definition at line 118 of file SampleProf.h.

Function Documentation

◆ addSecFlags()

static void llvm::sampleprof::addSecFlags ( SecHdrTableEntry Entry,
uint64_t  Flags 
)
inlinestatic

◆ getRepInFormat()

static StringRef llvm::sampleprof::getRepInFormat ( StringRef  Name,
SampleProfileFormat  Format,
std::string &  GUIDBuf 
)
inlinestatic

◆ getSecName()

static std::string llvm::sampleprof::getSecName ( SecType  Type)
inlinestatic

◆ hasSecFlag()

static bool llvm::sampleprof::hasSecFlag ( SecHdrTableEntry Entry,
SecFlags  Flag 
)
inlinestatic

◆ operator<<() [1/3]

raw_ostream & llvm::sampleprof::operator<< ( raw_ostream OS,
const LineLocation Loc 
)

Definition at line 96 of file SampleProf.cpp.

References llvm::sampleprof::LineLocation::print().

◆ operator<<() [2/3]

raw_ostream & llvm::sampleprof::operator<< ( raw_ostream OS,
const SampleRecord Sample 
)

Definition at line 121 of file SampleProf.cpp.

References llvm::sampleprof::SampleRecord::print().

◆ operator<<() [3/3]

raw_ostream & llvm::sampleprof::operator<< ( raw_ostream OS,
const FunctionSamples FS 
)

Definition at line 165 of file SampleProf.cpp.

References llvm::sampleprof::FunctionSamples::print().

◆ removeSecFlags()

static void llvm::sampleprof::removeSecFlags ( SecHdrTableEntry Entry,
uint64_t  Flags 
)
inlinestatic

Definition at line 162 of file SampleProf.h.

References llvm::sampleprof::SecHdrTableEntry::Flags.

◆ SPMagic()

static uint64_t llvm::sampleprof::SPMagic ( SampleProfileFormat  Format = SPF_Binary)
inlinestatic

◆ SPVersion()

static uint64_t llvm::sampleprof::SPVersion ( )
inlinestatic