RFR: 8330145: Serial: Refactor SerialHeap::scan_evacuated_objs

Thomas Schatzl tschatzl at openjdk.org
Thu Apr 18 08:29:04 UTC 2024


On Fri, 12 Apr 2024 14:41:37 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Ohh, I see. The old-gen is scaned finally, so the objects in old-gen are totally processed. But the to-space of the young-gen is firstly scaned, so we need to judge it.
>> 
>> What about `while (!young_gen()->no_allocs_since_save_marks())`? But it is OK now.
>
> That should also work; identical asm I assume.
> 
> (The double negation (`!` and `no_`) makes it slightly less readable, so I went for this `break` approach.)

Would it be possible to rename the method then? The `break` approach is much uglier.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18750#discussion_r1570250816


More information about the hotspot-gc-dev mailing list