RFR: 8367472: Swap conditions order in PSScavengeCLDOopClosure::do_oop(oop*)

duke duke at openjdk.org
Fri Sep 12 08:02:17 UTC 2025


On Thu, 11 Sep 2025 22:36:52 GMT, Francesco Andreuzzi <fandreuzzi 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`.

@fandreuz 
Your change (at version bdeb3eefd6a5fc037b735cfc634e3679941c0d79) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/27237#issuecomment-3284196649


More information about the hotspot-gc-dev mailing list