RFR: 8361705: Clean up KlassCleaningTask
Aleksey Shipilev
shade at openjdk.org
Mon Jul 14 10:19:39 UTC 2025
On Mon, 14 Jul 2025 10:06:56 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this cleanup of `KlassCleaningTask`, fixing some style issues.
>
> Testing: gha
>
> Thanks,
> Thomas
Looks OK with nits.
src/hotspot/share/gc/shared/parallelCleaning.cpp line 107:
> 105: }
> 106:
> 107: return !Atomic::cmpxchg(&_clean_klass_tree_claimed, false, true);
Generally, I prefer to see `Atomic::cmpxchg(&_clean_klass_tree_claimed, false, true) == false`, because `false` here is not about the logical boolean expression, but about the "old" value`false`, which just happens to be a boolean.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26289#pullrequestreview-3015715872
PR Review Comment: https://git.openjdk.org/jdk/pull/26289#discussion_r2204483031
More information about the hotspot-gc-dev
mailing list