From: Josh Bleecher Snyder Date: Tue, 5 Oct 2021 20:52:50 +0000 (-0700) Subject: runtime: make funcspdelta inlineable X-Git-Tag: go1.18beta1~1031 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2a5d4ea97e0dd6f1e192aac081430b848084521b;p=gostls13.git runtime: make funcspdelta inlineable funcspdelta should be inlined: It is a tiny wrapper around another func. The sanity check prevents that. Condition the sanity check on debugPcln. While we're here, make the sanity check throw when it fails. Change-Id: Iec022b8463b13a8e5a6d8479e7ddcb68909d6fe0 Reviewed-on: https://go-review.googlesource.com/c/go/+/354133 Trust: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 7724f0d2f0..8d21fdc42c 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -1035,8 +1035,9 @@ func funcline(f funcInfo, targetpc uintptr) (file string, line int32) { func funcspdelta(f funcInfo, targetpc uintptr, cache *pcvalueCache) int32 { x, _ := pcvalue(f, f.pcsp, targetpc, cache, true) - if x&(goarch.PtrSize-1) != 0 { + if debugPcln && x&(goarch.PtrSize-1) != 0 { print("invalid spdelta ", funcname(f), " ", hex(f.entry()), " ", hex(targetpc), " ", hex(f.pcsp), " ", x, "\n") + throw("bad spdelta") } return x }