--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp Thu Dec 13 14:36:54 2018 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp Wed Dec 12 13:50:57 2018 -0500
@@ -939,9 +939,6 @@
q = queues->claim_next();
while (q != NULL) {
if (CANCELLABLE && heap->check_cancelled_gc_and_yield()) {
- ShenandoahCancelledTerminatorTerminator tt;
- ShenandoahSuspendibleThreadSetLeaver stsl(ShenandoahSuspendibleWorkers);
- while (!terminator->offer_termination(&tt));
return;
}
@@ -965,9 +962,6 @@
*/
while (true) {
if (CANCELLABLE && heap->check_cancelled_gc_and_yield()) {
- ShenandoahCancelledTerminatorTerminator tt;
- ShenandoahSuspendibleThreadSetLeaver stsl(ShenandoahSuspendibleWorkers);
- while (!terminator->offer_termination(&tt));
return;
}
@@ -991,7 +985,8 @@
// Need to leave the STS here otherwise it might block safepoints.
ShenandoahSuspendibleThreadSetLeaver stsl(CANCELLABLE && ShenandoahSuspendibleWorkers);
ShenandoahTerminationTimingsTracker term_tracker(worker_id);
- if (terminator->offer_termination()) return;
+ ShenandoahTerminatorTerminator tt(heap);
+ if (terminator->offer_termination(&tt)) return;
}
}
}