RFR: 8259851: Use boolean type for tasks in SubTasksDone
Thomas Schatzl
tschatzl at openjdk.java.net
Thu Jan 21 11:41:54 UTC 2021
On Mon, 18 Jan 2021 14:17:21 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Changing `uint` to `bool` in `SubTasksDone`, since atomic operations on `bool` are well supported.
>
> Tested: hotspot_gc
Lgtm.
Not sure what the arguments were, but:
The low number of invocations/cmpxchg (<10 iirc) is dwarfed by the number of other (regular) cmpxchg evacuation needs to do (for every evacuated object at least once, if not more), not talking about other barriers and actual code to be executed per object or reference.
Further, at least on 32-bit ARM the number of threads is typically very small, so the contention is expected to be very low too, i.e. the amount of retries induced by this change.
-------------
Marked as reviewed by tschatzl (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2131
More information about the hotspot-gc-dev
mailing list