]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: make traceClockNow nosplit
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 19 May 2023 19:39:28 +0000 (19:39 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 19 May 2023 19:56:59 +0000 (19:56 +0000)
It's called from exitsyscall, which is nosplit.

Change-Id: I3f5f92e044497a88a72c1870beb2bdd15c4263c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/496517
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/runtime/trace.go

index 29b9886b8aa9a607d1fb076879559a28633c39fc..703a4476742493dc19c9bf6148d549b5f4e54b84 100644 (file)
@@ -1786,6 +1786,10 @@ type traceTime uint64
 // traceClockNow returns a monotonic timestamp. The clock this function gets
 // the timestamp from is specific to tracing, and shouldn't be mixed with other
 // clock sources.
+//
+// nosplit because it's called from exitsyscall, which is nosplit.
+//
+//go:nosplit
 func traceClockNow() traceTime {
        return traceTime(cputicks() / traceTimeDiv)
 }