LLVM 22.0.0git
llvm::TrackingStatistic Class Reference

#include "llvm/ADT/Statistic.h"

Public Member Functions

constexpr TrackingStatistic (const char *DebugType, const char *Name, const char *Desc)
const chargetDebugType () const
const chargetName () const
const chargetDesc () const
uint64_t getValue () const
 operator uint64_t () const
const TrackingStatisticoperator= (uint64_t Val)
const TrackingStatisticoperator++ ()
uint64_t operator++ (int)
const TrackingStatisticoperator-- ()
uint64_t operator-- (int)
const TrackingStatisticoperator+= (uint64_t V)
const TrackingStatisticoperator-= (uint64_t V)
void updateMax (uint64_t V)

Public Attributes

const char *const DebugType
const char *const Name
const char *const Desc
std::atomic< uint64_tValue
std::atomic< boolInitialized

Protected Member Functions

TrackingStatisticinit ()
LLVM_ABI void RegisterStatistic ()
 RegisterStatistic - The first time a statistic is bumped, this method is called.

Detailed Description

Definition at line 50 of file Statistic.h.

Constructor & Destructor Documentation

◆ TrackingStatistic()

llvm::TrackingStatistic::TrackingStatistic ( const char * DebugType,
const char * Name,
const char * Desc )
inlineconstexpr

Definition at line 59 of file Statistic.h.

References DebugType, Desc, Initialized, Name, and Value.

Referenced by init(), operator++(), operator+=(), operator--(), operator-=(), and operator=().

Member Function Documentation

◆ getDebugType()

const char * llvm::TrackingStatistic::getDebugType ( ) const
inline

Definition at line 64 of file Statistic.h.

References DebugType.

Referenced by llvm::PrintStatistics(), and llvm::PrintStatisticsJSON().

◆ getDesc()

const char * llvm::TrackingStatistic::getDesc ( ) const
inline

Definition at line 66 of file Statistic.h.

References Desc.

Referenced by llvm::PrintStatistics().

◆ getName()

const char * llvm::TrackingStatistic::getName ( ) const
inline

Definition at line 65 of file Statistic.h.

References Name.

Referenced by llvm::PrintStatisticsJSON().

◆ getValue()

uint64_t llvm::TrackingStatistic::getValue ( ) const
inline

Definition at line 68 of file Statistic.h.

References Value.

Referenced by operator uint64_t(), llvm::PrintStatistics(), and llvm::PrintStatisticsJSON().

◆ init()

TrackingStatistic & llvm::TrackingStatistic::init ( )
inlineprotected

◆ operator uint64_t()

llvm::TrackingStatistic::operator uint64_t ( ) const
inline

Definition at line 71 of file Statistic.h.

References getValue().

◆ operator++() [1/2]

const TrackingStatistic & llvm::TrackingStatistic::operator++ ( )
inline

Definition at line 78 of file Statistic.h.

References init(), TrackingStatistic(), and Value.

◆ operator++() [2/2]

uint64_t llvm::TrackingStatistic::operator++ ( int )
inline

Definition at line 83 of file Statistic.h.

References init(), and Value.

◆ operator+=()

const TrackingStatistic & llvm::TrackingStatistic::operator+= ( uint64_t V)
inline

Definition at line 98 of file Statistic.h.

References init(), TrackingStatistic(), and Value.

◆ operator--() [1/2]

const TrackingStatistic & llvm::TrackingStatistic::operator-- ( )
inline

Definition at line 88 of file Statistic.h.

References init(), TrackingStatistic(), and Value.

◆ operator--() [2/2]

uint64_t llvm::TrackingStatistic::operator-- ( int )
inline

Definition at line 93 of file Statistic.h.

References init(), and Value.

◆ operator-=()

const TrackingStatistic & llvm::TrackingStatistic::operator-= ( uint64_t V)
inline

Definition at line 105 of file Statistic.h.

References init(), TrackingStatistic(), and Value.

◆ operator=()

const TrackingStatistic & llvm::TrackingStatistic::operator= ( uint64_t Val)
inline

Definition at line 73 of file Statistic.h.

References init(), TrackingStatistic(), and Value.

◆ RegisterStatistic()

void TrackingStatistic::RegisterStatistic ( )
protected

RegisterStatistic - The first time a statistic is bumped, this method is called.

Definition at line 98 of file Statistic.cpp.

References Enabled, EnableStats, Initialized, StatInfo, and StatLock.

Referenced by init().

◆ updateMax()

void llvm::TrackingStatistic::updateMax ( uint64_t V)
inline

Definition at line 112 of file Statistic.h.

References init(), and Value.

Member Data Documentation

◆ DebugType

const char* const llvm::TrackingStatistic::DebugType

Definition at line 52 of file Statistic.h.

Referenced by getDebugType(), and TrackingStatistic().

◆ Desc

const char* const llvm::TrackingStatistic::Desc

Definition at line 54 of file Statistic.h.

Referenced by getDesc(), and TrackingStatistic().

◆ Initialized

std::atomic<bool> llvm::TrackingStatistic::Initialized

Definition at line 57 of file Statistic.h.

Referenced by init(), RegisterStatistic(), and TrackingStatistic().

◆ Name

const char* const llvm::TrackingStatistic::Name

Definition at line 53 of file Statistic.h.

Referenced by getName(), and TrackingStatistic().

◆ Value

std::atomic<uint64_t> llvm::TrackingStatistic::Value

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