diff --git a/include/hx/TelemetryTracy.h b/include/hx/TelemetryTracy.h index a6d1c2461..a46ef3e77 100644 --- a/include/hx/TelemetryTracy.h +++ b/include/hx/TelemetryTracy.h @@ -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);