Merge
authoriignatyev
Wed, 15 Apr 2015 11:23:06 +0000
changeset 30181 c1be7675a9a8
parent 30178 33317ec95df7 (diff)
parent 30180 8da3724f19a6 (current diff)
child 30182 1c980a880941
Merge
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RootProcessor.cpp	Wed Apr 15 09:49:50 2015 +0000
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RootProcessor.cpp	Wed Apr 15 11:23:06 2015 +0000
@@ -93,13 +93,11 @@
   uint n_workers = _g1h->n_par_threads();
   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
 
-  if (n_workers > 0) {
-    uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
-    if (new_value == n_workers) {
-      // This thread is last. Notify the others.
-      MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
-      _lock.notify_all();
-    }
+  uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
+  if (new_value == n_workers) {
+    // This thread is last. Notify the others.
+    MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
+    _lock.notify_all();
   }
 }
 
@@ -107,7 +105,7 @@
   uint n_workers = _g1h->n_par_threads();
   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
 
-  if (n_workers > 0 && (uint)_n_workers_discovered_strong_classes != n_workers) {
+  if ((uint)_n_workers_discovered_strong_classes != n_workers) {
     MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
     while ((uint)_n_workers_discovered_strong_classes != n_workers) {
       _lock.wait(Mutex::_no_safepoint_check_flag, 0, false);