![]() |
VR-Forces Developer's Guide
|
Static facade controlling the Tracy performance profiler in VR-Forces.
DtProfiler is the single entry point for turning Tracy profiling on and off, configuring per-module trace levels and callstack capture depth, and exposing the "tracy" console command. The profiling marker macros declared further below (DtPROFILE, DtPROFILELEVEL, DtProfilerFrameMark, ...) consult this class at runtime to decide whether and how each instrumented zone is recorded.
Static Public Member Functions | |
| static void | initializeConsoleCommands () |
| static void | setCollectTracyStats (bool b) |
| static void | setCollectTracyStatsWithoutStartup (bool b) |
| static void | setStartupTracyWithoutCollect (bool b) |
| static bool | collectTracyStats () |
| static int | tracyModuleLevel (size_t moduleNameHash) |
| static size_t | addExternalModule (const std::string &Module) |
| static void | Shutdown () |
| static unsigned int | tracyCallstackDepth () |
| static void | setTracyCallstackDepth (unsigned int depth) |
Static Public Attributes | |
| static size_t | theTerrainModuleName |
| static size_t | theVrfUtilModuleName |
| static unsigned int | theTracyCallstackDepth |
|
static |
Registers the "tracy" console command with the global console command manager.
Call once at start-up so profiling can be controlled from the console, e.g. "tracy enable terrain:2 vrfutil:1".
|
static |
Enables or disables collection of Tracy profiling statistics.
When enabling, the Tracy profiler is started up first if it is not already running.
| b | true to begin recording profiling zones, false to stop. |
|
static |
Sets the collect-statistics flag without starting up the profiler.
Use when the profiler is already running (or must not be started here) and only the collection flag should change.
| b | true to mark statistics as being collected, false otherwise. |
|
static |
Starts up or shuts down the Tracy profiler without changing the collect-statistics flag.
Lets the Tracy server connection be established (or torn down) ahead of time so collection can later be toggled with no start-up cost.
| b | true to start up the profiler, false to shut it down. |
|
static |
Indicates whether Tracy statistics collection is currently active.
|
static |
Returns the user-configured trace level for a module.
Modules are identified by the hash of their name (e.g. std::hash<std::string>{}("terrain")). The leveled marker macros compare this value against their own level argument to decide whether to record.
| moduleNameHash | Hash of the module name to query. |
|
static |
Registers an external module so it can use the leveled profiling markers.
Intended for customer plug-ins that want their own per-module trace level.
| Module | Human-readable module name to register. |
|
static |
Shuts down the Tracy profiler, flushing and releasing its resources.
Returns the callstack capture depth applied when recording zones.
Sets the callstack capture depth applied when recording zones.
Greater depth yields richer call information at a higher runtime cost.
| depth | Number of stack frames to capture per zone (0 disables capture). |
|
static |
Hash of the "terrain" module name, for use with the leveled markers.
|
static |
Hash of the "vrfutil" module name, for use with the leveled markers.
Current callstack capture depth applied to recorded zones.