]> Cypherpunks repositories - gostls13.git/commit
cmd/trace: Record mark assists in execution traces
authorHeschi Kreinick <heschi@google.com>
Tue, 31 Jan 2017 19:09:14 +0000 (14:09 -0500)
committerHeschi Kreinick <heschi@google.com>
Fri, 10 Feb 2017 18:03:42 +0000 (18:03 +0000)
commit2a74b9e81405e34c67880866552b5d7bcab74de1
tree95077460a569f62c003fe6052f73a1a59c65aca7
parent249aca5deebcc22cc5169814207416a40f14cd86
cmd/trace: Record mark assists in execution traces

During the mark phase of garbage collection, goroutines that allocate
may be recruited to assist. This change creates trace events for mark
assists and displays them similarly to sweep assists in the trace
viewer.

Mark assists are different than sweeps in that they can be preempted, so
displaying them in the trace viewer is a little tricky -- we may need to
synthesize multiple slices for one mark assist. This could have been
done in the parser instead, but I thought it might be preferable to keep
the parser as true to the event stream as possible.

Change-Id: I381dcb1027a187a354b1858537851fa68a620ea7
Reviewed-on: https://go-review.googlesource.com/36015
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
src/cmd/trace/trace.go
src/cmd/trace/trace_test.go
src/internal/trace/parser.go
src/internal/trace/testdata/http_1_9_good [new file with mode: 0644]
src/internal/trace/testdata/stress_1_9_good [new file with mode: 0644]
src/internal/trace/testdata/stress_start_stop_1_9_good [new file with mode: 0644]
src/internal/trace/writer.go
src/runtime/mgcmark.go
src/runtime/trace.go