mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-01 16:08:30 +00:00
SortedVector considered an appended element equal to the last one to break the ordering, marking the vector as unsorted. A non-decreasing sequence is sorted, so only a strictly smaller element has to trigger the marker. Equal keys are common: child sample vectors receive identical timestamps whenever a recursive call stack contains the same call site twice, which flipped the vectors to unsorted on virtually every recursive workload and caused the lazy sort in GetChildSamples to run over and over again while holding the data lock. The lazy sort machinery handles duplicate keys correctly, as both the prefix and tail merge windows are computed with lower bounds.
3.7 KiB
3.7 KiB