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

Francesco Andreuzzi fandreuzzi at openjdk.org
Thu Sep 11 22:44:24 UTC 2025


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`.

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

Commit messages:
 - swap

Changes: https://git.openjdk.org/jdk/pull/27237/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27237&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367472
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27237.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27237/head:pull/27237

PR: https://git.openjdk.org/jdk/pull/27237


More information about the hotspot-gc-dev mailing list