LLVM API Documentation
#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>
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 std::map<std::string, std::pair<TimerGroup, Name2Timer> > Name2Pair [static] |
typedef std::map<std::string, Timer> Name2Timer [static] |
| static TimerGroup* getDefaultTimerGroup | ( | ) | [static] |
| static std::string& getLibSupportInfoOutputFilename | ( | ) | [static] |
| static size_t getMemUsage | ( | ) | [inline, static] |
Definition at line 96 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, | |
| const std::string & | GroupName | |||
| ) | [static] |
| static Timer& getNamedRegionTimer | ( | const std::string & | Name | ) | [static] |
| static TimeRecord getTimeRecord | ( | bool | Start | ) | [static] |
Definition at line 107 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 printVal | ( | double | Val, | |
| double | Total, | |||
| std::ostream & | OS | |||
| ) | [static] |
Definition at line 254 of file Timer.cpp.
References printAlignedFP().
Referenced by llvm::Timer::print().
ManagedStatic<std::vector<Timer*> > ActiveTimers [static] |
TimerGroup* DefaultTimerGroup = 0 [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] |
ManagedStatic<std::string> LibSupportInfoOutputFilename [static] |
ManagedStatic<Name2Pair> NamedGroupedTimers [static] |
ManagedStatic<Name2Timer> NamedTimers [static] |
cl::opt<bool> TrackSpace("track-memory", cl::desc("Enable -time-passes memory ""tracking (this may be slow)"), cl::Hidden) [static] |
Referenced by getMemUsage().