]> Cypherpunks repositories - gostls13.git/commit
runtime: update heap profile stats after world is started
authorAustin Clements <austin@google.com>
Mon, 12 Sep 2016 00:03:14 +0000 (20:03 -0400)
committerAustin Clements <austin@google.com>
Wed, 19 Oct 2016 21:36:24 +0000 (21:36 +0000)
commit5b7497f327f83510193b1ec1de2eabb287a02982
treee1874896357d277d85fd3cde347ee60a520ce362
parent9429aab9999e00958abd8b21d06fa4a2253437c2
runtime: update heap profile stats after world is started

Updating the heap profile stats is one of the most expensive parts of
mark termination other than stack rescanning, but there's really no
need to do this with the world stopped. Move it to right after we've
started the world back up. This creates a *very* small window where
allocations from the next cycle can slip into the profile, but the
exact point where mark termination happens is so non-deterministic
already that a slight reordering here is unimportant.

Change-Id: I2f76f22c70329923ad6a594a2c26869f0736d34e
Reviewed-on: https://go-review.googlesource.com/31363
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go