LLVM  6.0.0svn
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
 
bool Initialized
 

Protected Member Functions

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

Detailed Description

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

References name.

◆ getDebugType()

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

Definition at line 48 of file Statistic.h.

References DebugType.

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

◆ getDesc()

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

Definition at line 50 of file Statistic.h.

References Desc.

Referenced by llvm::AreStatisticsEnabled().

◆ getName()

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

Definition at line 49 of file Statistic.h.

References Name.

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

◆ getValue()

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

Definition at line 47 of file Statistic.h.

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

◆ init()

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

◆ operator unsigned()

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

Definition at line 62 of file Statistic.h.

References getValue().

◆ operator++() [1/2]

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

Definition at line 70 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator++() [2/2]

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

Definition at line 75 of file Statistic.h.

References init().

◆ operator+=()

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

Definition at line 90 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator--() [1/2]

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

Definition at line 80 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator--() [2/2]

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

Definition at line 85 of file Statistic.h.

References init().

◆ operator-=()

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

Definition at line 97 of file Statistic.h.

References init().

Referenced by updateMax().

◆ operator=()

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

Definition at line 65 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 79 of file Statistic.cpp.

References llvm::TimerGroup::ConstructTimerLists(), llvm::sys::MemoryFence(), llvm::PrintStatistics(), Stats, TsanHappensBefore, TsanIgnoreWritesBegin, and TsanIgnoreWritesEnd.

Referenced by init().

◆ updateMax()

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

Definition at line 104 of file Statistic.h.

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

Member Data Documentation

◆ DebugType

const char* llvm::Statistic::DebugType

Definition at line 41 of file Statistic.h.

Referenced by getDebugType().

◆ Desc

const char* llvm::Statistic::Desc

Definition at line 43 of file Statistic.h.

Referenced by getDesc().

◆ Initialized

bool llvm::Statistic::Initialized

Definition at line 45 of file Statistic.h.

Referenced by init().

◆ Name

const char* llvm::Statistic::Name

Definition at line 42 of file Statistic.h.

Referenced by getName().

◆ Value

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

Definition at line 44 of file Statistic.h.


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