LLVM  16.0.0git
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
llvm::TrackingStatistic Class Reference

#include "llvm/ADT/Statistic.h"

Collaboration diagram for llvm::TrackingStatistic:
Collaboration graph
[legend]

Public Member Functions

constexpr TrackingStatistic (const char *DebugType, const char *Name, const char *Desc)
 
const char * getDebugType () const
 
const char * getName () const
 
const char * getDesc () 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< bool > Initialized
 

Protected Member Functions

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

Detailed Description

Definition at line 50 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 59 of file Statistic.h.

Member Function Documentation

◆ getDebugType()

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

Definition at line 64 of file Statistic.h.

References DebugType.

◆ getDesc()

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

Definition at line 66 of file Statistic.h.

References Desc.

◆ getName()

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

Definition at line 65 of file Statistic.h.

References Name.

◆ getValue()

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

Definition at line 68 of file Statistic.h.

Referenced by operator uint64_t().

◆ init()

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

Definition at line 123 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 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().

◆ operator++() [2/2]

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

Definition at line 83 of file Statistic.h.

References init().

◆ operator+=()

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

Definition at line 98 of file Statistic.h.

References init().

◆ operator--() [1/2]

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

Definition at line 88 of file Statistic.h.

References init().

◆ operator--() [2/2]

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

Definition at line 93 of file Statistic.h.

References init().

◆ operator-=()

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

Definition at line 105 of file Statistic.h.

References init().

◆ operator=()

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

Definition at line 73 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, SI, 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().

Member Data Documentation

◆ DebugType

const char* const llvm::TrackingStatistic::DebugType

Definition at line 52 of file Statistic.h.

Referenced by getDebugType().

◆ Desc

const char* const llvm::TrackingStatistic::Desc

Definition at line 54 of file Statistic.h.

Referenced by getDesc().

◆ Initialized

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

Definition at line 57 of file Statistic.h.

Referenced by init(), and RegisterStatistic().

◆ Name

const char* const llvm::TrackingStatistic::Name

Definition at line 53 of file Statistic.h.

Referenced by getName().

◆ Value

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

Definition at line 56 of file Statistic.h.


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