]> Cypherpunks repositories - gostls13.git/commit
runtime, cmd/trace: annotate different mark worker types
authorAustin Clements <austin@google.com>
Fri, 7 Oct 2016 21:25:26 +0000 (17:25 -0400)
committerAustin Clements <austin@google.com>
Fri, 28 Oct 2016 14:29:40 +0000 (14:29 +0000)
commit68348394274ee83f5286022d97cfe58b6761321b
tree776fe3e13cdf98d054c331380a90730f18448f32
parentf9238a76ff0082071527ce8ec94542a297f594f8
runtime, cmd/trace: annotate different mark worker types

Currently mark workers are shown in the trace as regular goroutines
labeled "runtime.gcBgMarkWorker". That's somewhat unhelpful to an end
user because of the opaque label and particularly unhelpful to runtime
developers because it doesn't distinguish the different types of mark
workers.

Fix this by introducing a variant of the GoStart event called
GoStartLabel that lets the runtime indicate a label for a goroutine
execution span and using this to label mark worker executions as "GC
(<mode>)" in the trace viewer.

Since this bumps the trace version to 1.8, we also add test data for
1.7 traces.

Change-Id: Id7b9c0536508430c661ffb9e40e436f3901ca121
Reviewed-on: https://go-review.googlesource.com/30702
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/cmd/trace/trace.go
src/internal/trace/goroutines.go
src/internal/trace/order.go
src/internal/trace/parser.go
src/internal/trace/testdata/http_1_7_good [new file with mode: 0644]
src/internal/trace/testdata/stress_1_7_good [new file with mode: 0644]
src/internal/trace/testdata/stress_start_stop_1_7_good [new file with mode: 0644]
src/runtime/mgc.go
src/runtime/trace.go