Skip to content

Commit

Permalink
add __hxcpp_tracy_set_thread_name_and_group; disable custom GC ___tra…
Browse files Browse the repository at this point in the history
…cy_source_location_data
  • Loading branch information
dazKind committed Sep 12, 2024
1 parent 9ecfa08 commit 56aaf05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions include/hx/Telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ int __hxcpp_gc_used_bytes();
void __hxcpp_tracy_plot_config(String name, uint8_t format, bool step, bool fill, int color);
void __hxcpp_tracy_message(String msg, int color);
void __hxcpp_tracy_message_app_info(String info);
void __hxcpp_tracy_set_thread_name_and_group(String name, int groupHint);
#endif

#endif
15 changes: 10 additions & 5 deletions src/hx/TelemetryTracy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ namespace
{
TracyCZoneCtx gcZone;

___tracy_source_location_data gcSourceLocation = { "GC", "__hxt_gc_start", TracyFile, (uint32_t)TracyLine, 0 };
// ___tracy_source_location_data gcSourceLocation = { "GC", "__hxt_gc_start", TracyFile, (uint32_t)TracyLine, 0 };

const char* sohName = "SOH";
const char* lohName = "LOH";
const char* sohName = "Small Object Heap";
const char* lohName = "Large Object Heap";

std::vector<hx::Telemetry*> created;
hx::QuickVec<void*> largeAllocs;
Expand Down Expand Up @@ -164,12 +164,12 @@ void __hxt_gc_after_mark(int byteMarkId, int endianByteMarkId)

void __hxt_gc_start()
{
gcZone = ___tracy_emit_zone_begin(&gcSourceLocation, true);
// gcZone = ___tracy_emit_zone_begin(&gcSourceLocation, true);
}

void __hxt_gc_end()
{
___tracy_emit_zone_end(gcZone);
// ___tracy_emit_zone_end(gcZone);
}

hx::Telemetry* hx::tlmCreate(StackContext* stack)
Expand Down Expand Up @@ -256,3 +256,8 @@ void __hxcpp_tracy_message_app_info(String info)
{
::tracy::Profiler::MessageAppInfo(info.c_str(), info.length);
}

void __hxcpp_tracy_set_thread_name_and_group(String name, int groupHint)
{
::tracy::SetThreadNameWithHint(name.c_str(), groupHint);
}

0 comments on commit 56aaf05

Please sign in to comment.