]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: restore header to first goroutine in Stack
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Aug 2014 16:31:32 +0000 (09:31 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Aug 2014 16:31:32 +0000 (09:31 -0700)
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

src/pkg/runtime/mprof.go
src/pkg/runtime/stubs.go

index 95ea1297edda9c8765b533c36d3a1414784d5827..5d77c5629c2bb91600df56dd1f6871fa9e642ab5 100644 (file)
@@ -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)
index 5f396aa0096ca94a1ddcd821dd33f6115c10ea39..52d0c0e3a56f7ec1b526c2484d08ec7d82d1afa7 100644 (file)
@@ -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)