]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile,runtime: redo mid-stack inlining tracebacks
authorKeith Randall <keithr@alum.mit.edu>
Tue, 4 Dec 2018 15:58:18 +0000 (07:58 -0800)
committerKeith Randall <khr@golang.org>
Fri, 28 Dec 2018 20:55:36 +0000 (20:55 +0000)
commit69c2c56453cdea1ad32d50fc82193f06b1b33f93
tree68923304deca5d767ceff2dca690faffb7b58616
parentc043fc4f655ce34f67a0e7fe2833139f6313a3f0
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>
39 files changed:
misc/cgo/test/callback.go
src/cmd/compile/internal/amd64/ggen.go
src/cmd/compile/internal/arm/ggen.go
src/cmd/compile/internal/arm64/ggen.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/walk.go
src/cmd/compile/internal/mips/ggen.go
src/cmd/compile/internal/mips64/ggen.go
src/cmd/compile/internal/ppc64/ggen.go
src/cmd/compile/internal/s390x/ggen.go
src/cmd/compile/internal/ssa/deadcode.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/lower.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/wasm/ssa.go
src/cmd/compile/internal/x86/ggen.go
src/cmd/internal/goobj/read.go
src/cmd/internal/obj/inl.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/wasm/wasmobj.go
src/cmd/internal/objabi/funcid.go
src/cmd/link/internal/ld/pcln.go
src/cmd/link/internal/objfile/objfile.go
src/cmd/link/internal/sym/symbol.go
src/runtime/extern.go
src/runtime/pprof/proto.go
src/runtime/pprof/proto_test.go
src/runtime/pprof/protomem_test.go
src/runtime/symtab.go
src/runtime/traceback.go
test/fixedbugs/issue5856.go
test/inline_callers.go