1 #ifndef _NO_VRF_PROFILER_
30 static void initializeConsoleCommands();
31 static void setCollectTracyStats(
bool);
32 static void setCollectTracyStatsWithoutStartup(
bool);
33 static bool collectTracyStats();
35 static int tracyModuleLevel(
size_t moduleNameHash);
40 static size_t addExternalModule(
const std::string& Module);
57 #define TRACY_ON_DEMAND
58 #define TRACY_DELAYED_INIT
59 #define TRACY_MANUAL_LIFETIME
62 #include <TracyClient/Tracy.hpp>
63 #include <TracyClient/client/TracyProfiler.hpp>
67 zone.Text(text, strlen(text));
69 inline void DtZoneSetText(tracy::ScopedZone& zone,
const std::string& text) {
70 zone.Text(text.c_str(), text.size());
73 #define ZoneScopedNA( name, active ) ZoneNamedN( ___tracy_scoped_zone, name, active )
74 #define ZoneScopedNCA( name, color, active ) ZoneNamedNC( ___tracy_scoped_zone, name, color, active )
77 #define DtPROFILEzone ZoneNamed(___tracy_scoped_zone, makVrf::DtProfiler::collectTracyStats());
78 #define DtPROFILE(name) ZoneScopedNA(name, makVrf::DtProfiler::collectTracyStats());
79 #define DtPROFILEC(name, color) ZoneScopedNCA(name, color, makVrf::DtProfiler::collectTracyStats());
80 #define DtPROFILELEVEL(name, moduleName, level) ZoneScopedNA(name, (makVrf::DtProfiler::collectTracyStats() && (makVrf::DtProfiler::tracyModuleLevel(moduleName) >= level)));
82 #define DtPROFILELEVELC(name, color, moduleName, level) ZoneScopedNCA(name, color, (makVrf::DtProfiler::collectTracyStats() && (makVrf::DtProfiler::tracyModuleLevel(moduleName) >= level)));
83 #define DtPROFILE_SECTION(name) {ZoneScopedNA(name, makVrf::DtProfiler::collectTracyStats());
84 #define DtPROFILE_ZONE_TEXT(text) DtZoneSetText(___tracy_scoped_zone, text)
85 #define DtPROFILE_SECTION_END }
86 #define DtPROFILE_ZONE_TEXT(text) DtZoneSetText(___tracy_scoped_zone, text)
87 #define DtVRF_PROFILE(name) DtPROFILE(name)
88 #define DtVRF_PROFILE_FILE(name) DtPROFILE(name)
91 #define DtProfilerFrameMark if(makVrf::DtProfiler::collectTracyStats()) { FrameMark; }
92 #define DtProfilerPlot(x,y) TracyPlot(x,y)
93 #define DtProfilerThreadName(name) tracy::SetThreadName(name );
94 #define DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen)
96 #define DtProfilerFrameMark
98 #define DtPROFILE(name)
99 #define DtPROFILEC(name, color)
100 #define DtPROFILE_SECTION(name)
101 #define DtPROFILE_SECTION_END
102 #define DtVRF_PROFILE(name)
103 #define DtVRF_PROFILE_FILE(name)
void DtZoneSetText(tracy::ScopedZone &zone, const char *text)
TO DO include tracy on linux just to get it's macros for throwing things out.
Definition: profiler.h:66
static size_t theVrfUtilModuleName
Definition: profiler.h:43
IMGUI_API void Shutdown(ImGuiContext *context)
Definition: profiler.h:27
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
static size_t theTerrainModuleName
Module(s) name hash of module that support higher level of trace.
Definition: profiler.h:42