aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime-gdb_test.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2018-06-06 12:38:35 -0400
committerDavid Chase <drchase@google.com>2018-06-06 20:35:23 +0000
commitc08b01ecb4488fb3a95fd5cc7baa8b31812e7b76 (patch)
treeaaf2bc2e86918d000bc5f8081f1122e4b37366ba /src/runtime/runtime-gdb_test.go
parentd09d7627f38211eaa02fed660fd1b3001a7812b3 (diff)
downloadgo-c08b01ecb4488fb3a95fd5cc7baa8b31812e7b76.tar.gz
go-c08b01ecb4488fb3a95fd5cc7baa8b31812e7b76.zip
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>
Diffstat (limited to 'src/runtime/runtime-gdb_test.go')
-rw-r--r--src/runtime/runtime-gdb_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 79f9cb3538..3f936b15b3 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -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)