RFR: 8264788: Make SequentialSubTasksDone use-once
Albert Mingkun Yang
ayang at openjdk.java.net
Thu Apr 8 09:05:14 UTC 2021
On Wed, 7 Apr 2021 08:32:11 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this change that simplifies code ahead?
>
> SequentialSubTasksDone has some machinery to reset itself automatically after all tasks were claimed.
>
> This is not used at all and can/should be removed.
>
> Test: tier1-3
Looking at how `SequentialSubTasksDone` is used, I don't really see the benefit of having `assert(_num_claimed == _num_tasks)` in the destructor. If we drop that assertion, `Atomic::add` is more readable.
I prefer `Atomic::add` with the assertion removed, but this version is fine as well.
-------------
Marked as reviewed by ayang (Committer).
PR: https://git.openjdk.java.net/jdk/pull/3372
More information about the hotspot-gc-dev
mailing list