RFR: 8259668: Make SubTasksDone use-once [v3]
Kim Barrett
kbarrett at openjdk.java.net
Tue Feb 16 06:21:39 UTC 2021
On Sun, 7 Feb 2021 09:47:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> After JDK-8260574, a instance of `SubTasksDone` is never reused, so part of its APIs could be revised: `clear()` and the code calling it is removed.
>>
>> With this patch, `all_tasks_completed` contains only assertion. Kim suggested moving this assertion logic to `~SubTasksDone`, but that could defer the assertion violation. For example, in the case of `G1FullGCMarkTask::work`, there is a significant amount of code running btw the instance when all subtasks are claimed (where `all_tasks_completed` is called in this PR) and `~SubTasksDone`. In the interest of having more precise location where bugs may lie, I have kept `all_tasks_completed` in the original place. More comments on this are welcome.
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> review
I would prefer to see all_tasks_claimed eliminated rather than made more
precise at the expense of being more complicated. I think the added
precision doesn't provide enough benefit (vs alternatives like checking once
in the destructor) to pay the API, usage, and implementation cost. But
that's matter of opinion, about which Albert feels to the contrary. I think
this change is an improvement regardless of that question, so won't block on
that basis.
So looks good.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2383
More information about the hotspot-dev
mailing list