LLVM API Documentation

Timer.cpp File Reference

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

Include dependency graph for Timer.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  TimeRecord

Typedefs

typedef std::map< std::string,
Timer > 
Name2Timer
typedef std::map< std::string,
std::pair< TimerGroup,
Name2Timer > > 
Name2Pair

Functions

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

Variables

static ManagedStatic< std::string > LibSupportInfoOutputFilename
static cl::opt< bool > TrackSpace ("track-memory", cl::desc("Enable -time-passes memory ""tracking (this may be slow)"), cl::Hidden)
static 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 TimerGroup * DefaultTimerGroup = 0
static ManagedStatic
< std::vector< Timer * > > 
ActiveTimers
static ManagedStatic< Name2Timer > NamedTimers
static ManagedStatic< Name2Pair > NamedGroupedTimers


Typedef Documentation

typedef std::map<std::string, std::pair<TimerGroup, Name2Timer> > Name2Pair [static]

Definition at line 188 of file Timer.cpp.

typedef std::map<std::string, Timer> Name2Timer [static]

Definition at line 187 of file Timer.cpp.


Function Documentation

static TimerGroup* getDefaultTimerGroup (  )  [static]

Definition at line 54 of file Timer.cpp.

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

Definition at line 37 of file Timer.cpp.

Referenced by llvm::GetLibSupportInfoOutputFile().

static size_t getMemUsage (  )  [inline, static]

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

Definition at line 204 of file Timer.cpp.

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

Definition at line 196 of file Timer.cpp.

static TimeRecord getTimeRecord ( bool  Start  )  [static]

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

Definition at line 238 of file Timer.cpp.

Referenced by printVal().

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

Definition at line 254 of file Timer.cpp.

References printAlignedFP().

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


Variable Documentation

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

Definition at line 131 of file Timer.cpp.

Definition at line 53 of file Timer.cpp.

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]

Definition at line 36 of file Timer.cpp.

Definition at line 194 of file Timer.cpp.

Definition at line 192 of file Timer.cpp.

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

Referenced by getMemUsage().