RFR: 8367347: Serial: Refactor CLDScanClosure [v4]
Francesco Andreuzzi
fandreuzzi at openjdk.org
Thu Sep 11 10:14:27 UTC 2025
On Thu, 11 Sep 2025 06:32:39 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> 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;
> }
> ```
>
> were changed 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.
Thanks @stefank, I addressed this in 959f932411d28c22ab101138ae9bb2027bdad990
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27199#issuecomment-3279684433
More information about the hotspot-gc-dev
mailing list