Ion
|
Singleton class that augments CallTraceManager with VSync tracing support. More...
#include "vsyncprofiler.h"
Public Member Functions | |
VSyncProfiler () | |
VSyncProfiler (ion::profile::CallTraceManager *manager) | |
For internal use and testing purposes only. More... | |
~VSyncProfiler () | |
void | RecordVSyncEvent (uint32 timestamp, uint32 vsync_number) |
Records a VSync event at given timestamp . More... | |
Static Public Member Functions | |
static VSyncProfiler * | Get () |
Gets the VSyncProfiler singleton instance. More... | |
Singleton class that augments CallTraceManager with VSync tracing support.
VSync events are often asynchronously recorded (i.e., there is no callback when VSync happens so they can be recorded based on the wall clock time,) and therefore this class expects the caller to provide a VSync timestamp, either in the past or in the future. The VSync events are recorded as WTF timeStamp events in a named TraceRecorder "kRecorderVSync".
It is the caller's responsibility to make sure the timestamps provided to this class are monotonically increasing. Invalid timestamps will be ignored.
Definition at line 39 of file vsyncprofiler.h.
ion::profile::VSyncProfiler::VSyncProfiler | ( | ) |
Definition at line 35 of file vsyncprofiler.cc.
|
explicit |
For internal use and testing purposes only.
User code should only call the default constructor.
Definition at line 39 of file vsyncprofiler.cc.
References DCHECK.
|
inline |
Definition at line 49 of file vsyncprofiler.h.
|
static |
Gets the VSyncProfiler singleton instance.
Definition at line 30 of file vsyncprofiler.cc.
References ION_DECLARE_SAFE_STATIC_POINTER.
void ion::profile::VSyncProfiler::RecordVSyncEvent | ( | uint32 | timestamp, |
uint32 | vsync_number | ||
) |
Records a VSync event at given timestamp
.
Definition at line 46 of file vsyncprofiler.cc.
References ion::profile::TraceRecorder::CreateTimeStampAtTime(), LOG_ONCE, ion::base::ValueToString(), and ion::port::WARNING.