mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: fix panic-okay-to-inline change; adjust tests
This line of the inlining tuning experiment https://go-review.googlesource.com/c/go/+/109918/1/src/cmd/compile/internal/gc/inl.go#347 was incorrectly rewritten in a later patch to use the call cost, not the panic cost, and thus the inlining of panic didn't occur when it should. I discovered this when I realized that tests should have failed, but didn't. Fix is to make the correct change, and also to modify the tests that this causes to fail. One test now asserts the new normal, the other calls "ppanic" instead which is designed to behave like panic but not be inlined. Change-Id: I423bb7f08bd66a70d999826dd9b87027abf34cdf Reviewed-on: https://go-review.googlesource.com/116656 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
d09d7627f3
commit
c08b01ecb4
4 changed files with 41 additions and 36 deletions
|
|
@ -538,7 +538,7 @@ func TestGdbPanic(t *testing.T) {
|
|||
`main`,
|
||||
}
|
||||
for _, name := range bt {
|
||||
s := fmt.Sprintf("#.* .* in main\\.%v", name)
|
||||
s := fmt.Sprintf("(#.* .* in )?main\\.%v", name)
|
||||
re := regexp.MustCompile(s)
|
||||
if found := re.Find(got) != nil; !found {
|
||||
t.Errorf("could not find '%v' in backtrace", s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue