From d47344187d4fe3a4a2e1caba9481a315c15f9e50 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:25:42 -0500 Subject: [PATCH] fix: don't truncate thread names to 15 chars on Apple platforms --- public/common/TracySystem.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/public/common/TracySystem.cpp b/public/common/TracySystem.cpp index a8e87e8c..fcd4be47 100644 --- a/public/common/TracySystem.cpp +++ b/public/common/TracySystem.cpp @@ -168,26 +168,22 @@ TRACY_API void SetThreadNameWithHint( const char* name, int32_t groupHint ) } #elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__ { +#if defined __APPLE__ + pthread_setname_np( name ); +#else const auto sz = strlen( name ); if( sz <= 15 ) { -#if defined __APPLE__ - pthread_setname_np( name ); -#else pthread_setname_np( pthread_self(), name ); -#endif } else { char buf[16]; memcpy( buf, name, 15 ); buf[15] = '\0'; -#if defined __APPLE__ - pthread_setname_np( buf ); -#else pthread_setname_np( pthread_self(), buf ); -#endif } +#endif } #elif defined __QNX__ {