RFR: 8324981: Shenandoah: Move commit and soft max heap changed methods into heap

Aleksey Shipilev shade at openjdk.org
Tue Jan 30 17:35:19 UTC 2024


On Tue, 30 Jan 2024 16:46:00 GMT, William Kemper <wkemper at openjdk.org> wrote:

> These methods could have been static in control thread because they only interact with the heap. Moving them into the heap reduces code duplication on the generational mode branch.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 795:

> 793: }
> 794: 
> 795: void ShenandoahHeap::service_uncommit(double shrink_before, size_t shrink_until) {

I propose we call it `maybe_uncommit`. I think you can then also inline `entry_uncommit` right here, as we don't need the interface between control thread and heap anymore.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17634#discussion_r1471666363


More information about the hotspot-gc-dev mailing list