]> Cypherpunks repositories - gostls13.git/commit
runtime: only trace mark assists that do work
authorAustin Clements <austin@google.com>
Wed, 19 Jul 2017 18:18:08 +0000 (14:18 -0400)
committerAustin Clements <austin@google.com>
Wed, 19 Jul 2017 20:56:20 +0000 (20:56 +0000)
commitffd5687a8217e6829d2248dd0698f18c0e128ac2
tree1f104caeeba8b3d626d1884f955b42ed4581234f
parent93b7eb973f4f6812a6b9c093b4b6d5c80409eb92
runtime: only trace mark assists that do work

Currently we trace mark assists even if they're satisfied entirely by
stealing. This means even if background marking is keeping up with
allocation, we'll still emit a trace event every N bytes of
allocation. The event will be a few microseconds, if that, but they're
frequent enough that, when zoomed out in the trace view, it looks like
all of the time is spent in mark assists even if almost none is.

Change this so we only emit a trace event if the assist actually has
to do assisting. This makes the traces of these events far more
useful.

Change-Id: If4aed1c413b814341ef2fba61d2f10751d00451b
Reviewed-on: https://go-review.googlesource.com/50030
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go