From 6a32c8ff6e63f8b149c0803e8b6636022bd9d066 Mon Sep 17 00:00:00 2001 From: Tony Tang Date: Sat, 6 Dec 2025 16:26:13 +0000 Subject: [PATCH] runtime: delete unused parameter of userForced --- src/runtime/export_test.go | 2 +- src/runtime/mgc.go | 2 +- src/runtime/mgcpacer.go | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 4f6ef9a3f262c4..8d2cdb0f9d1b72 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -1469,7 +1469,7 @@ func (c *GCController) Revise(d GCControllerReviseDelta) { func (c *GCController) EndCycle(bytesMarked uint64, assistTime, elapsed int64, gomaxprocs int) { c.assistTime.Store(assistTime) - c.endCycle(elapsed, gomaxprocs, false) + c.endCycle(elapsed, gomaxprocs) c.resetLive(bytesMarked) c.commit(false) } diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index a3bed4b3eb62f9..b8f99d1ed448d5 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -1167,7 +1167,7 @@ top: // endCycle depends on all gcWork cache stats being flushed. // The termination algorithm above ensured that up to // allocations since the ragged barrier. - gcController.endCycle(now, int(gomaxprocs), work.userForced) + gcController.endCycle(now, int(gomaxprocs)) // Perform mark termination. This will restart the world. gcMarkTermination(stw) diff --git a/src/runtime/mgcpacer.go b/src/runtime/mgcpacer.go index 388cce83cd2388..b62f6404a5827a 100644 --- a/src/runtime/mgcpacer.go +++ b/src/runtime/mgcpacer.go @@ -595,9 +595,7 @@ func (c *gcControllerState) revise() { } // endCycle computes the consMark estimate for the next cycle. -// userForced indicates whether the current GC cycle was forced -// by the application. -func (c *gcControllerState) endCycle(now int64, procs int, userForced bool) { +func (c *gcControllerState) endCycle(now int64, procs int) { // Record last heap goal for the scavenger. // We'll be updating the heap goal soon. gcController.lastHeapGoal = c.heapGoal()