LLVM  8.0.1
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
llvm::Statistic Class Reference

#include "llvm/ADT/Statistic.h"

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

Public Member Functions

unsigned getValue () const
 
const chargetDebugType () const
 
const chargetName () const
 
const chargetDesc () const
 
void construct (const char *debugtype, const char *name, const char *desc)
 construct - This should only be called for non-global statistics. More...
 
 operator unsigned () const
 
const Statisticoperator= (unsigned Val)
 
const Statisticoperator++ ()
 
unsigned operator++ (int)
 
const Statisticoperator-- ()
 
unsigned operator-- (int)
 
const Statisticoperator+= (unsigned V)
 
const Statisticoperator-= (unsigned V)
 
void updateMax (unsigned V)
 

Public Attributes

const charDebugType
 
const charName
 
const charDesc
 
std::atomic< unsignedValue
 
std::atomic< boolInitialized
 

Protected Member Functions

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

Detailed Description

Definition at line 48 of file Statistic.h.

Member Function Documentation

◆ construct()

void llvm::Statistic::construct ( const char debugtype,
const char name,
const char desc 
)
inline

construct - This should only be called for non-global statistics.

Definition at line 62 of file Statistic.h.

References name.

◆ getDebugType()

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

Definition at line 57 of file Statistic.h.

References DebugType.

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

◆ getDesc()

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

Definition at line 59 of file Statistic.h.

References Desc.

Referenced by llvm::AreStatisticsEnabled().

◆ getName()

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

Definition at line 58 of file Statistic.h.

References Name.

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

◆ getValue()

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

Definition at line 56 of file Statistic.h.

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

◆ init()

Statistic& llvm::Statistic::init ( )
inlineprotected

Definition at line 158 of file Statistic.h.

References RegisterStatistic().

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

◆ operator unsigned()

llvm::Statistic::operator unsigned ( ) const
inline

Definition at line 71 of file Statistic.h.

References getValue().

◆ operator++() [1/2]

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

Definition at line 79 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator++() [2/2]

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

Definition at line 84 of file Statistic.h.

References init().

◆ operator+=()

const Statistic& llvm::Statistic::operator+= ( unsigned  V)
inline

Definition at line 99 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator--() [1/2]

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

Definition at line 89 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator--() [2/2]

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

Definition at line 94 of file Statistic.h.

References init().

◆ operator-=()

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

Definition at line 106 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator=()

const Statistic& llvm::Statistic::operator= ( unsigned  Val)
inline

Definition at line 74 of file Statistic.h.

References init().

Referenced by updateMax().

◆ RegisterStatistic()

void Statistic::RegisterStatistic ( )
protected

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

Definition at line 94 of file Statistic.cpp.

References llvm::TimerGroup::ConstructTimerLists(), llvm::Lock, llvm::PrintStatistics(), SI, StatInfo, StatLock, and Stats.

Referenced by init().

◆ updateMax()

void llvm::Statistic::updateMax ( unsigned  V)
inline

Definition at line 113 of file Statistic.h.

References init(), operator++(), operator+=(), operator--(), operator-=(), and operator=().

Member Data Documentation

◆ DebugType

const char* llvm::Statistic::DebugType

Definition at line 50 of file Statistic.h.

Referenced by getDebugType().

◆ Desc

const char* llvm::Statistic::Desc

Definition at line 52 of file Statistic.h.

Referenced by getDesc().

◆ Initialized

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

Definition at line 54 of file Statistic.h.

◆ Name

const char* llvm::Statistic::Name

Definition at line 51 of file Statistic.h.

Referenced by getName().

◆ Value

std::atomic<unsigned> llvm::Statistic::Value

Definition at line 53 of file Statistic.h.


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