From: Jordan Rhee Date: Wed, 12 Dec 2018 19:28:46 +0000 (-0800) Subject: runtime: pass LR to sigprof on windows/arm X-Git-Tag: go1.12beta1~83 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1ca84deeb048ac8ab850f68eb84ee7811d957676;p=gostls13.git runtime: pass LR to sigprof on windows/arm TestCPUProfileLabel was failing on windows/arm because the link register was not being passed to sigprof(). The link register is required to generate a correct traceback. With this change, all tests in runtime.pprof are now passing. Updates #26148 Change-Id: Ia693b34278dc08a98023751ff1a922d9eee8fdd6 Reviewed-on: https://go-review.googlesource.com/c/153839 Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index 5870a342c2..9b34589874 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -879,7 +879,7 @@ func profilem(mp *m, thread uintptr) { gp = *((**g)(unsafe.Pointer(tls))) } - sigprof(r.ip(), r.sp(), 0, gp, mp) + sigprof(r.ip(), r.sp(), r.lr(), gp, mp) } func profileloop1(param uintptr) uint32 {