RFR: 8365880: Shenandoah: Unify memory usage accounting in ShenandoahFreeSet [v12]
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Sep 30 21:55:46 UTC 2025
> This PR eliminates redundant bookkeeping that had been carried out by both ShenandoahGeneration and ShenandoahFreeSet. In the new code, we keep a single tally of relevant information within ShenandoahFreeSet.
> Queries serviced by ShenandoahGeneration are now delegated to ShenandoahFreeSet.
>
> This change eliminates rare and troublesome assertion failures that were often raised when the ShenandoahFreeSet tallies did not match the ShenandoahGeneration tallies. These assertion failures resulted because the two sets of books are updated at different times, using different synchronization mechanisms.
>
> The other benefit of this change is that we have less synchronization overhead because we only have to maintain a single set of books.
Kelvin Nilsen has updated the pull request incrementally with five additional commits since the last revision:
- small refactoring
- OO refinements to used_regions_size()
- fix broken assert from previous commit
- OO refinements to free_unaffiliated_regions()
- OO refinements to max_capacity()
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26867/files
- new: https://git.openjdk.org/jdk/pull/26867/files/c6a51a95..43e1358f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26867&range=11
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26867&range=10-11
Stats: 147 lines in 9 files changed: 76 ins; 56 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/26867.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26867/head:pull/26867
PR: https://git.openjdk.org/jdk/pull/26867
More information about the hotspot-gc-dev
mailing list