• Austin Clements's avatar
    runtime: simplify process for starting GC goroutine · 0e6a6c51
    Austin Clements authored
    Currently, when allocation reaches the GC trigger, the runtime uses
    readyExecute to start the GC goroutine immediately rather than wait
    for the scheduler to get around to the GC goroutine while the mutator
    continues to grow the heap.
    
    Now that the scheduler runs the most recently readied goroutine when a
    goroutine yields its time slice, this rigmarole is no longer
    necessary. The runtime can simply ready the GC goroutine and yield
    from the readying goroutine.
    
    Change-Id: I3b4ebadd2a72a923b1389f7598f82973dd5c8710
    Reviewed-on: https://go-review.googlesource.com/9292Reviewed-by: default avatarRick Hudson <rlh@golang.org>
    Reviewed-by: default avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    0e6a6c51
proc1.go 92 KB