RFR: 8074101: Add verification that all tasks are actually claimed during roots processing [v3]
Kim Barrett
kbarrett at openjdk.java.net
Wed Jan 13 08:40:59 UTC 2021
On Tue, 12 Jan 2021 22:19:21 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> The first commit removes some obsolete enum items, while the second commit adds the verification logic. Commit 2 introduces some "empty" task claims for the verification logic, explicitly marked in the comments.
>>
>> Test: hotspot_gc
>
> Albert Mingkun Yang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
Changes requested by kbarrett (Reviewer).
src/hotspot/share/gc/shared/workgroup.cpp line 384:
> 382: }
> 383: assert(is_skipped, "%d not claimed.", i);
> 384: }
Can also do a separate loop over `skipped` to verify `_tasks[skipped[i]] == 0` (with appropriate bounds checking).
src/hotspot/share/gc/shared/workgroup.hpp line 336:
> 334: //
> 335: // n_threads - Number of threads executing the sub-tasks.
> 336: // followed by vararg skipped tasks
The description comment should be augmented to describe the optional skipped values.
src/hotspot/share/gc/g1/g1RootProcessor.cpp line 109:
> 107: // refProcessor is not needed since we are inside a safe point
> 108: _process_strong_tasks.all_tasks_completed(n_workers(),
> 109: G1RP_PS_CodeCache_oops_do, G1RP_PS_refProcessor_oops_do);
When parameters or arguments are on multiple lines, we usually align all the arguments, and usually one per line. There are some other similar cases elsewhere in this change that I didn't redundantly comment.
src/hotspot/share/gc/shared/workgroup.hpp line 29:
> 27:
> 28: #include "memory/allocation.hpp"
> 29: #include "metaprogramming/logical.hpp"
Should also add metaprogramming/enableIf.hpp, to avoid implicit include dependency.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2046
More information about the hotspot-gc-dev
mailing list