Skip to content

Commit 4728f74

Browse files
committed
8369571: Parallel: Use ThreadsClaimTokenScope in PSAdjustTask
Reviewed-by: fandreuzzi, tschatzl
1 parent 1605e83 commit 4728f74

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/hotspot/share/gc/parallel/psParallelCompact.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,7 @@ void PSParallelCompact::adjust_pointers_in_spaces(uint worker_id, volatile uint*
13621362
}
13631363

13641364
class PSAdjustTask final : public WorkerTask {
1365+
ThreadsClaimTokenScope _threads_claim_token_scope;
13651366
SubTasksDone _sub_tasks;
13661367
WeakProcessor::Task _weak_proc_task;
13671368
OopStorageSetStrongParState<false, false> _oop_storage_iter;
@@ -1377,16 +1378,12 @@ class PSAdjustTask final : public WorkerTask {
13771378
public:
13781379
PSAdjustTask(uint nworkers) :
13791380
WorkerTask("PSAdjust task"),
1381+
_threads_claim_token_scope(),
13801382
_sub_tasks(PSAdjustSubTask_num_elements),
13811383
_weak_proc_task(nworkers),
13821384
_nworkers(nworkers) {
13831385

13841386
ClassLoaderDataGraph::verify_claimed_marks_cleared(ClassLoaderData::_claim_stw_fullgc_adjust);
1385-
Threads::change_thread_claim_token();
1386-
}
1387-
1388-
~PSAdjustTask() {
1389-
Threads::assert_all_threads_claimed();
13901387
}
13911388

13921389
void work(uint worker_id) {

0 commit comments

Comments
 (0)