Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8264052: Shenandoah: Backout 8263832
Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Mar 24, 2021
1 parent e55aa41 commit 9ee0b9a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Expand Up @@ -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);
}
}
}
}
Expand Down Expand Up @@ -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,
Expand Down

1 comment on commit 9ee0b9a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.