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:
+14
-14
@@ -115,7 +115,7 @@ enum class QueueType : uint8_t
|
||||
|
||||
struct QueueThreadContext
|
||||
{
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
};
|
||||
|
||||
struct QueueZoneBeginLean
|
||||
@@ -213,28 +213,28 @@ struct QueueLockTerminate
|
||||
|
||||
struct QueueLockWait
|
||||
{
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint32_t id;
|
||||
int64_t time;
|
||||
};
|
||||
|
||||
struct QueueLockObtain
|
||||
{
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint32_t id;
|
||||
int64_t time;
|
||||
};
|
||||
|
||||
struct QueueLockRelease
|
||||
{
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint32_t id;
|
||||
int64_t time;
|
||||
};
|
||||
|
||||
struct QueueLockMark
|
||||
{
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint32_t id;
|
||||
uint64_t srcloc; // ptr
|
||||
};
|
||||
@@ -324,7 +324,7 @@ struct QueueGpuNewContext
|
||||
{
|
||||
int64_t cpuTime;
|
||||
int64_t gpuTime;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
float period;
|
||||
uint8_t context;
|
||||
GpuContextFlags flags;
|
||||
@@ -334,7 +334,7 @@ struct QueueGpuNewContext
|
||||
struct QueueGpuZoneBeginLean
|
||||
{
|
||||
int64_t cpuTime;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint16_t queryId;
|
||||
uint8_t context;
|
||||
};
|
||||
@@ -347,7 +347,7 @@ struct QueueGpuZoneBegin : public QueueGpuZoneBeginLean
|
||||
struct QueueGpuZoneEnd
|
||||
{
|
||||
int64_t cpuTime;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint16_t queryId;
|
||||
uint8_t context;
|
||||
};
|
||||
@@ -386,7 +386,7 @@ struct QueueMemNamePayload
|
||||
struct QueueMemAlloc
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint64_t ptr;
|
||||
char size[6];
|
||||
};
|
||||
@@ -394,7 +394,7 @@ struct QueueMemAlloc
|
||||
struct QueueMemFree
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
uint64_t ptr;
|
||||
};
|
||||
|
||||
@@ -412,7 +412,7 @@ struct QueueCallstackAllocFat
|
||||
struct QueueCallstackSample
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
};
|
||||
|
||||
struct QueueCallstackSampleFat : public QueueCallstackSample
|
||||
@@ -461,8 +461,8 @@ struct QueueSysTime
|
||||
struct QueueContextSwitch
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t oldThread;
|
||||
uint64_t newThread;
|
||||
uint32_t oldThread;
|
||||
uint32_t newThread;
|
||||
uint8_t cpu;
|
||||
uint8_t reason;
|
||||
uint8_t state;
|
||||
@@ -471,7 +471,7 @@ struct QueueContextSwitch
|
||||
struct QueueThreadWakeup
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t thread;
|
||||
uint32_t thread;
|
||||
};
|
||||
|
||||
struct QueueTidToPid
|
||||
|
||||
Reference in New Issue
Block a user