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

Francesco Andreuzzi fandreuzzi at openjdk.org
Fri Sep 12 08:35:56 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`.

This pull request has now been integrated.

Changeset: 5f43345d
Author:    Francesco Andreuzzi <fandreuzzi at openjdk.org>
Committer: Hamlin Li <mli at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5f43345d6e9c27ae99fffd3a53e8064ed84de458
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

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

Reviewed-by: stefank, tschatzl, mli

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

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


More information about the hotspot-gc-dev mailing list