Skip to content
Permalink
Browse files
8264052: Shenandoah: Backout 8263832
Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Mar 24, 2021
1 parent e55aa41 commit 9ee0b9a17bfa4fc2e4e5fa00cfd76aaa5dbbfd94
Showing 1 changed file with 12 additions and 8 deletions.
@@ -96,19 +96,23 @@ class ShenandoahSATBAndRemarkThreadsClosure : public ThreadClosure {
private:
SATBMarkQueueSet& _satb_qset;
OopClosure* const _cl;
uintx _claim_token;

public:
ShenandoahSATBAndRemarkThreadsClosure(SATBMarkQueueSet& satb_qset, OopClosure* cl) :
_satb_qset(satb_qset),
_cl(cl) {}
_cl(cl),
_claim_token(Threads::thread_claim_token()) {}

void do_thread(Thread* thread) {
// Transfer any partial buffer to the qset for completed buffer processing.
_satb_qset.flush_queue(ShenandoahThreadLocalData::satb_mark_queue(thread));
if (thread->is_Java_thread()) {
if (_cl != NULL) {
ResourceMark rm;
thread->oops_do(_cl, NULL);
if (thread->claim_threads_do(true, _claim_token)) {
// Transfer any partial buffer to the qset for completed buffer processing.
_satb_qset.flush_queue(ShenandoahThreadLocalData::satb_mark_queue(thread));
if (thread->is_Java_thread()) {
if (_cl != NULL) {
ResourceMark rm;
thread->oops_do(_cl, NULL);
}
}
}
}
@@ -143,7 +147,7 @@ class ShenandoahFinalMarkingTask : public AbstractGangTask {
ShenandoahMarkRefsClosure mark_cl(q, rp);
ShenandoahSATBAndRemarkThreadsClosure tc(satb_mq_set,
ShenandoahIUBarrier ? &mark_cl : NULL);
Threads::possibly_parallel_threads_do(true /*par*/, &tc);
Threads::threads_do(&tc);
}

_cm->mark_loop(worker_id, _terminator, rp,

0 comments on commit 9ee0b9a

Please sign in to comment.