Update to go1.24.5

This commit is contained in:
Vorapol Rinsatitnon
2025-07-10 22:34:08 +07:00
parent b065c9156b
commit 5f4d34edc5
40 changed files with 456 additions and 130 deletions

View File

@@ -1147,17 +1147,17 @@ func (w waitReason) isMutexWait() bool {
w == waitReasonSyncRWMutexLock
}
func (w waitReason) isWaitingForGC() bool {
return isWaitingForGC[w]
func (w waitReason) isWaitingForSuspendG() bool {
return isWaitingForSuspendG[w]
}
// isWaitingForGC indicates that a goroutine is only entering _Gwaiting and
// setting a waitReason because it needs to be able to let the GC take ownership
// of its stack. The G is always actually executing on the system stack, in
// these cases.
// isWaitingForSuspendG indicates that a goroutine is only entering _Gwaiting and
// setting a waitReason because it needs to be able to let the suspendG
// (used by the GC and the execution tracer) take ownership of its stack.
// The G is always actually executing on the system stack in these cases.
//
// TODO(mknyszek): Consider replacing this with a new dedicated G status.
var isWaitingForGC = [len(waitReasonStrings)]bool{
var isWaitingForSuspendG = [len(waitReasonStrings)]bool{
waitReasonStoppingTheWorld: true,
waitReasonGCMarkTermination: true,
waitReasonGarbageCollection: true,