--- a/hotspot/src/share/vm/runtime/thread.cpp Tue Mar 17 11:19:05 2015 -0700
+++ b/hotspot/src/share/vm/runtime/thread.cpp Thu Apr 02 06:42:24 2015 +0200
@@ -754,13 +754,9 @@
return true;
} else {
guarantee(res == strong_roots_parity, "Or else what?");
- assert(SharedHeap::heap()->workers()->active_workers() > 0,
- "Should only fail when parallel.");
return false;
}
}
- assert(SharedHeap::heap()->workers()->active_workers() > 0,
- "Should only fail when parallel.");
return false;
}
@@ -4066,20 +4062,7 @@
}
#endif // PRODUCT
-void Threads::possibly_parallel_oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
- // Introduce a mechanism allowing parallel threads to claim threads as
- // root groups. Overhead should be small enough to use all the time,
- // even in sequential code.
- SharedHeap* sh = SharedHeap::heap();
- // Cannot yet substitute active_workers for n_par_threads
- // because of G1CollectedHeap::verify() use of
- // SharedHeap::process_roots(). n_par_threads == 0 will
- // turn off parallelism in process_roots while active_workers
- // is being used for parallelism elsewhere.
- bool is_par = sh->n_par_threads() > 0;
- assert(!is_par ||
- (SharedHeap::heap()->n_par_threads() ==
- SharedHeap::heap()->workers()->active_workers()), "Mismatch");
+void Threads::possibly_parallel_oops_do(bool is_par, OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
int cp = Threads::thread_claim_parity();
ALL_JAVA_THREADS(p) {
if (p->claim_oops_do(is_par, cp)) {