1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:24:43 -07:00

runtime: mark traceEnabled and traceShuttingDown as no:split

This fixes a regression from CL 494181.
The traceEnabled function splits the stack and is being
called by reentersyscall that shouldn't call anything
that splits the stack. Same with traceShuttingDown.

Fixes #61975

Change-Id: I5eca0ba74cfa6acb0259e8400b03c2093cd59dd1
GitHub-Last-Rev: 9e55ae9d7c
GitHub-Pull-Request: golang/go#61981
Reviewed-on: https://go-review.googlesource.com/c/go/+/519055
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Mauri de Souza Meneguzzo 2023-08-13 14:04:53 +00:00 committed by Michael Knyszek
parent 36dc84ca57
commit aa5d483f25

View File

@ -257,11 +257,15 @@ func traceBufPtrOf(b *traceBuf) traceBufPtr {
}
// traceEnabled returns true if the trace is currently enabled.
//
//go:nosplit
func traceEnabled() bool {
return trace.enabled
}
// traceShuttingDown returns true if the trace is currently shutting down.
//
//go:nosplit
func traceShuttingDown() bool {
return trace.shutdown
}