RFR: 8365880: Shenandoah: Unify memory usage accounting in ShenandoahFreeSet [v5]
Kelvin Nilsen
kdnilsen at openjdk.org
Sun Sep 28 23:52:07 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 with a new target base due to a merge or a rebase. The pull request now contains 116 commits:
- Merge remote-tracking branch 'jdk/master' into freeset-has-authoritative-tallies
- revert changes to shenandoahAdaptiveHeuristics.cpp
- another tweak to make GHA gtest happy
- Add include file for missing declaration
- Fix ShenandoahAllocationRate::sample() and remove debug scaffolding
- Remove debug instrumentation
- Cleanup make_all_regions_unavailable()
- Remove RENAISSANCE debugging instrumentation
- Replace MEMORY_USAGE debugging with assertions
- Zero [empty_]region_counts in make_all_regions_unavailable plus lots of debug instrumentation
- ... and 106 more: https://git.openjdk.org/jdk/compare/320230db...7fad8482
-------------
Changes: https://git.openjdk.org/jdk/pull/26867/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26867&range=04
Stats: 3110 lines in 34 files changed: 1978 ins; 539 del; 593 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