• Dmitry Vyukov's avatar
    internal/trace: fix analysis of EvGoWaiting/EvGoInSyscall events · a50f9859
    Dmitry Vyukov authored
    When tracing is started in the middle of program execution,
    we already have a number of runnable goroutines and a number
    of blocked/in syscall goroutines. In order to reflect these
    goroutines in the trace, we emit EvGoCreate for all existing
    goroutines. Then for blocked/in syscall goroutines we additionally
    emit EvGoWaiting/EvGoInSyscall events. These events don't reset g.ev
    during trace analysis. So next EvGoStart finds g.ev set to the
    previous EvGoCreate. As the result time between EvGoCreate and
    EvGoStart is accounted as scheduler latency. While in reality
    it is blocking/syscall time.
    
    Properly reset g.ev for EvGoWaiting/EvGoInSyscall events.
    
    Change-Id: I0615ba31ed7567600a0667ebb27458481da73adb
    Reviewed-on: https://go-review.googlesource.com/25572Reviewed-by: 's avatarHyang-Ah Hana Kim <hyangah@gmail.com>
    a50f9859
Name
Last commit
Last update
.github Loading commit data...
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...