Skip to content

Commit

Permalink
callstack macro variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Sep 12, 2024
1 parent 012a887 commit 5075869
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/hx/TelemetryTracy.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@
#endif
#endif


#ifdef HXCPP_TRACY_INCLUDE_CALLSTACKS
#define HXCPP_TRACY_ZONE(name) \
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
int TracyConcat(_hx_tracy_str_length, TracyLine); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), &TracyConcat(_hx_tracy_str_length, TracyLine)), TracyConcat(_hx_tracy_str_length, TracyLine), _hx_stackframe.ctx->getDepth());
#else
#define HXCPP_TRACY_ZONE(name) \
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
int TracyConcat(_hx_tracy_str_length, TracyLine); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), &TracyConcat(_hx_tracy_str_length, TracyLine)), TracyConcat(_hx_tracy_str_length, TracyLine));
#endif

void __hxcpp_tracy_framemark();
void __hxcpp_tracy_plot(::String name, ::Float val);
Expand Down

0 comments on commit 5075869

Please sign in to comment.