LLVM 22.0.0git
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/raw_ostream.h"
#include <limits>
#include <optional>

Go to the source code of this file.

Classes

class  llvm::TimerGlobals

Functions

static std::stringlibSupportInfoOutputFilename ()
static bool trackSpace ()
static bool sortTimers ()
static SignpostEmittersignposts ()
static sys::SmartMutex< true > & timerLock ()
static TimerGroupdefaultTimerGroup ()
static Name2PairMap & namedGroupedTimers ()
static bool isTimerGlobalsConstructed ()
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()

TimerGroup & defaultTimerGroup ( )
static

Definition at line 560 of file Timer.cpp.

References ManagedTimerGlobals.

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

◆ getCurInstructionsExecuted()

uint64_t getCurInstructionsExecuted ( )
static

Definition at line 117 of file Timer.cpp.

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

◆ getMemUsage()

size_t getMemUsage ( )
inlinestatic

Definition at line 111 of file Timer.cpp.

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

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

◆ isTimerGlobalsConstructed()

bool isTimerGlobalsConstructed ( )
static

Definition at line 574 of file Timer.cpp.

References ManagedTimerGlobals.

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

◆ libSupportInfoOutputFilename()

std::string & libSupportInfoOutputFilename ( )
static

Definition at line 551 of file Timer.cpp.

References ManagedTimerGlobals.

Referenced by llvm::CreateInfoOutputFile().

◆ namedGroupedTimers()

Name2PairMap & namedGroupedTimers ( )
static

◆ printVal()

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

Definition at line 179 of file Timer.cpp.

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

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

◆ signposts()

SignpostEmitter & signposts ( )
static

Definition at line 556 of file Timer.cpp.

References ManagedTimerGlobals.

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

◆ sortTimers()

bool sortTimers ( )
static

Definition at line 555 of file Timer.cpp.

References ManagedTimerGlobals.

◆ timerLock()

◆ trackSpace()

bool trackSpace ( )
static

Definition at line 554 of file Timer.cpp.

References ManagedTimerGlobals.

Referenced by getMemUsage().

Variable Documentation

◆ ManagedTimerGlobals

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

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