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
11 changes: 7 additions & 4 deletions src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*/



#include "gc/shared/strongRootsScope.hpp"
#include "code/nmethod.hpp"
#include "gc/shared/taskTerminator.hpp"
#include "gc/shared/workerThread.hpp"
#include "gc/shenandoah/shenandoahClosures.inline.hpp"
Expand All @@ -36,10 +35,13 @@
#include "gc/shenandoah/shenandoahRootProcessor.inline.hpp"
#include "gc/shenandoah/shenandoahSTWMark.hpp"
#include "gc/shenandoah/shenandoahVerifier.hpp"
#include "runtime/threads.hpp"

class ShenandoahSTWMarkTask : public WorkerTask {
private:
ShenandoahSTWMark* const _mark;
NMethodMarkingScope _nmethod_marking_scope;
ThreadsClaimTokenScope _threads_claim_token_scope;

public:
ShenandoahSTWMarkTask(ShenandoahSTWMark* mark);
Expand All @@ -48,7 +50,9 @@ class ShenandoahSTWMarkTask : public WorkerTask {

ShenandoahSTWMarkTask::ShenandoahSTWMarkTask(ShenandoahSTWMark* mark) :
WorkerTask("Shenandoah STW mark"),
_mark(mark) {
_mark(mark),
_nmethod_marking_scope(),
_threads_claim_token_scope() {
}

void ShenandoahSTWMarkTask::work(uint worker_id) {
Expand Down Expand Up @@ -98,7 +102,6 @@ void ShenandoahSTWMark::mark() {
_generation->scan_remembered_set(false /* is_concurrent */);
}

StrongRootsScope scope(nworkers);
ShenandoahSTWMarkTask task(this);
heap->workers()->run_task(&task);

Expand Down