aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/trace/procgen.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/trace/procgen.go')
-rw-r--r--src/cmd/trace/procgen.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd/trace/procgen.go b/src/cmd/trace/procgen.go
index 060e62fe04..fc0a00e7ce 100644
--- a/src/cmd/trace/procgen.go
+++ b/src/cmd/trace/procgen.go
@@ -143,6 +143,13 @@ func (g *procGenerator) ProcTransition(ctx *traceContext, ev *trace.Event) {
viewerEv := traceviewer.InstantEvent{
Resource: uint64(proc),
Stack: ctx.Stack(viewerFrames(ev.Stack())),
+
+ // Annotate with the thread and proc. The proc is redundant, but this is to
+ // stay consistent with the thread view, where it's useful information.
+ Arg: format.SchedCtxArg{
+ ProcID: uint64(st.Resource.Proc()),
+ ThreadID: uint64(ev.Thread()),
+ },
}
from, to := st.Proc()
@@ -156,7 +163,6 @@ func (g *procGenerator) ProcTransition(ctx *traceContext, ev *trace.Event) {
start = ctx.startTime
}
viewerEv.Name = "proc start"
- viewerEv.Arg = format.ThreadIDArg{ThreadID: uint64(ev.Thread())}
viewerEv.Ts = ctx.elapsed(start)
ctx.IncThreadStateCount(ctx.elapsed(start), traceviewer.ThreadStateRunning, 1)
}