mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-05 12:59:15 +00:00
Context switch samples are excluded from sampling statistics, as they are not produced by the statistical profiling timer and their stacks are always parked at the scheduler. During live capture this exclusion is structural, as such samples never enter the statistics processing path. On trace load, however, only the job which computes symbol statistics and the instruction pointer map filtered them out. The job which builds the per-symbol sample lists and the child sample map did not, so on a loaded trace these two structures included tens of thousands of context switch samples that a live session would not count. This made range-limited statistics counts exceed the whole-trace counts, inflated child sample costs in the symbol view, and caused the same trace to show different numbers live and after a save and reload. On the test trace, __schedule reported 56 exclusive samples but 32747 entries in its sample list. Apply the same context switch sample filter when building the symbol samples and child samples maps.