From e6fb1905cb740b7d68b1c9676f058bf44266539d Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Fri, 19 May 2023 19:39:28 +0000 Subject: [PATCH] runtime: make traceClockNow nosplit 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 TryBot-Result: Gopher Robot Run-TryBot: Michael Knyszek Reviewed-by: Austin Clements Reviewed-by: David Chase --- src/runtime/trace.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/trace.go b/src/runtime/trace.go index 29b9886b8a..703a447674 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -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) } -- 2.48.1