aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2014-08-27 09:31:32 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2014-08-27 09:31:32 -0700
commit9a5654abeff85c8ac9b1b43bf7da9aa9f4bdfa15 (patch)
tree80434ed032f98c2a0da21bde858e6124d9300217 /src/pkg/runtime
parent25f6b02ab0db8e22994a3a68f4cb2857b788a63f (diff)
downloadgo-9a5654abeff85c8ac9b1b43bf7da9aa9f4bdfa15.tar.xz
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
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/mprof.go1
-rw-r--r--src/pkg/runtime/stubs.go1
2 files changed, 2 insertions, 0 deletions
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)