RFR: 8355756: G1HeapSizingPolicy::full_collection_resize_amount should consider allocation size [v3]
Thomas Schatzl
tschatzl at openjdk.org
Mon May 5 11:34:55 UTC 2025
On Mon, 5 May 2025 09:50:33 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Hi,
>>
>> Please review this change to account for pending allocations when deciding how much to shrink the heap after a full gc. Otherwise, we shrink the heap only to trigger an expansion to satisfy the allocation request that triggered the full gc.
>>
>> Testing: Tier 1-3
>
> Ivan Walulya has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - use align_up_to_region_byte_size
> - Merge remote-tracking branch 'upstream/master' into full_collection_resize_amount
> - Thomas Review
> - nit
> - refactor full collection
Maybe update that suggested comment (sorry, missed pointing that out earlier), but good.
src/hotspot/share/gc/g1/g1CollectedHeap.hpp line 484:
> 482: // compacting collection, leaving no dead wood.
> 483: // - if allocation_word_size is set, then this allocation size will
> 484: // be accounted for in case shrinking of the heap happens.
Suggestion:
// - allocation_word_size is the size allocation that caused this collection.
// To be considered when resizing the heap at the end of the full collection.
-------------
Marked as reviewed by tschatzl (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24944#pullrequestreview-2814512672
PR Review Comment: https://git.openjdk.org/jdk/pull/24944#discussion_r2073273737
More information about the hotspot-gc-dev
mailing list