class SampleProfileProber

Declaration

class SampleProfileProber { /* full declaration omitted */ };

Description

Sample profile pseudo prober. Insert pseudo probes for block sampling and value sampling.

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:101

Member Variables

private llvm::Function* F
private std::string CurModuleUniqueId
The current module ID that is used to name a static object as a comdat group.
private uint64_t FunctionHash
A CFG hash code used to identify a function code changes.
private llvm::BlockIdMap BlockProbeIds
Map basic blocks to the their pseudo probe ids.
private llvm::InstructionIdMap CallProbeIds
Map indirect calls to the their pseudo probe ids.
private uint32_t LastProbeId
The ID of the last probe, Can be used to number a new probe.

Method Overview

Methods

SampleProfileProber(
    llvm::Function& F,
    const std::string& CurModuleUniqueId)

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:104

Parameters

llvm::Function& F
const std::string& CurModuleUniqueId

void computeCFGHash()

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:112

void computeProbeIdForBlocks()

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:113

void computeProbeIdForCallsites()

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:114

uint32_t getBlockId(
    const llvm::BasicBlock* BB) const

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:110

Parameters

const llvm::BasicBlock* BB

uint32_t getCallsiteId(
    const llvm::Instruction* Call) const

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:111

Parameters

const llvm::Instruction* Call

llvm::Function* getFunction() const

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:108

uint64_t getFunctionHash() const

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:109

void instrumentOneFunc(llvm::Function& F,
                       llvm::TargetMachine* TM)

Declared at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:105

Parameters

llvm::Function& F
llvm::TargetMachine* TM