LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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:

Include dependency graph

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::string & getLibSupportInfoOutputFilename ()
TimerGroupgetDefaultTimerGroup ()
size_t getMemUsage ()
TimeRecord getTimeRecord (bool Start)
TimergetNamedRegionTimer (const std::string &Name)
TimergetNamedRegionTimer (const std::string &Name, const std::string &GroupName)
void printAlignedFP (double Val, unsigned AfterDec, unsigned TotalWidth, std::ostream &OS)
void printVal (double Val, double Total, std::ostream &OS)

Variables

ManagedStatic< std::string > LibSupportInfoOutputFilename
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()))
TimerGroupDefaultTimerGroup = 0
ManagedStatic< std::vector<
Timer * > > 
ActiveTimers
ManagedStatic< Name2TimerNamedTimers
ManagedStatic< Name2PairNamedGroupedTimers


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.

Referenced by getNamedRegionTimer().


Function Documentation

TimerGroup* getDefaultTimerGroup  )  [static]
 

Definition at line 54 of file Timer.cpp.

References DefaultTimerGroup.

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

std::string& getLibSupportInfoOutputFilename  )  [static]
 

Definition at line 37 of file Timer.cpp.

Referenced by llvm::GetLibSupportInfoOutputFile().

size_t getMemUsage  )  [inline, static]
 

Definition at line 96 of file Timer.cpp.

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

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

Definition at line 204 of file Timer.cpp.

References Name2Timer, and NamedGroupedTimers.

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

Definition at line 196 of file Timer.cpp.

References NamedTimers.

Referenced by llvm::NamedRegionTimer::NamedRegionTimer().

TimeRecord getTimeRecord bool  Start  )  [static]
 

Definition at line 107 of file Timer.cpp.

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

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

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

Definition at line 238 of file Timer.cpp.

Referenced by printVal().

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.

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

TimerGroup* DefaultTimerGroup = 0 [static]
 

Definition at line 53 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]
 

ManagedStatic<std::string> LibSupportInfoOutputFilename [static]
 

Definition at line 36 of file Timer.cpp.

Referenced by llvm::GetLibSupportInfoOutputFile().

ManagedStatic<Name2Pair> NamedGroupedTimers [static]
 

Definition at line 194 of file Timer.cpp.

Referenced by getNamedRegionTimer().

ManagedStatic<Name2Timer> NamedTimers [static]
 

Definition at line 192 of file Timer.cpp.

Referenced by getNamedRegionTimer().

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




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.