From 14af14999e28db279b07f2eb7e720db711a4e10a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 27 Oct 2019 17:20:17 +0100 Subject: [PATCH] Allow access to profiler's worker thread tid. --- client/TracyProfiler.cpp | 5 +++++ client/TracyProfiler.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 0507505d..c4bca249 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -2481,6 +2481,11 @@ void Profiler::ProcessSysTime() } #endif +uint64_t Profiler::GetProfilerTid() const +{ + return s_profilerThreadId; +} + } #ifdef __cplusplus diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 9258dfad..6cbc5c68 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -447,6 +447,7 @@ public: void SendString( uint64_t ptr, const char* str, QueueType type ); uint64_t Pid() const { return m_pid; } + uint64_t GetProfilerTid() const; private: enum class DequeueStatus { Success, ConnectionLost, QueueEmpty };