struct InstrProfRecord

Declaration

struct InstrProfRecord { /* full declaration omitted */ };

Description

Profiling information for a single function.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:685

Member Variables

public std::vector<uint64_t> Counts

Method Overview

  • public void Clear()
  • public InstrProfRecord(std::vector<uint64_t> Counts)
  • public InstrProfRecord(llvm::InstrProfRecord &&)
  • public InstrProfRecord(const llvm::InstrProfRecord & RHS)
  • public InstrProfRecord()
  • public void accumulateCounts(llvm::CountSumOrPercent & Sum) const
  • public void addValueData(uint32_t ValueKind, uint32_t Site, InstrProfValueData * VData, uint32_t N, llvm::InstrProfSymtab * SymTab)
  • public void clearValueData()
  • public inline uint32_t getNumValueData(uint32_t ValueKind) const
  • public inline uint32_t getNumValueDataForSite(uint32_t ValueKind, uint32_t Site) const
  • public inline uint32_t getNumValueKinds() const
  • public inline uint32_t getNumValueSites(uint32_t ValueKind) const
  • public inline std::unique_ptr<InstrProfValueData[]> getValueForSite(uint32_t ValueKind, uint32_t Site, uint64_t * TotalC = nullptr) const
  • public inline uint64_t getValueForSite(InstrProfValueData * Dest, uint32_t ValueKind, uint32_t Site) const
  • public void merge(llvm::InstrProfRecord & Other, uint64_t Weight, function_ref<void (llvm::instrprof_error)> Warn)
  • public void overlap(llvm::InstrProfRecord & Other, llvm::OverlapStats & Overlap, llvm::OverlapStats & FuncLevelOverlap, uint64_t ValueCutoff)
  • public void overlapValueProfData(uint32_t ValueKind, llvm::InstrProfRecord & Src, llvm::OverlapStats & Overlap, llvm::OverlapStats & FuncLevelOverlap)
  • public inline void reserveSites(uint32_t ValueKind, uint32_t NumValueSites)
  • public void scale(uint64_t Weight, function_ref<void (llvm::instrprof_error)> Warn)
  • public void sortValueData()

Methods

void Clear()

Description

Clear value data entries and edge counters.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:762

InstrProfRecord(std::vector<uint64_t> Counts)

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:689

Parameters

std::vector<uint64_t> Counts

InstrProfRecord(llvm::InstrProfRecord&&)

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:690

Parameters

llvm::InstrProfRecord&&

InstrProfRecord(const llvm::InstrProfRecord& RHS)

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:691

Parameters

const llvm::InstrProfRecord& RHS

InstrProfRecord()

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:688

void accumulateCounts(
    llvm::CountSumOrPercent& Sum) const

Description

Compute the sums of all counts and store in Sum.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:771

Parameters

llvm::CountSumOrPercent& Sum

void addValueData(uint32_t ValueKind,
                  uint32_t Site,
                  InstrProfValueData* VData,
                  uint32_t N,
                  llvm::InstrProfSymtab* SymTab)

Description

Add ValueData for ValueKind at value Site.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:741

Parameters

uint32_t ValueKind
uint32_t Site
InstrProfValueData* VData
uint32_t N
llvm::InstrProfSymtab* SymTab

void clearValueData()

Description

Clear value data entries

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:768

inline uint32_t getNumValueData(
    uint32_t ValueKind) const

Description

Return the total number of ValueData for ValueKind.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:717

Parameters

uint32_t ValueKind

inline uint32_t getNumValueDataForSite(
    uint32_t ValueKind,
    uint32_t Site) const

Description

Return the number of value data collected for ValueKind at profiling site: Site.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:721

Parameters

uint32_t ValueKind
uint32_t Site

inline uint32_t getNumValueKinds() const

Description

Return the number of value profile kinds with non-zero number of profile sites.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:712

inline uint32_t getNumValueSites(
    uint32_t ValueKind) const

Description

Return the number of instrumented sites for ValueKind.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:714

Parameters

uint32_t ValueKind

inline std::unique_ptr<InstrProfValueData[]>
getValueForSite(uint32_t ValueKind,
                uint32_t Site,
                uint64_t* TotalC = nullptr) const

Description

Return the array of profiled values at \p Site. If \p TotalC is not null, the total count of all target values at this site will be stored in \c *TotalC.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:728

Parameters

uint32_t ValueKind
uint32_t Site
uint64_t* TotalC = nullptr

inline uint64_t getValueForSite(
    InstrProfValueData* Dest,
    uint32_t ValueKind,
    uint32_t Site) const

Description

Get the target value/counts of kind \p ValueKind collected at site\p Site and store the result in array \p Dest. Return the total counts of all target values at this site.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:734

Parameters

InstrProfValueData* Dest
uint32_t ValueKind
uint32_t Site

void merge(
    llvm::InstrProfRecord& Other,
    uint64_t Weight,
    function_ref<void(llvm::instrprof_error)>
        Warn)

Description

Merge the counts in \p Other into this one. Optionally scale merged counts by \p Weight.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:747

Parameters

llvm::InstrProfRecord& Other
uint64_t Weight
function_ref<void(llvm::instrprof_error)> Warn

void overlap(llvm::InstrProfRecord& Other,
             llvm::OverlapStats& Overlap,
             llvm::OverlapStats& FuncLevelOverlap,
             uint64_t ValueCutoff)

Description

Compute the overlap b/w this IntrprofRecord and Other.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:774

Parameters

llvm::InstrProfRecord& Other
llvm::OverlapStats& Overlap
llvm::OverlapStats& FuncLevelOverlap
uint64_t ValueCutoff

void overlapValueProfData(
    uint32_t ValueKind,
    llvm::InstrProfRecord& Src,
    llvm::OverlapStats& Overlap,
    llvm::OverlapStats& FuncLevelOverlap)

Description

Compute the overlap of value profile counts.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:778

Parameters

uint32_t ValueKind
llvm::InstrProfRecord& Src
llvm::OverlapStats& Overlap
llvm::OverlapStats& FuncLevelOverlap

inline void reserveSites(uint32_t ValueKind,
                         uint32_t NumValueSites)

Description

Reserve space for NumValueSites sites.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:738

Parameters

uint32_t ValueKind
uint32_t NumValueSites

void scale(
    uint64_t Weight,
    function_ref<void(llvm::instrprof_error)>
        Warn)

Description

Scale up profile counts (including value profile data) by\p Weight.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:752

Parameters

uint64_t Weight
function_ref<void(llvm::instrprof_error)> Warn

void sortValueData()

Description

Sort value profile data (per site) by count.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:755