Go to the source code of this file.
|
| #define | TRACY_ENABLE |
| |
| #define | DtPROFILEzone ZoneNamedS(___tracy_scoped_zone, makVrf::DtProfiler::tracyCallstackDepth(), makVrf::DtProfiler::collectTracyStats()); |
| |
| #define | DtPROFILE(name) |
| |
| #define | DtPROFILEC(name, color) |
| |
| #define | DtPROFILELEVEL(name, moduleName, level) |
| |
| #define | DtPROFILELEVELC(name, color, moduleName, level) |
| |
| #define | DtPROFILE_SECTION(name) |
| |
| #define | DtPROFILE_ZONE_TEXT(text) DtZoneSetText(___tracy_scoped_zone, text) |
| |
| #define | DtPROFILE_SECTION_END } |
| |
| #define | DtVRF_PROFILE(name) DtPROFILE(name) |
| |
| #define | DtVRF_PROFILE_FILE(name) DtPROFILE(name) |
| |
| #define | DtProfilerFrameMark |
| |
| #define | DtProfilerPlot(x, y) TracyPlot(x, y) |
| |
| #define | DtProfilerThreadName(name) tracy::SetThreadName(name); |
| |
| #define | DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen) |
| |
namespace makVrf
Compile-time switch that enables the Tracy profiler integration.
Defaulted to on so that the profiling marker macros below expand to real Tracy calls. VR-Forces has a library-by-library setting, but if a library forgot to include this macro the profiling commands would simply be preprocessed away, which is confusing. With this defined you instead get a linker error, making it obvious that the Tracy libraries must be linked in.
win32 creates macros that work with our stats and tracy
Profiles the enclosing scope, naming the zone after the current function.
Place at the top of a function or block to record a Tracy zone for it. The zone is captured only while DtProfiler::collectTracyStats() is true, using DtProfiler::tracyCallstackDepth() stack frames.
| #define DtPROFILE |
( |
|
name | ) |
|
Value:ZoneNamedNS( \
static unsigned int tracyCallstackDepth()
Returns the callstack capture depth applied when recording zones.
static bool collectTracyStats()
Indicates whether Tracy statistics collection is currently active.
Profiles the enclosing scope under an explicit zone name.
- Parameters
-
| name | Zone name. Pass a string literal / const char* (its pointer is used directly); do not pass a std::string (see the note at the top of this file). |
| #define DtPROFILEC |
( |
|
name, |
|
|
|
color |
|
) |
| |
| #define DtPROFILELEVEL |
( |
|
name, |
|
|
|
moduleName, |
|
|
|
level |
|
) |
| |
Value:
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
static int tracyModuleLevel(size_t moduleNameHash)
Returns the user-configured trace level for a module.
static unsigned int tracyCallstackDepth()
Returns the callstack capture depth applied when recording zones.
static bool collectTracyStats()
Indicates whether Tracy statistics collection is currently active.
Profiles the enclosing scope only when a module's trace level is high enough.
The zone is recorded only while stats are being collected and the level configured for the module (via the "tracy" console command) is at least level. This keeps fine-grained instrumentation off unless explicitly requested for that module.
- Parameters
-
| name | Zone name (pass a const char* literal). |
| moduleName | Hash key of the module (e.g. DtProfiler::theTerrainModuleName or a value returned by DtProfiler::addExternalModule()). |
| level | Required trace level, from 0 to 9. |
| #define DtPROFILELEVELC |
( |
|
name, |
|
|
|
color, |
|
|
|
moduleName, |
|
|
|
level |
|
) |
| |
Value:
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
static int tracyModuleLevel(size_t moduleNameHash)
Returns the user-configured trace level for a module.
static unsigned int tracyCallstackDepth()
Returns the callstack capture depth applied when recording zones.
static bool collectTracyStats()
Indicates whether Tracy statistics collection is currently active.
Colored variant of DtPROFILELEVEL.
- Parameters
-
| name | Zone name (pass a const char* literal). |
| color | Zone color shown in the Tracy UI, as a 0xRRGGBB value. |
| moduleName | Hash key of the module to gate on. |
| level | Required trace level, from 0 to 9. |
| #define DtPROFILE_SECTION |
( |
|
name | ) |
|
Value:{ \
static unsigned int tracyCallstackDepth()
Returns the callstack capture depth applied when recording zones.
static bool collectTracyStats()
Indicates whether Tracy statistics collection is currently active.
Begins a manually-scoped profiling section.
Opens a new C++ scope and starts a Tracy zone named name within it. Must be paired with DtPROFILE_SECTION_END to close the scope. Use when profiling a region that does not align with an existing block.
- Parameters
-
| name | Zone name (pass a const char* literal). |
| #define DtPROFILE_ZONE_TEXT |
( |
|
text | ) |
DtZoneSetText(___tracy_scoped_zone, text) |
Attaches free-form text to the most recently opened profiling zone.
- Parameters
-
| text | Text to record on the current zone (const char* or std::string). |
| #define DtPROFILE_SECTION_END } |
Closes a profiling section previously opened with DtPROFILE_SECTION.
| #define DtVRF_PROFILE |
( |
|
name | ) |
DtPROFILE(name) |
| #define DtVRF_PROFILE_FILE |
( |
|
name | ) |
DtPROFILE(name) |
| #define DtProfilerFrameMark |
Value:
{ \
FrameMark; \
}
static bool collectTracyStats()
Indicates whether Tracy statistics collection is currently active.
Marks the end of a frame on the Tracy timeline.
Call once per frame (e.g. in the main loop). Emits a Tracy frame marker only while DtProfiler::collectTracyStats() is true.
| #define DtProfilerPlot |
( |
|
x, |
|
|
|
y |
|
) |
| TracyPlot(x, y) |
Plots a named numeric value on the Tracy timeline.
- Parameters
-
| x | Plot name (const char* literal). |
| y | Numeric value to record for this sample. |
| #define DtProfilerThreadName |
( |
|
name | ) |
tracy::SetThreadName(name); |
Assigns a human-readable name to the current thread in Tracy.
- Parameters
-
| name | Thread name to display (const char* literal). |
| #define DtProfilerMessage |
( |
|
str, |
|
|
|
stringLen |
|
) |
| TracyMessage(str, stringLen) |
Logs a message to the Tracy timeline.
- Parameters
-
| str | Pointer to the message characters. |
| stringLen | Number of characters in str. |
| void DtZoneSetText |
( |
tracy::ScopedZone & |
zone, |
|
|
const char * |
text |
|
) |
| |
|
inline |
| void DtZoneSetText |
( |
tracy::ScopedZone & |
zone, |
|
|
const std::string & |
text |
|
) |
| |
|
inline |