RFR: 8329658: Serial: Refactor ContiguousSpace::_next_compaction_space [v2]

Guoxiong Li gli at openjdk.org
Mon Apr 8 16:10:38 UTC 2024


On Sat, 6 Apr 2024 10:29:38 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Make promotion_failed as private.
>>  - Judge whether to-space is empty.
>
> src/hotspot/share/gc/serial/serialFullGC.cpp line 268:
> 
>> 266:     _spaces[2].init(heap->young_gen()->from());
>> 267: 
>> 268:     if (heap->young_gen()->promotion_failed()) {
> 
> Can we check `to()->is_empty()` here? `promotion_failed` is private and should probably stay private, IMO. `SerialHeap::incremental_collection_failed` would have been appropriate, but that API appears to be abused, `heap->set_incremental_collection_failed(); // Slight lie: we did not even attempt one`

I updated the code just now and used the method `is_empty` you suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18666#discussion_r1556088995


More information about the hotspot-gc-dev mailing list