Skip to content

Commit 31c5a23

Browse files
mauri870gopherbot
authored andcommitted
[release-branch.go1.21] 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. For #61975 Fixes #61987 Change-Id: I5eca0ba74cfa6acb0259e8400b03c2093cd59dd1 GitHub-Last-Rev: 9e55ae9 GitHub-Pull-Request: #61981 Reviewed-on: https://go-review.googlesource.com/c/go/+/519055 Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> (cherry picked from commit aa5d483) Reviewed-on: https://go-review.googlesource.com/c/go/+/519495 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Austin Clements <[email protected]> Run-TryBot: Michael Knyszek <[email protected]>
1 parent 25ec110 commit 31c5a23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/trace.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,15 @@ func traceBufPtrOf(b *traceBuf) traceBufPtr {
257257
}
258258

259259
// traceEnabled returns true if the trace is currently enabled.
260+
//
261+
//go:nosplit
260262
func traceEnabled() bool {
261263
return trace.enabled
262264
}
263265

264266
// traceShuttingDown returns true if the trace is currently shutting down.
267+
//
268+
//go:nosplit
265269
func traceShuttingDown() bool {
266270
return trace.shutdown
267271
}

0 commit comments

Comments
 (0)