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

Detect context switch callstack samples.

Context switch callstack samples are not included in the sampling data
statistics (as these don't represent random sampling), but are rather put into
a separate dedicated data structure.

For this to work, a complete context switch data has to be available for the
callstack timestamp. There is no guarantee it will be present at the time it
is needed, so a second structure is added to allow postponing qualification of
callstacks.
This commit is contained in:
Bartosz Taudul
2021-11-13 02:40:32 +01:00
parent 5b799e0e45
commit 745b795d50
3 changed files with 91 additions and 50 deletions
+3
View File
@@ -720,6 +720,9 @@ private:
tracy_force_inline MemEvent* ProcessMemAllocImpl( uint64_t memname, MemData& memdata, const QueueMemAlloc& ev );
tracy_force_inline MemEvent* ProcessMemFreeImpl( uint64_t memname, MemData& memdata, const QueueMemFree& ev );
tracy_force_inline void ProcessCallstackSampleImpl( const SampleData& sd, ThreadData& td );
#ifndef TRACY_NO_STATISTICS
tracy_force_inline void ProcessCallstackSampleImplStats( const SampleData& sd, ThreadData& td );
#endif
void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev );
void ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev );