LLDB  mainline
Classes | Namespaces | Macros | Functions
Timer.h File Reference
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/Signposts.h"
#include <atomic>
#include <cstdint>
Include dependency graph for Timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lldb_private::Timer
 
class  lldb_private::Timer::Category
 

Namespaces

 llvm
 
 lldb_private
 A class that represents a running process on the host machine.
 

Macros

#define LLDB_SCOPED_TIMER()
 
#define LLDB_SCOPED_TIMERF(FMT, ...)
 

Functions

llvm::SignpostEmitter & lldb_private::GetSignposts ()
 

Macro Definition Documentation

◆ LLDB_SCOPED_TIMER

#define LLDB_SCOPED_TIMER ( )
Value:
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION); \
SIGNPOST_EMITTER_START_INTERVAL(::lldb_private::GetSignposts(), \
&_scoped_timer, "%s", LLVM_PRETTY_FUNCTION); \
auto _scoped_signpost = llvm::make_scope_exit([&_scoped_timer]() { \
::lldb_private::GetSignposts().endInterval(&_scoped_timer); \
})

Definition at line 90 of file Timer.h.

◆ LLDB_SCOPED_TIMERF

#define LLDB_SCOPED_TIMERF (   FMT,
  ... 
)
Value:
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
::lldb_private::Timer _scoped_timer(_cat, FMT, __VA_ARGS__); \
SIGNPOST_EMITTER_START_INTERVAL(::lldb_private::GetSignposts(), \
&_scoped_timer, FMT, __VA_ARGS__); \
auto _scoped_signpost = llvm::make_scope_exit([&_scoped_timer]() { \
::lldb_private::GetSignposts().endInterval(&_scoped_timer); \
})

Definition at line 99 of file Timer.h.

lldb_private::Timer
Definition: Timer.h:28
lldb_private::GetSignposts
llvm::SignpostEmitter & GetSignposts()
Definition: Timer.cpp:36