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

Stefan Karlsson stefank at openjdk.org
Fri Sep 12 05:55:16 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`.

Marked as reviewed by stefank (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/27237#pullrequestreview-3214758178


More information about the hotspot-gc-dev mailing list