mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add IdentifySamples flag to the protocol.
On Windows there is no way to distinguish callstack data coming from random sampling and from context switches. Each callstack timestamp has to be matched against the context switch data in order to decide its origin. This is obviously non-trivial. On some other platforms, the origin information may be available right away, in which case the process of matching against the context switch data, which possibly includes postponing callstacks for processing in the future, may be completely omitted.
This commit is contained in:
parent
2008c88983
commit
20f8c8b8a4
@ -1540,6 +1540,7 @@ void Profiler::Worker()
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
flags |= WelcomeFlag::CombineSamples;
|
||||
flags |= WelcomeFlag::IdentifySamples;
|
||||
#endif
|
||||
|
||||
#if defined __i386 || defined _M_IX86
|
||||
|
@ -9,7 +9,7 @@ namespace tracy
|
||||
|
||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||
|
||||
enum : uint32_t { ProtocolVersion = 53 };
|
||||
enum : uint32_t { ProtocolVersion = 54 };
|
||||
enum : uint16_t { BroadcastVersion = 2 };
|
||||
|
||||
using lz4sz_t = uint32_t;
|
||||
@ -86,6 +86,7 @@ struct WelcomeFlag
|
||||
IsApple = 1 << 1,
|
||||
CodeTransfer = 1 << 2,
|
||||
CombineSamples = 1 << 3,
|
||||
IdentifySamples = 1 << 4,
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user