LLVM API Documentation

Public Member Functions | Friends
llvm::Timer Class Reference

#include <Timer.h>

List of all members.

Public Member Functions

 Timer (StringRef N)
 Timer (StringRef N, TimerGroup &tg)
 Timer (const Timer &RHS)
const Timeroperator= (const Timer &T)
 ~Timer ()
 Timer ()
void init (StringRef N)
void init (StringRef N, TimerGroup &tg)
const std::string & getName () const
bool isInitialized () const
void startTimer ()
void stopTimer ()

Friends

class TimerGroup

Detailed Description

Timer - This class is used to track the amount of time spent between invocations of its startTimer()/stopTimer() methods. Given appropriate OS support it can also keep track of the RSS of the program at various points. By default, the Timer will print the amount of time it has captured to standard error when the last timer is destroyed, otherwise it is printed when its TimerGroup is destroyed. Timers do not print their information if they are never started.

Definition at line 80 of file Timer.h.


Constructor & Destructor Documentation

llvm::Timer::Timer ( StringRef  N) [inline, explicit]

Definition at line 88 of file Timer.h.

References init().

llvm::Timer::Timer ( StringRef  N,
TimerGroup tg 
) [inline]

Definition at line 89 of file Timer.h.

References init().

llvm::Timer::Timer ( const Timer RHS) [inline]

Definition at line 90 of file Timer.h.

Definition at line 119 of file Timer.cpp.

llvm::Timer::Timer ( ) [inline, explicit]

Definition at line 100 of file Timer.h.


Member Function Documentation

const std::string& llvm::Timer::getName ( ) const [inline]

Definition at line 104 of file Timer.h.

void Timer::init ( StringRef  N)

Definition at line 103 of file Timer.cpp.

References llvm::StringRef::begin(), llvm::StringRef::end(), and getDefaultTimerGroup().

Referenced by getNamedRegionTimer(), and Timer().

void Timer::init ( StringRef  N,
TimerGroup tg 
)

Definition at line 111 of file Timer.cpp.

References llvm::StringRef::begin(), and llvm::StringRef::end().

bool llvm::Timer::isInitialized ( ) const [inline]

Definition at line 105 of file Timer.h.

Referenced by getNamedRegionTimer().

const Timer& llvm::Timer::operator= ( const Timer T) [inline]

Definition at line 93 of file Timer.h.

startTimer - Start the timer running. Time between calls to startTimer/stopTimer is counted by the Timer class. Note that these calls must be correctly paired.

Definition at line 149 of file Timer.cpp.

References ActiveTimers, and llvm::TimeRecord::getCurrentTime().

void Timer::stopTimer ( )

stopTimer - Stop the timer.

Definition at line 155 of file Timer.cpp.

References ActiveTimers, llvm::TimeRecord::getCurrentTime(), and I.


Friends And Related Function Documentation

friend class TimerGroup [friend]

Definition at line 118 of file Timer.h.


The documentation for this class was generated from the following files: