RFR: 8367472: Swap conditions order in PSScavengeCLDOopClosure::do_oop(oop*)
Thomas Schatzl
tschatzl at openjdk.org
Fri Sep 12 09:00:36 UTC 2025
On Fri, 12 Sep 2025 08:31:28 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> In this PR I propose to swap the order of conditions in `PSScavengeCLDOopClosure::do_oop`, as proposed during the review of #27199. This change will move the trivial check first in the `if` clause, which is easier for the reader and potentially for the branch predictor. This will also bring parity with `CLDOopClosure` (Serial).
>>
>> Passes `tier1`.
>
> Marked as reviewed by mli (Reviewer).
@Hamlin-Li : this change, while it has obtained the required reviews, still needs to obey the 24h rule. So please do not push if the reviewers did not confirm the "trivial" condition in the future. It is not sufficient if the author suggested that the change is trivial.
Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27237#issuecomment-3284385057
More information about the hotspot-gc-dev
mailing list