mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Change thread id size from 64 to 32 bits.
Both Windows and Linux use 32-bit thread identifiers. MacOS has a 64-bit counter, but in practice it will never overflow during profiling and no false aliasing will happen. These changes are only done client-side and in the network protocol. The server still uses 64-bit thread identifiers, to enable virtual threads, etc.
This commit is contained in:
@@ -10,20 +10,20 @@ namespace tracy
|
||||
|
||||
namespace detail
|
||||
{
|
||||
TRACY_API uint64_t GetThreadHandleImpl();
|
||||
TRACY_API uint32_t GetThreadHandleImpl();
|
||||
}
|
||||
|
||||
#ifdef TRACY_ENABLE
|
||||
TRACY_API uint64_t GetThreadHandle();
|
||||
TRACY_API uint32_t GetThreadHandle();
|
||||
#else
|
||||
static inline uint64_t GetThreadHandle()
|
||||
static inline uint32_t GetThreadHandle()
|
||||
{
|
||||
return detail::GetThreadHandleImpl();
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACY_API void SetThreadName( const char* name );
|
||||
TRACY_API const char* GetThreadName( uint64_t id );
|
||||
TRACY_API const char* GetThreadName( uint32_t id );
|
||||
|
||||
TRACY_API const char* GetEnvVar(const char* name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user