From: Dave Cheney Date: Wed, 15 Apr 2015 09:11:47 +0000 (+1000) Subject: runtime: mark all runtime.cputicks implementations NOSPLIT X-Git-Tag: go1.5beta1~1111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e629cd0f88d86867f9fc898c6a75fb17060b83ea;p=gostls13.git runtime: mark all runtime.cputicks implementations NOSPLIT Fixes #10450 runtime.cputicks is called from runtime.exitsyscall and must not split the stack. cputicks is implemented in several ways and the NOSPLIT annotation was missing from a few of these. Change-Id: I5cbbb4e5888c5d298fe2fef240782d0e49f59af8 Reviewed-on: https://go-review.googlesource.com/8939 Reviewed-by: Aram Hăvărneanu --- diff --git a/src/runtime/os_linux_arm.go b/src/runtime/os_linux_arm.go index d88bf785ee..c5abedbd98 100644 --- a/src/runtime/os_linux_arm.go +++ b/src/runtime/os_linux_arm.go @@ -64,6 +64,7 @@ func sysargs(argc int32, argv **byte) { } } +//go:nosplit func cputicks() int64 { // Currently cputicks() is used in blocking profiler and to seed fastrand1(). // nanotime() is a poor approximation of CPU ticks that is enough for the profiler. diff --git a/src/runtime/os_linux_arm64.go b/src/runtime/os_linux_arm64.go index c3ad871349..3f994f128b 100644 --- a/src/runtime/os_linux_arm64.go +++ b/src/runtime/os_linux_arm64.go @@ -11,6 +11,7 @@ const ( var randomNumber uint32 +//go:nosplit func cputicks() int64 { // Currently cputicks() is used in blocking profiler and to seed fastrand1(). // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.