diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-03-10 20:38:32 +0300 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-03-11 12:52:41 +0000 |
| commit | 9d332a8324dbbfaafceffaf9ad765c6d8d083450 (patch) | |
| tree | 07f37d908684244eb59fd68f10dbe6be605b4288 /src/runtime/trace.go | |
| parent | b2843becab6f4571be1c117da870393198edf01f (diff) | |
| download | go-9d332a8324dbbfaafceffaf9ad765c6d8d083450.tar.xz | |
cmd/trace: dump thread id on proc start
Augment ProcStart events with OS thread id.
This helps in scheduler locality analysis.
Change-Id: I93fea75d3072cf68de66110d0b59d07101badcb5
Reviewed-on: https://go-review.googlesource.com/7302
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/trace.go')
| -rw-r--r-- | src/runtime/trace.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/trace.go b/src/runtime/trace.go index ea35343552..eb3ceb2f38 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -21,7 +21,7 @@ const ( traceEvFrequency = 2 // contains tracer timer frequency [frequency (ticks per second)] traceEvStack = 3 // stack [stack id, number of PCs, array of PCs] traceEvGomaxprocs = 4 // current value of GOMAXPROCS [timestamp, GOMAXPROCS, stack id] - traceEvProcStart = 5 // start of P [timestamp] + traceEvProcStart = 5 // start of P [timestamp, thread id] traceEvProcStop = 6 // stop of P [timestamp] traceEvGCStart = 7 // GC start [timestamp, stack id] traceEvGCDone = 8 // GC done [timestamp] @@ -716,7 +716,7 @@ func traceGomaxprocs(procs int32) { } func traceProcStart() { - traceEvent(traceEvProcStart, -1) + traceEvent(traceEvProcStart, -1, uint64(getg().m.id)) } func traceProcStop(pp *p) { |
