diff options
| author | wingrez <wingrez@126.com> | 2025-07-22 16:39:00 +0000 |
|---|---|---|
| committer | Jorropo <jorropo.pgm@gmail.com> | 2025-07-29 10:40:47 -0700 |
| commit | d79405a344a90c2d4018a68382add989e8ccdd33 (patch) | |
| tree | 5c39eebdb6976c5e7cbe57c1f37dca710a0a5958 /src/runtime | |
| parent | 19a086f716869bc79df24e1f30d74334261396db (diff) | |
| download | go-d79405a344a90c2d4018a68382add989e8ccdd33.tar.xz | |
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: 980ef25b43cbae064f9c9cff0b589b2adbc72f1f
GitHub-Pull-Request: golang/go#74705
Reviewed-on: https://go-review.googlesource.com/c/go/+/689436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/arena.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/arena.go b/src/runtime/arena.go index e807995810..0aa3876aaa 100644 --- a/src/runtime/arena.go +++ b/src/runtime/arena.go @@ -745,7 +745,9 @@ func newUserArenaChunk() (unsafe.Pointer, *mspan) { // does represent additional work for the GC, but we also have no idea // what that looks like until we actually allocate things into the // arena). - deductAssistCredit(userArenaChunkBytes) + if gcBlackenEnabled != 0 { + deductAssistCredit(userArenaChunkBytes) + } // Set mp.mallocing to keep from being preempted by GC. mp := acquirem() |
