LLVM 20.0.0git
Classes | 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>
#include <optional>

Go to the source code of this file.

Classes

class  llvm::TimerGlobals
 

Functions

static std::string & libSupportInfoOutputFilename ()
 
static bool trackSpace ()
 
static bool sortTimers ()
 
static SignpostEmittersignposts ()
 
static sys::SmartMutex< true > & timerLock ()
 
static TimerGroupdefaultTimerGroup ()
 
static Name2PairMap & namedGroupedTimers ()
 
static size_t getMemUsage ()
 
static uint64_t getCurInstructionsExecuted ()
 
static void printVal (double Val, double Total, raw_ostream &OS)
 

Variables

static TimerGroupTimerGroupList = nullptr
 This is the global list of TimerGroups, maintained by the TimerGroup ctor/dtor and is protected by the timerLock lock.
 
static ManagedStatic< TimerGlobalsManagedTimerGlobals
 

Function Documentation

◆ defaultTimerGroup()

static TimerGroup & defaultTimerGroup ( )
static

Definition at line 538 of file Timer.cpp.

References ManagedTimerGlobals.

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

◆ getCurInstructionsExecuted()

static uint64_t getCurInstructionsExecuted ( )
static

Definition at line 117 of file Timer.cpp.

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

◆ getMemUsage()

static size_t getMemUsage ( )
inlinestatic

Definition at line 111 of file Timer.cpp.

References llvm::sys::Process::GetMallocUsage(), and trackSpace().

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

◆ libSupportInfoOutputFilename()

static std::string & libSupportInfoOutputFilename ( )
static

Definition at line 529 of file Timer.cpp.

References ManagedTimerGlobals.

Referenced by llvm::CreateInfoOutputFile().

◆ namedGroupedTimers()

static Name2PairMap & namedGroupedTimers ( )
static

Definition at line 541 of file Timer.cpp.

References ManagedTimerGlobals.

◆ printVal()

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

Definition at line 179 of file Timer.cpp.

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

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

◆ signposts()

static SignpostEmitter & signposts ( )
static

Definition at line 534 of file Timer.cpp.

References ManagedTimerGlobals.

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

◆ sortTimers()

static bool sortTimers ( )
static

Definition at line 533 of file Timer.cpp.

References ManagedTimerGlobals.

◆ timerLock()

static sys::SmartMutex< true > & timerLock ( )
static

◆ trackSpace()

static bool trackSpace ( )
static

Definition at line 532 of file Timer.cpp.

References ManagedTimerGlobals.

Referenced by getMemUsage().

Variable Documentation

◆ ManagedTimerGlobals

ManagedStatic<TimerGlobals> ManagedTimerGlobals
static

◆ 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 253 of file Timer.cpp.

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