mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Include PID in broadcast message.
This commit is contained in:
parent
ff36c9004f
commit
f509ed1561
@ -732,6 +732,7 @@ static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz,
|
|||||||
msg.broadcastVersion = BroadcastVersion;
|
msg.broadcastVersion = BroadcastVersion;
|
||||||
msg.protocolVersion = ProtocolVersion;
|
msg.protocolVersion = ProtocolVersion;
|
||||||
msg.listenPort = port;
|
msg.listenPort = port;
|
||||||
|
msg.pid = GetPid();
|
||||||
|
|
||||||
memcpy( msg.programName, procname, pnsz );
|
memcpy( msg.programName, procname, pnsz );
|
||||||
memset( msg.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );
|
memset( msg.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );
|
||||||
|
@ -10,7 +10,7 @@ namespace tracy
|
|||||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||||
|
|
||||||
enum : uint32_t { ProtocolVersion = 60 };
|
enum : uint32_t { ProtocolVersion = 60 };
|
||||||
enum : uint16_t { BroadcastVersion = 2 };
|
enum : uint16_t { BroadcastVersion = 3 };
|
||||||
|
|
||||||
using lz4sz_t = uint32_t;
|
using lz4sz_t = uint32_t;
|
||||||
|
|
||||||
@ -127,6 +127,7 @@ struct BroadcastMessage
|
|||||||
uint16_t broadcastVersion;
|
uint16_t broadcastVersion;
|
||||||
uint16_t listenPort;
|
uint16_t listenPort;
|
||||||
uint32_t protocolVersion;
|
uint32_t protocolVersion;
|
||||||
|
uint64_t pid;
|
||||||
int32_t activeTime; // in seconds
|
int32_t activeTime; // in seconds
|
||||||
char programName[WelcomeMessageProgramNameSize];
|
char programName[WelcomeMessageProgramNameSize];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user