1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Combine flags in welcome message.

This commit is contained in:
Bartosz Taudul
2021-06-15 01:26:50 +02:00
parent 004681b02b
commit 06dcdd342f
3 changed files with 25 additions and 25 deletions
+12 -4
View File
@@ -9,7 +9,7 @@ namespace tracy
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
enum : uint32_t { ProtocolVersion = 47 };
enum : uint32_t { ProtocolVersion = 48 };
enum : uint16_t { BroadcastVersion = 2 };
using lz4sz_t = uint32_t;
@@ -77,6 +77,16 @@ enum CpuArchitecture : uint8_t
};
struct WelcomeFlag
{
enum _t : uint8_t
{
OnDemand = 1 << 0,
IsApple = 1 << 1,
CodeTransfer = 1 << 2,
};
};
struct WelcomeMessage
{
double timerMul;
@@ -88,10 +98,8 @@ struct WelcomeMessage
uint64_t exectime;
uint64_t pid;
int64_t samplingPeriod;
uint8_t onDemand;
uint8_t isApple;
uint8_t flags;
uint8_t cpuArch;
uint8_t codeTransfer;
char cpuManufacturer[12];
uint32_t cpuId;
char programName[WelcomeMessageProgramNameSize];