RFR: 8329658: Serial: Refactor ContiguousSpace::_next_compaction_space [v4]
Thomas Schatzl
tschatzl at openjdk.org
Tue Apr 9 12:09:10 UTC 2024
On Mon, 8 Apr 2024 16:28:25 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Hi all,
>>
>> This patch removes the uncessary `ContiguousSpace::_next_compaction_space` and uses `DefNewGeneration::_promotion_failed` instead.
>>
>> The tests `make test-tier1_gc` passed locally.
>>
>> Thanks for taking the time to review.
>>
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>
> Polish
Marked as reviewed by tschatzl (Reviewer).
See comment on the use of a local `promotion_failed` variable.
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.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18666#pullrequestreview-1988866414
Changes requested by tschatzl (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18666#pullrequestreview-1988868002
PR Review Comment: https://git.openjdk.org/jdk/pull/18666#discussion_r1557523841
More information about the hotspot-gc-dev
mailing list