RFR: 8367240: Parallel: Refactor PSScavengeCLDClosure [v4]

Francesco Andreuzzi duke at openjdk.org
Wed Sep 10 10:28:31 UTC 2025


On Wed, 10 Sep 2025 10:21:57 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> src/hotspot/share/gc/parallel/psClosure.inline.hpp line 101:
>> 
>>> 99:       RawAccess<IS_NOT_NULL>::oop_store(p, new_obj);
>>> 100: 
>>> 101:       if (PSScavenge::is_obj_in_young(new_obj) && !_has_oops_into_young_gen) {
>> 
>> Why do you need to check `!_has_oops_into_young_gen` ?
>
> It's to avoid writing `_has_oops_into_young_gen` multiple times, if it's already `true`. (Both versions are correct though.)

Yeah, I was curious why it's needed. What's the problem with just writing `true` if it's already `true`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27165#discussion_r2336299129


More information about the hotspot-gc-dev mailing list