LLVM 20.0.0git
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
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 ()
 
void RegisterStatistic ()
 RegisterStatistic - The first time a statistic is bumped, this method is called.
 

Detailed Description

Definition at line 49 of file Statistic.h.

Constructor & Destructor Documentation

◆ TrackingStatistic()

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

Definition at line 58 of file Statistic.h.

Member Function Documentation

◆ getDebugType()

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

Definition at line 63 of file Statistic.h.

References DebugType.

◆ getDesc()

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

Definition at line 65 of file Statistic.h.

References Desc.

◆ getName()

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

Definition at line 64 of file Statistic.h.

References Name.

◆ getValue()

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

Definition at line 67 of file Statistic.h.

Referenced by operator uint64_t().

◆ init()

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

Definition at line 122 of file Statistic.h.

References Initialized, and RegisterStatistic().

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

◆ operator uint64_t()

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

Definition at line 70 of file Statistic.h.

References getValue().

◆ operator++() [1/2]

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

Definition at line 77 of file Statistic.h.

References init().

◆ operator++() [2/2]

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

Definition at line 82 of file Statistic.h.

References init().

◆ operator+=()

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

Definition at line 97 of file Statistic.h.

References init().

◆ operator--() [1/2]

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

Definition at line 87 of file Statistic.h.

References init().

◆ operator--() [2/2]

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

Definition at line 92 of file Statistic.h.

References init().

◆ operator-=()

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

Definition at line 104 of file Statistic.h.

References init().

◆ operator=()

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

Definition at line 72 of file Statistic.h.

References init().

◆ 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 111 of file Statistic.h.

References init().

Member Data Documentation

◆ DebugType

const char* const llvm::TrackingStatistic::DebugType

Definition at line 51 of file Statistic.h.

Referenced by getDebugType().

◆ Desc

const char* const llvm::TrackingStatistic::Desc

Definition at line 53 of file Statistic.h.

Referenced by getDesc().

◆ Initialized

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

Definition at line 56 of file Statistic.h.

Referenced by init(), and RegisterStatistic().

◆ Name

const char* const llvm::TrackingStatistic::Name

Definition at line 52 of file Statistic.h.

Referenced by getName().

◆ Value

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

Definition at line 55 of file Statistic.h.


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