• Dmitry Vyukov's avatar
    internal/trace: stable sort events · 64e48bba
    Dmitry Vyukov authored
    On some VMs two events can happen at the same time. For examples:
    179827399 GoStart p=2 g=11 off=936359 g=11
    179827399 GoUnblock p=2 g=0 off=936355 g=11
    If we do non-stable sort, the events can be reordered making the trace inconsistent.
    Do stable sort instead.
    
    Batches are dumped in FIFO order, so if these same-time events are split into
    separate batches, stable sort still works.
    
    Events on different CPUs go into different batches and can be reordered.
    But the intention is that causally-related events on different CPUs
    will have larger (non-zero) time diff.
    
    Update #11320
    
    Change-Id: Id1df96af41dff68ea1782ab4b23d5afd63b890c9
    Reviewed-on: https://go-review.googlesource.com/11834Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    64e48bba
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...