LLVM 20.0.0git
Functions | Variables
Timer.cpp File Reference
#include "llvm/Support/Timer.h"
#include "DebugOptions.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Config/config.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signposts.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include <limits>

Go to the source code of this file.

Functions

static std::string & getLibSupportInfoOutputFilename ()
 
static TimerGroupgetDefaultTimerGroup ()
 
static size_t getMemUsage ()
 
static uint64_t getCurInstructionsExecuted ()
 
static void printVal (double Val, double Total, raw_ostream &OS)
 

Variables

static ManagedStatic< std::string > LibSupportInfoOutputFilename
 
static ManagedStatic< sys::SmartMutex< true > > TimerLock
 
static ManagedStatic< SignpostEmitterSignposts
 Allows llvm::Timer to emit signposts when supported.
 
static ManagedStatic< TimerGroup, CreateDefaultTimerGroup > DefaultTimerGroup
 
static ManagedStatic< Name2PairMap > NamedGroupedTimers
 
static TimerGroupTimerGroupList = nullptr
 This is the global list of TimerGroups, maintained by the TimerGroup ctor/dtor and is protected by the TimerLock lock.
 

Function Documentation

◆ getCurInstructionsExecuted()

static uint64_t getCurInstructionsExecuted ( )
static

Definition at line 157 of file Timer.cpp.

Referenced by llvm::TimeRecord::getCurrentTime().

◆ getDefaultTimerGroup()

static TimerGroup * getDefaultTimerGroup ( )
static

Definition at line 126 of file Timer.cpp.

References DefaultTimerGroup.

Referenced by llvm::Timer::init().

◆ getLibSupportInfoOutputFilename()

static std::string & getLibSupportInfoOutputFilename ( )
static

◆ getMemUsage()

static size_t getMemUsage ( )
inlinestatic

Definition at line 151 of file Timer.cpp.

References llvm::sys::Process::GetMallocUsage().

Referenced by llvm::TimeRecord::getCurrentTime().

◆ printVal()

static void printVal ( double  Val,
double  Total,
raw_ostream OS 
)
static

Definition at line 210 of file Timer.cpp.

References llvm::format(), OS, and llvm::Total.

Referenced by llvm::TimeRecord::print().

Variable Documentation

◆ DefaultTimerGroup

ManagedStatic<TimerGroup, CreateDefaultTimerGroup> DefaultTimerGroup
static

Definition at line 125 of file Timer.cpp.

Referenced by llvm::TimerGroup::aquireDefaultGroup(), and getDefaultTimerGroup().

◆ LibSupportInfoOutputFilename

ManagedStatic<std::string> LibSupportInfoOutputFilename
static

Definition at line 48 of file Timer.cpp.

Referenced by getLibSupportInfoOutputFilename().

◆ NamedGroupedTimers

ManagedStatic<Name2PairMap> NamedGroupedTimers
static

Definition at line 270 of file Timer.cpp.

Referenced by llvm::TimerGroup::constructForStatistics().

◆ Signposts

ManagedStatic<SignpostEmitter> Signposts
static

Allows llvm::Timer to emit signposts when supported.

Definition at line 56 of file Timer.cpp.

Referenced by llvm::Timer::startTimer(), and llvm::Timer::stopTimer().

◆ TimerGroupList

TimerGroup* TimerGroupList = nullptr
static

This is the global list of TimerGroups, maintained by the TimerGroup ctor/dtor and is protected by the TimerLock lock.

Definition at line 285 of file Timer.cpp.

Referenced by llvm::TimerGroup::clearAll(), llvm::TimerGroup::printAll(), llvm::TimerGroup::printAllJSONValues(), and llvm::TimerGroup::TimerGroup().

◆ TimerLock

ManagedStatic<sys::SmartMutex<true> > TimerLock
static