mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8368989: Use NMethodMarkingScope and ThreadsClaimTokenScope in shenandoahSTWMark
Reviewed-by: shade, ayang
This commit is contained in:
parent
3d113af9e3
commit
1d55adee11
@ -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"
|
||||
@ -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);
|
||||
@ -48,7 +50,9 @@ public:
|
||||
|
||||
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) {
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user