aboutsummaryrefslogtreecommitdiff
path: root/test/inline_callers.go
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2018-12-04 07:58:18 -0800
committerKeith Randall <khr@golang.org>2018-12-28 20:55:36 +0000
commit69c2c56453cdea1ad32d50fc82193f06b1b33f93 (patch)
tree68923304deca5d767ceff2dca690faffb7b58616 /test/inline_callers.go
parentc043fc4f655ce34f67a0e7fe2833139f6313a3f0 (diff)
downloadgo-69c2c56453cdea1ad32d50fc82193f06b1b33f93.tar.gz
go-69c2c56453cdea1ad32d50fc82193f06b1b33f93.zip
cmd/compile,runtime: redo mid-stack inlining tracebacks
Work involved in getting a stack trace is divided between runtime.Callers and runtime.CallersFrames. Before this CL, runtime.Callers returns a pc per runtime frame. runtime.CallersFrames is responsible for expanding a runtime frame into potentially multiple user frames. After this CL, runtime.Callers returns a pc per user frame. runtime.CallersFrames just maps those to user frame info. Entries in the result of runtime.Callers are now pcs of the calls (or of the inline marks), not of the instruction just after the call. Fixes #29007 Fixes #28640 Update #26320 Change-Id: I1c9567596ff73dc73271311005097a9188c3406f Reviewed-on: https://go-review.googlesource.com/c/152537 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'test/inline_callers.go')
-rw-r--r--test/inline_callers.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/inline_callers.go b/test/inline_callers.go
index 6df6861951..f2c05622dd 100644
--- a/test/inline_callers.go
+++ b/test/inline_callers.go
@@ -56,11 +56,11 @@ func testCallersFrames(skp int) (frames []string) {
}
var expectedFrames [][]string = [][]string{
- 0: {"runtime.Callers", "main.testCallers", "main.main"},
- 1: {"main.testCallers", "main.main"},
- 2: {"main.testCallers", "runtime.skipPleaseUseCallersFrames", "main.main"},
- 3: {"main.testCallers", "runtime.skipPleaseUseCallersFrames", "main.main"},
- 4: {"main.testCallers", "runtime.skipPleaseUseCallersFrames", "main.main"},
+ 0: {"runtime.Callers", "main.testCallers", "main.testCallers", "main.testCallers", "main.testCallers", "main.main"},
+ 1: {"main.testCallers", "main.testCallers", "main.testCallers", "main.testCallers", "main.main"},
+ 2: {"main.testCallers", "main.testCallers", "main.testCallers", "main.main"},
+ 3: {"main.testCallers", "main.testCallers", "main.main"},
+ 4: {"main.testCallers", "main.main"},
5: {"main.main"},
}