Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::profile::VSyncProfiler Class Reference

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 VSyncProfilerGet ()
 Gets the VSyncProfiler singleton instance. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

ion::profile::VSyncProfiler::VSyncProfiler ( )

Definition at line 35 of file vsyncprofiler.cc.

ion::profile::VSyncProfiler::VSyncProfiler ( ion::profile::CallTraceManager manager)
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.

ion::profile::VSyncProfiler::~VSyncProfiler ( )
inline

Definition at line 49 of file vsyncprofiler.h.

Member Function Documentation

VSyncProfiler * ion::profile::VSyncProfiler::Get ( )
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.


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