Skip to content

Commit d79405a

Browse files
wingrezJorropo
authored andcommitted
runtime: only deduct assist credit for arenas during GC
CL 617876 has changed the original behavior. This modification will restore it. Change-Id: I72cce82ebed362f99da7548035435397c835c99b GitHub-Last-Rev: 980ef25 GitHub-Pull-Request: #74705 Reviewed-on: https://go-review.googlesource.com/c/go/+/689436 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Mark Freeman <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 19a086f commit d79405a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/arena.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,9 @@ func newUserArenaChunk() (unsafe.Pointer, *mspan) {
745745
// does represent additional work for the GC, but we also have no idea
746746
// what that looks like until we actually allocate things into the
747747
// arena).
748-
deductAssistCredit(userArenaChunkBytes)
748+
if gcBlackenEnabled != 0 {
749+
deductAssistCredit(userArenaChunkBytes)
750+
}
749751

750752
// Set mp.mallocing to keep from being preempted by GC.
751753
mp := acquirem()

0 commit comments

Comments
 (0)