• Austin Clements's avatar
    runtime: remove gcWork flushes in mark termination · 9429aab9
    Austin Clements authored
    The only reason these flushes are still necessary at all is that
    gcmarknewobject doesn't flush its gcWork stats like it's supposed to.
    By changing gcmarknewobject to follow the standard protocol, the
    flushes become completely unnecessary because mark 2 ensures caches
    are flushed (and stay flushed) before we ever enter mark termination.
    
    In the garbage benchmark, this takes roughly 50 µs, which is
    surprisingly long for doing nothing. We still double-check after
    draining that they are in fact empty.
    
    Change-Id: Ia1c7cf98a53f72baa513792eb33eca6a0b4a7128
    Reviewed-on: https://go-review.googlesource.com/31134
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarRick Hudson <rlh@golang.org>
    9429aab9
mgcmark.go 42.4 KB