Skip to content

Commit baf8bc5

Browse files
fandreuzshipilev
authored andcommitted
8369038: Parallel: Use NMethodMarkingScope and ThreadsClaimTokenScope in psParallelCompact
Reviewed-by: ayang, shade
1 parent 59e8743 commit baf8bc5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "classfile/symbolTable.hpp"
2929
#include "classfile/systemDictionary.hpp"
3030
#include "code/codeCache.hpp"
31+
#include "code/nmethod.hpp"
3132
#include "compiler/oopMap.hpp"
3233
#include "gc/parallel/objectStartArray.inline.hpp"
3334
#include "gc/parallel/parallelArguments.hpp"
@@ -61,7 +62,6 @@
6162
#include "gc/shared/referenceProcessor.hpp"
6263
#include "gc/shared/referenceProcessorPhaseTimes.hpp"
6364
#include "gc/shared/spaceDecorator.hpp"
64-
#include "gc/shared/strongRootsScope.hpp"
6565
#include "gc/shared/taskTerminator.hpp"
6666
#include "gc/shared/weakProcessor.inline.hpp"
6767
#include "gc/shared/workerPolicy.hpp"
@@ -1085,15 +1085,17 @@ void steal_marking_work(TaskTerminator& terminator, uint worker_id) {
10851085
}
10861086

10871087
class MarkFromRootsTask : public WorkerTask {
1088-
StrongRootsScope _strong_roots_scope; // needed for Threads::possibly_parallel_threads_do
1088+
NMethodMarkingScope _nmethod_marking_scope;
1089+
ThreadsClaimTokenScope _threads_claim_token_scope;
10891090
OopStorageSetStrongParState<false /* concurrent */, false /* is_const */> _oop_storage_set_par_state;
10901091
TaskTerminator _terminator;
10911092
uint _active_workers;
10921093

10931094
public:
10941095
MarkFromRootsTask(uint active_workers) :
10951096
WorkerTask("MarkFromRootsTask"),
1096-
_strong_roots_scope(active_workers),
1097+
_nmethod_marking_scope(),
1098+
_threads_claim_token_scope(),
10971099
_terminator(active_workers, ParCompactionManager::marking_stacks()),
10981100
_active_workers(active_workers) {}
10991101

0 commit comments

Comments
 (0)