#include <Profiler2.h>
|
static const size_t | MAX_ATTRIBUTE_LENGTH = 256 |
|
static const u8 | RESYNC_MAGIC [8] = {0x11, 0x22, 0x33, 0x44, 0xf4, 0x93, 0xbe, 0x15} |
| An arbitrary number to help resyncing with the item stream when parsing. More...
|
|
|
static void | TLSDtor (void *data) |
| Called by pthreads when a registered thread is destroyed. More...
|
|
Definition at line 91 of file Profiler2.h.
Item type identifiers.
Enumerator |
---|
ITEM_NOP |
|
ITEM_SYNC |
|
ITEM_EVENT |
|
ITEM_ENTER |
|
ITEM_LEAVE |
|
ITEM_ATTRIBUTE |
|
Definition at line 99 of file Profiler2.h.
CProfiler2::CProfiler2 |
( |
| ) |
|
CProfiler2::~CProfiler2 |
( |
| ) |
|
void CProfiler2::ConstructJSONOverview |
( |
std::ostream & |
stream | ) |
|
Call in any thread to produce a JSON representation of the general state of the application.
Definition at line 325 of file Profiler2.cpp.
const char * CProfiler2::ConstructJSONResponse |
( |
std::ostream & |
stream, |
|
|
const std::string & |
thread |
|
) |
| |
Call in any thread to produce a JSON representation of the buffer for a given thread.
Returns NULL on success, or an error string.
Definition at line 502 of file Profiler2.cpp.
void CProfiler2::EnableGPU |
( |
| ) |
|
Call in main thread to enable the GPU profiling support, after OpenGL has been initialised.
Definition at line 174 of file Profiler2.cpp.
void CProfiler2::EnableHTTP |
( |
| ) |
|
Call in main thread to enable the HTTP server.
(Disabled by default for security and performance and to avoid annoying a firewall.)
Definition at line 157 of file Profiler2.cpp.
int CProfiler2::GetFrameNumber |
( |
| ) |
|
|
inline |
double CProfiler2::GetTime |
( |
| ) |
|
|
inline |
void CProfiler2::IncrementFrameNumber |
( |
| ) |
|
|
inline |
void CProfiler2::Initialise |
( |
| ) |
|
Call in main thread to set up the profiler, before calling any other profiler functions.
Definition at line 141 of file Profiler2.cpp.
void CProfiler2::InitialiseGPU |
( |
| ) |
|
|
private |
void CProfiler2::RecordAttribute |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
inline |
void CProfiler2::RecordEvent |
( |
const char * |
id | ) |
|
|
inline |
void CProfiler2::RecordFrameStart |
( |
| ) |
|
|
inline |
Call in main thread at the start of a frame.
Definition at line 304 of file Profiler2.h.
void CProfiler2::RecordGPUFrameEnd |
( |
| ) |
|
void CProfiler2::RecordGPUFrameStart |
( |
| ) |
|
void CProfiler2::RecordGPURegionEnter |
( |
const char * |
id | ) |
|
void CProfiler2::RecordGPURegionLeave |
( |
const char * |
id | ) |
|
void CProfiler2::RecordRegionEnter |
( |
const char * |
id | ) |
|
|
inline |
void CProfiler2::RecordRegionLeave |
( |
const char * |
id | ) |
|
|
inline |
void CProfiler2::RecordSyncMarker |
( |
| ) |
|
|
inline |
Non-main threads should call this occasionally, especially if it's been a long time since their last call to the profiler, or if they've made thousands of calls since the last sync marker.
Definition at line 296 of file Profiler2.h.
void CProfiler2::RegisterCurrentThread |
( |
const std::string & |
name | ) |
|
Call in any thread to enable the profiler in that thread.
name
should be unique, and is used by the visualiser to identify this thread.
Definition at line 241 of file Profiler2.cpp.
void CProfiler2::SaveToFile |
( |
| ) |
|
Call in any thread to save a JSONP representation of the buffers for all threads, to a file named profile2.jsonp in the logs directory.
Definition at line 540 of file Profiler2.cpp.
void CProfiler2::Shutdown |
( |
void |
| ) |
|
Call in main thread to shut everything down.
All other profiled threads should have been terminated already.
Definition at line 186 of file Profiler2.cpp.
void CProfiler2::ShutdownGPU |
( |
| ) |
|
Call in main thread to shut down the GPU profiling support, before shutting down OpenGL.
Definition at line 181 of file Profiler2.cpp.
void CProfiler2::TLSDtor |
( |
void * |
data | ) |
|
|
staticprivate |
Called by pthreads when a registered thread is destroyed.
Definition at line 232 of file Profiler2.cpp.
const size_t CProfiler2::BUFFER_SIZE = 1024*1024 |
|
staticprivate |
int CProfiler2::m_FrameNumber |
|
private |
bool CProfiler2::m_Initialised |
|
private |
const size_t CProfiler2::MAX_ATTRIBUTE_LENGTH = 256 |
|
static |
const u8 CProfiler2::RESYNC_MAGIC = {0x11, 0x22, 0x33, 0x44, 0xf4, 0x93, 0xbe, 0x15} |
|
static |
An arbitrary number to help resyncing with the item stream when parsing.
Definition at line 112 of file Profiler2.h.
The documentation for this class was generated from the following files: