> See the bug for more discussion and reproducer. This PR replaces the ad-hoc > linked list with the `ArrayList` wrapper that manages synchronization, search > and replacements efficiently. Arrays are easy targets for GC. There are > possible improvements here, most glaring is parallelism that is currently > knee-capped by global synchronization. The synchronization scheme follows > what we have in original code, and I think it is safer to continue with it > right now. > > I'll put performance data in a separate comment. > > Additional testing: > - [x] Original reproducer improves drastically > - [x] New microbenchmark shows no regression on "churning" tests, which > covers insertion/removal perf > - [x] New microbenchmark shows improvement on Full GC times (crude, but > repeatable), serves as a proxy for reproducer > - [x] `java/lang/ref` tests in release > - [x] `all` tests in fastdebug
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Review feedback: make sure trimming actually works, stylistic changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22043/files - new: https://git.openjdk.org/jdk/pull/22043/files/0194c9bc..d4a03d85 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22043&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22043&range=03-04 Stats: 40 lines in 2 files changed: 18 ins; 0 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/22043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22043/head:pull/22043 PR: https://git.openjdk.org/jdk/pull/22043