Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,8 @@ class G1RemarkThreadsClosure : public ThreadClosure {
};

class G1CMRemarkTask : public WorkerTask {
// For Threads::possibly_parallel_threads_do
ThreadsClaimTokenScope _threads_claim_token_scope;
G1ConcurrentMark* _cm;
public:
void work(uint worker_id) {
Expand All @@ -1832,7 +1834,7 @@ class G1CMRemarkTask : public WorkerTask {
}

G1CMRemarkTask(G1ConcurrentMark* cm, uint active_workers) :
WorkerTask("Par Remark"), _cm(cm) {
WorkerTask("Par Remark"), _threads_claim_token_scope(), _cm(cm) {
_cm->terminator()->reset_for_reuse(active_workers);
}
};
Expand All @@ -1851,8 +1853,6 @@ void G1ConcurrentMark::finalize_marking() {
// through the task.

{
StrongRootsScope srs(active_workers);

G1CMRemarkTask remarkTask(this, active_workers);
// We will start all available threads, even if we decide that the
// active_workers will be fewer. The extra ones will just bail out
Expand Down