]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: pass LR to sigprof on windows/arm
authorJordan Rhee <jordanrh@microsoft.com>
Wed, 12 Dec 2018 19:28:46 +0000 (11:28 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 12 Dec 2018 23:17:48 +0000 (23:17 +0000)
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 <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/os_windows.go

index 5870a342c278932502cfe97bdfd2fdbbefb3c6a2..9b34589874c54cea836bf0dcfce0c69745dab61a 100644 (file)
@@ -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 {