]> Cypherpunks repositories - gostls13.git/commit
runtime: improve Pinner with gcBits
authorSven Anderson <sven@anderson.de>
Thu, 4 May 2023 22:15:07 +0000 (00:15 +0200)
committerMichael Knyszek <mknyszek@google.com>
Fri, 19 May 2023 23:21:57 +0000 (23:21 +0000)
commit697644070c6e335b9c3dffdd4e82feb8038c3f22
tree786e5a6aac283e68c63c411e0cb005abca939e22
parent6891405bbefc005467bd334d4061b599129a18c9
runtime: improve Pinner with gcBits

This change replaces the statically sized pinnerBits with gcBits
based ones, that are copied in each GC cycle if they exist.  The
pinnerBits now include a second bit per object, that indicates if a
pinner counter for multi-pins exists, in order to avoid unnecessary
specials iterations.

This is a follow-up to CL 367296.

Change-Id: I82e38cecd535e18c3b3ae54b5cc67d3aeeaafcfd
Reviewed-on: https://go-review.googlesource.com/c/go/+/493275
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/runtime/mgcsweep.go
src/runtime/mheap.go
src/runtime/pinner.go