RFR: 8259851: Use boolean type for tasks in SubTasksDone

Albert Mingkun Yang ayang at openjdk.java.net
Thu Jan 21 12:06:54 UTC 2021


On Thu, 21 Jan 2021 11:38:41 GMT, Thomas Schatzl <tschatzl 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.

Thank you for the reviews.

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

PR: https://git.openjdk.java.net/jdk/pull/2131



More information about the hotspot-gc-dev mailing list