LLVM  13.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
 
unsigned getValue () const
 
 operator unsigned () const
 
const TrackingStatisticoperator= (unsigned Val)
 
const TrackingStatisticoperator++ ()
 
unsigned operator++ (int)
 
const TrackingStatisticoperator-- ()
 
unsigned operator-- (int)
 
const TrackingStatisticoperator+= (unsigned V)
 
const TrackingStatisticoperator-= (unsigned V)
 
void updateMax (unsigned V)
 

Public Attributes

const char *const DebugType
 
const char *const Name
 
const char *const Desc
 
std::atomic< unsigned > Value
 
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 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.

Referenced by llvm::PrintStatisticsJSON().

◆ getDesc()

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

Definition at line 65 of file Statistic.h.

References Desc.

Referenced by reportInvalidCandidate().

◆ getName()

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

Definition at line 64 of file Statistic.h.

References Name.

Referenced by llvm::PrintStatisticsJSON().

◆ getValue()

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

Definition at line 67 of file Statistic.h.

Referenced by operator unsigned(), and llvm::PrintStatisticsJSON().

◆ 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 unsigned()

llvm::TrackingStatistic::operator unsigned ( ) 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]

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

Definition at line 82 of file Statistic.h.

References init().

◆ operator+=()

const TrackingStatistic& llvm::TrackingStatistic::operator+= ( unsigned  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]

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

Definition at line 92 of file Statistic.h.

References init().

◆ operator-=()

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

Definition at line 104 of file Statistic.h.

References init().

◆ operator=()

const TrackingStatistic& llvm::TrackingStatistic::operator= ( unsigned  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 91 of file Statistic.cpp.

References Enabled, EnableStats, Initialized, llvm::Lock, SI, StatInfo, and StatLock.

Referenced by init().

◆ updateMax()

void llvm::TrackingStatistic::updateMax ( unsigned  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<unsigned> llvm::TrackingStatistic::Value

Definition at line 55 of file Statistic.h.


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