RFR: 8329658: Serial: Refactor ContiguousSpace::_next_compaction_space [v4]
Albert Mingkun Yang
ayang at openjdk.org
Tue Apr 9 13:43:10 UTC 2024
On Tue, 9 Apr 2024 13:32:35 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> src/hotspot/share/gc/serial/serialFullGC.cpp line 269:
>>
>>> 267: _spaces[2].init(heap->young_gen()->from());
>>> 268:
>>> 269: if (!heap->young_gen()->to()->is_empty()) {
>>
>> A local variable `bool promotion_failed = ...` and using it afterwards would improve readability.
>
> Actually, it is not only about failed promotion. When the to-space is not empty, we must deal with it. But usually, the failed promotion causes the to-space not empty.
Can non-empty-to-space occur without fail-promotion?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18666#discussion_r1557650631
More information about the hotspot-gc-dev
mailing list