LLVM  14.0.0git
Macros | Functions | Variables
SampleProfileProbe.cpp File Reference
#include "llvm/Transforms/IPO/SampleProfileProbe.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/ProfileData/SampleProf.h"
#include "llvm/Support/CRC.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <unordered_set>
#include <vector>
Include dependency graph for SampleProfileProbe.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "sample-profile-probe"
 

Functions

 STATISTIC (ArtificialDbgLine, "Number of probes that have an artificial debug line")
 
static uint64_t getCallStackHash (const DILocation *DIL)
 
static uint64_t computeCallStackHash (const Instruction &Inst)
 

Variables

static cl::opt< bool > VerifyPseudoProbe ("verify-pseudo-probe", cl::init(false), cl::Hidden, cl::desc("Do pseudo probe verification"))
 
static cl::list< std::string > VerifyPseudoProbeFuncList ("verify-pseudo-probe-funcs", cl::Hidden, cl::desc("The option to specify the name of the functions to verify."))
 
static cl::opt< bool > UpdatePseudoProbe ("update-pseudo-probe", cl::init(true), cl::Hidden, cl::desc("Update pseudo probe distribution factor"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "sample-profile-probe"

Definition at line 36 of file SampleProfileProbe.cpp.

Function Documentation

◆ computeCallStackHash()

static uint64_t computeCallStackHash ( const Instruction Inst)
static

Definition at line 70 of file SampleProfileProbe.cpp.

References getCallStackHash(), and llvm::Instruction::getDebugLoc().

◆ getCallStackHash()

static uint64_t getCallStackHash ( const DILocation DIL)
static

Definition at line 53 of file SampleProfileProbe.cpp.

References llvm::DIScope::getName(), llvm::MD5Hash(), and llvm::to_string().

Referenced by computeCallStackHash().

◆ STATISTIC()

STATISTIC ( ArtificialDbgLine  ,
"Number of probes that have an artificial debug line"   
)

Variable Documentation

◆ UpdatePseudoProbe

cl::opt<bool> UpdatePseudoProbe("update-pseudo-probe", cl::init(true), cl::Hidden, cl::desc("Update pseudo probe distribution factor"))
static

◆ VerifyPseudoProbe

cl::opt<bool> VerifyPseudoProbe("verify-pseudo-probe", cl::init(false), cl::Hidden, cl::desc("Do pseudo probe verification"))
static

◆ VerifyPseudoProbeFuncList

cl::list<std::string> VerifyPseudoProbeFuncList("verify-pseudo-probe-funcs", cl::Hidden, cl::desc("The option to specify the name of the functions to verify."))
static