37 #include <optick/optick.h>
41 #define DtPROFILE(name) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
42 #define DtPROFILEC(name, color) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
43 #define DtPROFILE_SECTION(name) {OPTICK_EVENT(name); makVrv::DtProfileSample _profileSample(name);
45 #define DtProfilerFrameMark OPTICK_FRAME("MainThread")
46 #define DtProfilerThreadName(name) OPTICK_THREAD(name);
47 #define DtProfilerMessage(str, stringLen)
49 #define DtProfilerPlot(x,y)
50 #define DtProfilerText(text)
57 #define TRACY_ON_DEMAND
58 #define TRACY_DELAYED_INIT
61 #include <TracyClient/Tracy.hpp>
64 #define ZoneScopedNA( name, active ) ZoneNamedN( ___tracy_scoped_zone, name, active )
65 #define ZoneScopedNCA( name, color, active ) ZoneNamedNC( ___tracy_scoped_zone, name, color, active )
68 #define DtPROFILEzone ZoneNamed(___tracy_scoped_zone, makVrv::DtProfileManager::collectTracyStats());
69 #define DtPROFILE(name) ZoneScopedNA(name, makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
70 #define DtPROFILEC(name, color) ZoneScopedNCA(name, color, makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
71 #define DtPROFILE_SECTION(name) {ZoneScopedNA(name, makVrv::DtProfileManager::collectTracyStats()); makVrv::DtProfileSample _profileSample(name);
74 #define DtProfilerFrameMark if(makVrv::DtProfileManager::collectTracyStats()) { FrameMark; }
75 #define DtProfilerPlot(x,y) TracyPlot(x,y)
76 #define DtProfilerThreadName(name) tracy::SetThreadName(name );
77 #define DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen)
78 #define DtProfilerText(text) _zoneSetText(___tracy_scoped_zone, text)
80 inline void _zoneSetText(tracy::ScopedZone& zone,
const char* text) {
81 zone.Text(text, strlen(text));
83 inline void _zoneSetText(tracy::ScopedZone& zone,
const std::string& text) {
84 zone.Text(text.c_str(), text.size());
91 #define DtPROFILE(name) DtPROFILE_X(name, __LINE__);
92 #define DtPROFILEC(name, color) DtPROFILE_X(name, __LINE__);
93 #define DtPROFILE_SECTION(name) {makVrv::DtProfileSample _profileSample(name);
94 #define DtPROFILEzone DtPROFILE_X(__func__, __LINE__);
96 #define DtProfilerPlot(x,y)
98 #define DtProfilerFrameMark
99 #define DtProfilerThreadName(name)
100 #define DtProfilerPlot(x,y)
101 #define DtProfilerMessage(str, stringLen)
102 #define DtProfilerText(text)
105 #define DtPROFILE_RESTRICTED(name, target) makVrv::DtProfileTarget<target> _profileTarget##line(name);
107 #define DtPROFILE_X(name, line) DtPROFILE_ACTUAL(name, line)
108 #define DtPROFILE_ACTUAL(name, line) makVrv::DtProfileSample _profileSample##line(name);
110 #define DtPROFILE_SECTION_END }
112 #define DtPERFORMANCE_STAT(name) DtPERFORMANCE_STAT_X(name, __LINE__)
113 #define DtPERFORMANCE_STAT_X(name, line) DtPERFORMANCE_STAT_ACTUAL(name, line)
114 #define DtPERFORMANCE_STAT_ACTUAL(name, line) makVrv::DtPerfomanceStatSample _performanceStatSample##line(name);
152 template <
bool Enabled>
const bool Profile_DtOsgCullVisitor
Definition: DtProfiler.h:122
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtProfileTarget is used to start/stop a profiled section It is preferable to use the macro at the top...
Definition: DtProfiler.h:153
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:178
static void startProfile(const char *name)
begin a profile. This function is thread safe
DtProfileSample(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:136
const bool Profile_DtSurfaceClampingUpdater
Definition: DtProfiler.h:121
~DtPerfomanceStatSample()
DTOR stops profile section.
Definition: DtProfiler.h:188
DtProfileTarget(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:162
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:132
Contains DLL export macros.
const bool Profile_DtSceneObjectUpdater
Definition: DtProfiler.h:120
void DT_DLL_VRVUTIL SetThreadName(const char *name)
~DtProfileTarget()
DTOR stops profile section.
Definition: DtProfiler.h:168
static void stopPerformanceStat()
begin stop a profile. This function is thread safe
DtProfileTarget(const char *name)
Definition: DtProfiler.h:155
static void startPerformanceStat(const char *name)
begin a performance stat. This function is thread safe
DtPerfomanceStatSample(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:182
~DtProfileSample()
DTOR stops profile section.
Definition: DtProfiler.h:142
static void stopProfile()
begin stop a profile. This function is thread safe