changeset 10635:9d93b077b22f

Merge
author brutisso
date Wed, 16 Mar 2016 13:28:07 +0000
parents 7ccf7f03a914 70081cb6cc16
children 7c88aac45703 091947451f03
files
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/concurrentMarkThread.cpp	Wed Mar 16 12:08:29 2016 +0000
+++ b/src/share/vm/gc/g1/concurrentMarkThread.cpp	Wed Mar 16 13:28:07 2016 +0000
@@ -115,7 +115,6 @@
     // wait until started is set.
     sleepBeforeNextCycle();
     if (should_terminate()) {
-      _cm->root_regions()->cancel_scan();
       break;
     }
 
@@ -282,6 +281,7 @@
       g1h->register_concurrent_cycle_end();
     }
   }
+  _cm->root_regions()->cancel_scan();
 }
 
 void ConcurrentMarkThread::stop_service() {
--- a/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Mar 16 12:08:29 2016 +0000
+++ b/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Mar 16 13:28:07 2016 +0000
@@ -3222,10 +3222,13 @@
   _verifier->verify_region_sets_optional();
   _verifier->verify_dirty_young_regions();
 
-  // This call will decide whether this pause is an initial-mark
-  // pause. If it is, during_initial_mark_pause() will return true
-  // for the duration of this pause.
-  g1_policy()->decide_on_conc_mark_initiation();
+  // We should not be doing initial mark unless the conc mark thread is running
+  if (!_cmThread->should_terminate()) {
+    // This call will decide whether this pause is an initial-mark
+    // pause. If it is, during_initial_mark_pause() will return true
+    // for the duration of this pause.
+    g1_policy()->decide_on_conc_mark_initiation();
+  }
 
   // We do not allow initial-mark to be piggy-backed on a mixed GC.
   assert(!collector_state()->during_initial_mark_pause() ||