diff options
| author | Michael Pratt <mpratt@google.com> | 2025-03-24 04:24:35 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-03-24 20:56:45 -0700 |
| commit | 4f11f8ff7db476c534b9b1ad8910dcdd8bbcf022 (patch) | |
| tree | 32d40f0fa1b047a790241b0567caa23494c06a0b /src/runtime/traceback.go | |
| parent | 9c88db5f1eba68999184bb043a0b339349b81db4 (diff) | |
| download | go-4f11f8ff7db476c534b9b1ad8910dcdd8bbcf022.tar.xz | |
runtime: rename runfinq to runFinalizersAndCleanups
Users see this frame in tracebacks and it serves as a hint that what is
running here is a finalizer or cleanup. But runfinq is a rather dense
name. We can give it a more obvious name to help users realize what it
is.
For #73011.
Change-Id: I6a6a636ce9a493fd00d4b4c60c23f2b1c96d3568
Reviewed-on: https://go-review.googlesource.com/c/go/+/660296
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/traceback.go')
| -rw-r--r-- | src/runtime/traceback.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index d71c1d5d0b..2ba05395d2 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -1131,8 +1131,9 @@ func showfuncinfo(sf srcFunc, firstFrame bool, calleeID abi.FuncID) bool { return false } - // Always show runtime.runfinq as context that this goroutine is - // running finalizers, otherwise there is no obvious indicator. + // Always show runtime.runFinalizersAndCleanups as context that this + // goroutine is running finalizers, otherwise there is no obvious + // indicator. // // TODO(prattmic): A more general approach would be to always show the // outermost frame (besides runtime.goexit), even if it is a runtime. @@ -1142,7 +1143,7 @@ func showfuncinfo(sf srcFunc, firstFrame bool, calleeID abi.FuncID) bool { // Unfortunately, implementing this requires looking ahead at the next // frame, which goes against traceback's incremental approach (see big // coment in traceback1). - if sf.funcID == abi.FuncID_runfinq { + if sf.funcID == abi.FuncID_runFinalizersAndCleanups { return true } @@ -1346,7 +1347,8 @@ func tracebackHexdump(stk stack, frame *stkframe, bad uintptr) { // isSystemGoroutine reports whether the goroutine g must be omitted // in stack dumps and deadlock detector. This is any goroutine that // starts at a runtime.* entry point, except for runtime.main, -// runtime.handleAsyncEvent (wasm only) and sometimes runtime.runfinq. +// runtime.handleAsyncEvent (wasm only) and sometimes +// runtime.runFinalizersAndCleanups. // // If fixed is true, any goroutine that can vary between user and // system (that is, the finalizer goroutine) is considered a user @@ -1360,7 +1362,7 @@ func isSystemGoroutine(gp *g, fixed bool) bool { if f.funcID == abi.FuncID_runtime_main || f.funcID == abi.FuncID_corostart || f.funcID == abi.FuncID_handleAsyncEvent { return false } - if f.funcID == abi.FuncID_runfinq { + if f.funcID == abi.FuncID_runFinalizersAndCleanups { // We include the finalizer goroutine if it's calling // back into user code. if fixed { |
