RFR: 8367347: Serial: Refactor CLDScanClosure [v4]
Stefan Karlsson
stefank at openjdk.org
Thu Sep 11 06:35:42 UTC 2025
On Wed, 10 Sep 2025 19:38:14 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:
>> Refactor `CLDScanClosure` so that all CLD logic is encapsulated in the CLD closure, without polluting the oop closure.
>>
>> Test: tier1-2, running tier3
>
> Francesco Andreuzzi has updated the pull request incrementally with one additional commit since the last revision:
>
> inline
Looks good to me. FWIW, in this and in Albert's previous patch I had to check `is_in_young_gen` to see if it was a trivial check and not something complicated. We could make it easier for the readers if this code:
if (is_in_young_gen(new_obj) && !_has_oops_into_young_gen) {
_has_oops_into_young_gen = true;
}
to:
if (!_has_oops_into_young_gen && is_in_young_gen(new_obj)) {
_has_oops_into_young_gen = true;
}
It might also be nicer to the branch predictor.
-------------
Marked as reviewed by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27199#pullrequestreview-3209146296
More information about the hotspot-gc-dev
mailing list