RFR: 8271884: G1CH::_expand_heap_after_alloc_failure is no longer needed [v2]

Thomas Schatzl tschatzl at openjdk.java.net
Wed Aug 11 09:10:26 UTC 2021


On Wed, 11 Aug 2021 08:39:03 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> Hi,
>> 
>> Please review this change to remove _expand_heap_after_alloc_failure. Checks for old_is_full(), survivor_is_full(), and G1CollectedHeap::has_more_regions() should eliminate repeated expansion attempts.
>> 
>> Testing; tier 1
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
> 
>   check *_is_full status after acquiring FreeList_lock

Lgtm, please add the suggested comments.

src/hotspot/share/gc/g1/g1Allocator.cpp line 277:

> 275:   if (result == NULL && !old_is_full()) {
> 276:     MutexLocker x(FreeList_lock, Mutex::_no_safepoint_check_flag);
> 277:     if (!old_is_full()) {

Please add a short comment about the reasons for the re-check here (and above)

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

Marked as reviewed by tschatzl (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5030



More information about the hotspot-gc-dev mailing list