LLVM API Documentation

Timer.cpp File Reference

#include "llvm/Support/Timer.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/System/Process.h"
#include <algorithm>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>

Include dependency graph for Timer.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  TimeRecord

Functions

std::ostream * llvm::GetLibSupportInfoOutputFile ()
static std::string & getLibSupportInfoOutputFilename ()
static TimerGroupgetDefaultTimerGroup ()
static size_t getMemUsage ()
static TimeRecord getTimeRecord (bool Start)
static TimergetNamedRegionTimer (const std::string &Name)
static void printAlignedFP (double Val, unsigned AfterDec, unsigned TotalWidth, std::ostream &OS)
static void printVal (double Val, double Total, std::ostream &OS)
std::ostream * llvm::GetLibSupportInfoOutputFile ()

Variables

cl::opt< bool > TrackSpace ("track-memory", cl::desc("Enable -time-passes memory ""tracking (this may be slow)"), cl::Hidden)
cl::opt< std::string, true > InfoOutputFilename ("info-output-file", cl::value_desc("filename"), cl::desc("File to append -stats and -timer output to"), cl::Hidden, cl::location(getLibSupportInfoOutputFilename()))
static TimerGroupDefaultTimerGroup = 0
static std::vector< Timer * > ActiveTimers


Function Documentation

static TimerGroup* getDefaultTimerGroup (  )  [static]

Definition at line 53 of file Timer.cpp.

References DefaultTimerGroup.

static std::string& getLibSupportInfoOutputFilename (  )  [static]

Definition at line 35 of file Timer.cpp.

Referenced by llvm::GetLibSupportInfoOutputFile().

static size_t getMemUsage (  )  [inline, static]

Definition at line 95 of file Timer.cpp.

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

Referenced by llvm::Timer::addPeakMemoryMeasurement(), and getTimeRecord().

static Timer& getNamedRegionTimer ( const std::string &  Name  )  [static]

Definition at line 184 of file Timer.cpp.

static TimeRecord getTimeRecord ( bool  Start  )  [static]

Definition at line 106 of file Timer.cpp.

References TimeRecord::Elapsed, getMemUsage(), llvm::sys::Process::GetTimeUsage(), TimeRecord::MemUsed, llvm::sys::TimeValue::microseconds(), llvm::sys::TimeValue::seconds(), TimeRecord::SystemTime, and TimeRecord::UserTime.

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

static void printAlignedFP ( double  Val,
unsigned  AfterDec,
unsigned  TotalWidth,
std::ostream &  OS 
) [static]

Definition at line 205 of file Timer.cpp.

Referenced by printVal().

static void printVal ( double  Val,
double  Total,
std::ostream &  OS 
) [static]

Definition at line 221 of file Timer.cpp.

References printAlignedFP().

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


Variable Documentation

std::vector<Timer*> ActiveTimers [static]

Definition at line 130 of file Timer.cpp.

TimerGroup* DefaultTimerGroup = 0 [static]

Definition at line 52 of file Timer.cpp.

Referenced by getDefaultTimerGroup().

cl::opt<std::string, true> InfoOutputFilename("info-output-file", cl::value_desc("filename"), cl::desc("File to append -stats and -timer output to"), cl::Hidden, cl::location(getLibSupportInfoOutputFilename())) [static]

cl::opt<bool> TrackSpace("track-memory", cl::desc("Enable -time-passes memory ""tracking (this may be slow)"), cl::Hidden) [static]

Referenced by getMemUsage().