From: Brad Fitzpatrick Date: Wed, 27 Aug 2014 16:31:32 +0000 (-0700) Subject: runtime: restore header to first goroutine in Stack X-Git-Tag: go1.4beta1~680 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9a5654abeff85c8ac9b1b43bf7da9aa9f4bdfa15;p=gostls13.git runtime: restore header to first goroutine in Stack It appears to have been accidentally lost when converting Stack from C to Go in https://golang.org/cl/129510043 LGTM=rsc R=golang-codereviews CC=golang-codereviews, josharian, khr, remyoudompheng, rsc https://golang.org/cl/136870043 --- diff --git a/src/pkg/runtime/mprof.go b/src/pkg/runtime/mprof.go index 95ea1297ed..5d77c5629c 100644 --- a/src/pkg/runtime/mprof.go +++ b/src/pkg/runtime/mprof.go @@ -164,6 +164,7 @@ func Stack(buf []byte, all bool) int { if len(buf) > 0 { gp.writebuf = &buf[0] gp.writenbuf = int32(len(buf)) + goroutineheader(gp) traceback(pc, sp, 0, gp) if all { tracebackothers(gp) diff --git a/src/pkg/runtime/stubs.go b/src/pkg/runtime/stubs.go index 5f396aa009..52d0c0e3a5 100644 --- a/src/pkg/runtime/stubs.go +++ b/src/pkg/runtime/stubs.go @@ -216,6 +216,7 @@ func gonotetsleepg(n *note, t int64) { func exitsyscall() +func goroutineheader(gp *g) func traceback(pc, sp, lr uintptr, gp *g) func tracebackothers(gp *g)