]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark all runtime.cputicks implementations NOSPLIT
authorDave Cheney <dave@cheney.net>
Wed, 15 Apr 2015 09:11:47 +0000 (19:11 +1000)
committerDave Cheney <dave@cheney.net>
Wed, 15 Apr 2015 09:22:15 +0000 (09:22 +0000)
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 <aram@mgk.ro>
src/runtime/os_linux_arm.go
src/runtime/os_linux_arm64.go

index d88bf785eece5e19ef7da699b22071914f6d0cd3..c5abedbd98fd41fb7ef3f3210c6b8e6da16d750c 100644 (file)
@@ -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.
index c3ad8713495906201e7bd71756ddada2559421c7..3f994f128befefd9e6b49ac528d69d7af6e7a995 100644 (file)
@@ -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.