• Austin Clements's avatar
    runtime: make STW duration more accurate · 250a9610
    Austin Clements authored
    Currently, GC captures the start-the-world time stamp after
    startTheWorldWithSema returns. This is problematic for two reasons:
    
    1. It's possible to get preempted between startTheWorldWithSema
    starting the world and calling nanotime.
    
    2. startTheWorldWithSema does several clean-up tasks after the world
    is up and running that on rare occasions can take upwards of 10ms.
    
    Since the runtime uses the start-the-world time stamp to compute the
    STW duration, both of these can significantly inflate the reported STW
    duration.
    
    Fix this by having startTheWorldWithSema itself call nanotime once the
    world is started.
    
    Change-Id: I114630234fb73c9dabae50a2ef1884661f2459db
    Reviewed-on: https://go-review.googlesource.com/55410
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    250a9610
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...