diff options
Diffstat (limited to 'src/runtime/traceback.go')
| -rw-r--r-- | src/runtime/traceback.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index 74aaeba876..1c6f24c033 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -8,6 +8,7 @@ import ( "internal/abi" "internal/bytealg" "internal/goarch" + "internal/runtime/pprof/label" "internal/runtime/sys" "internal/stringslite" "unsafe" @@ -1270,6 +1271,19 @@ func goroutineheader(gp *g) { if bubble := gp.bubble; bubble != nil { print(", synctest bubble ", bubble.id) } + if gp.labels != nil && debug.tracebacklabels.Load() == 1 { + labels := (*label.Set)(gp.labels).List + if len(labels) > 0 { + print(" labels:{") + for i, kv := range labels { + print(quoted(kv.Key), ": ", quoted(kv.Value)) + if i < len(labels)-1 { + print(", ") + } + } + print("}") + } + } print("]:\n") } |
