]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: adjust reported line numbers to show call sites
authorRuss Cox <rsc@golang.org>
Fri, 15 Feb 2013 19:27:16 +0000 (14:27 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 15 Feb 2013 19:27:16 +0000 (14:27 -0500)
commit318309a51f40d31568bd2c9131d1cd25c2ca0214
tree5f8dad46d2bb6f5077b9cf6b3291cebe50aadd19
parent8a6ff3ab3469ea6b448d682ac7ebc3b818208634
runtime/pprof: adjust reported line numbers to show call sites

This is the same logic used in the standard tracebacks.
The caller pc is the pc after the call, so except in the
fake "call" caused by a panic, back up the pc enough
that the lookup will use the previous instruction.

Fixes #4150.
Fixes #4151.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7317047
src/pkg/runtime/pprof/pprof.go