aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime-gdb_test.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2018-03-14 16:54:33 -0400
committerDavid Chase <drchase@google.com>2018-03-15 21:34:17 +0000
commit1c24ffbf936b17387ee7f7a7c0adef4d27d1382d (patch)
tree39ea2524882e33b5222833b7ad3c2f5dd3a51123 /src/runtime/runtime-gdb_test.go
parent1814a0595cb62a1788e4af17c3ab71f223bbd51b (diff)
downloadgo-1c24ffbf936b17387ee7f7a7c0adef4d27d1382d.tar.gz
go-1c24ffbf936b17387ee7f7a7c0adef4d27d1382d.zip
cmd/compile: turn on DWARF locations lists for ssa vars
This changes the default setting for -dwarflocationlists from false to true, removes the flag from ssa/debug_test.go, and updates runtime/runtime-gdb_test.go to match a change in debugging output for composite variables. Current benchmarks (perflock, -count 10) benchstat -geomean before.log after.log name old time/op new time/op delta Template 175ms ± 0% 182ms ± 1% +3.68% (p=0.000 n=8+9) Unicode 82.0ms ± 2% 82.8ms ± 1% +0.96% (p=0.019 n=9+9) GoTypes 590ms ± 1% 611ms ± 1% +3.42% (p=0.000 n=9+10) Compiler 2.85s ± 0% 2.95s ± 1% +3.60% (p=0.000 n=9+10) SSA 6.42s ± 1% 6.70s ± 1% +4.31% (p=0.000 n=10+9) Flate 113ms ± 2% 117ms ± 1% +3.11% (p=0.000 n=10+9) GoParser 140ms ± 1% 145ms ± 1% +3.47% (p=0.000 n=10+9) Reflect 384ms ± 0% 398ms ± 1% +3.56% (p=0.000 n=8+9) Tar 165ms ± 1% 171ms ± 1% +3.33% (p=0.000 n=9+9) XML 207ms ± 2% 214ms ± 1% +3.41% (p=0.000 n=9+9) StdCmd 11.8s ± 2% 12.4s ± 2% +4.41% (p=0.000 n=10+9) [Geo mean] 489ms 506ms +3.38% name old user-ns/op new user-ns/op delta Template 247M ± 4% 254M ± 4% +2.76% (p=0.040 n=10+10) Unicode 118M ±16% 121M ±11% ~ (p=0.364 n=10+10) GoTypes 805M ± 2% 824M ± 2% +2.37% (p=0.003 n=9+8) Compiler 3.92G ± 2% 4.01G ± 2% +2.20% (p=0.001 n=9+9) SSA 9.63G ± 4% 10.00G ± 2% +3.81% (p=0.000 n=10+9) Flate 155M ±10% 154M ± 7% ~ (p=0.718 n=9+10) GoParser 184M ±11% 190M ± 7% ~ (p=0.220 n=10+9) Reflect 506M ± 4% 528M ± 2% +4.27% (p=0.000 n=10+10) Tar 224M ± 4% 227M ± 5% ~ (p=0.207 n=10+9) XML 272M ± 7% 286M ± 4% +5.23% (p=0.010 n=10+9) [Geo mean] 489M 502M +2.76% name old text-bytes new text-bytes delta HelloSize 672k ± 0% 672k ± 0% ~ (all equal) CmdGoSize 7.21M ± 0% 7.21M ± 0% ~ (all equal) [Geo mean] 2.20M 2.20M +0.00% name old data-bytes new data-bytes delta HelloSize 9.88k ± 0% 9.88k ± 0% ~ (all equal) CmdGoSize 248k ± 0% 248k ± 0% ~ (all equal) [Geo mean] 49.5k 49.5k +0.00% name old bss-bytes new bss-bytes delta HelloSize 125k ± 0% 125k ± 0% ~ (all equal) CmdGoSize 144k ± 0% 144k ± 0% ~ (all equal) [Geo mean] 135k 135k +0.00% name old exe-bytes new exe-bytes delta HelloSize 1.10M ± 0% 1.30M ± 0% +17.82% (p=0.000 n=10+10) CmdGoSize 11.6M ± 0% 13.5M ± 0% +16.90% (p=0.000 n=10+10) [Geo mean] 3.57M 4.19M +17.36% Change-Id: I250055813cadd25cebee8da1f9a7f995a6eae432 Reviewed-on: https://go-review.googlesource.com/100738 Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'src/runtime/runtime-gdb_test.go')
-rw-r--r--src/runtime/runtime-gdb_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index c96bb95222..090e1c61d0 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -234,11 +234,16 @@ func testGdbPython(t *testing.T, cgo bool) {
t.Fatalf("print strvar failed: %s", bl)
}
- // Issue 16338: ssa decompose phase can split a structure into
- // a collection of scalar vars holding the fields. In such cases
+ // The exact format of composite values has changed over time.
+ // For issue 16338: ssa decompose phase split a slice into
+ // a collection of scalar vars holding its fields. In such cases
// the DWARF variable location expression should be of the
// form "var.field" and not just "field".
- infoLocalsRe := regexp.MustCompile(`.*\sslicevar.cap = `)
+ // However, the newer dwarf location list code reconstituted
+ // aggregates from their fields and reverted their printing
+ // back to its original form.
+
+ infoLocalsRe := regexp.MustCompile(`slicevar *= *\[\]string *= *{"def"}`)
if bl := blocks["info locals"]; !infoLocalsRe.MatchString(bl) {
t.Fatalf("info locals failed: %s", bl)
}