< prev index next >

src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp

Print this page

        

@@ -706,12 +706,10 @@
   // compaction is expected to be a rare event with
   // a heap using cms so don't do it without seeing the need.
   for (uint i = 0; i < ParallelGCThreads; i++) {
     _par_gc_thread_states[i]->promo.reset();
   }
-  // No longer a need to do a concurrent collection for Metaspace.
-  MetaspaceGC::set_should_concurrent_collect(false);
 }
 
 void ConcurrentMarkSweepGeneration::compute_new_size() {
   assert_locked_or_safepoint(Heap_lock);
 

@@ -1603,10 +1601,13 @@
   _cmsGen->cmsSpace()->endSweepFLCensus(sweep_count() /* fake */);
   // Restart the "inter sweep timer" for the next epoch.
   _inter_sweep_timer.reset();
   _inter_sweep_timer.start();
 
+  // No longer a need to do a concurrent collection for Metaspace.
+  MetaspaceGC::set_should_concurrent_collect(false);
+
   gch->post_full_gc_dump(gc_timer);
 
   gc_timer->register_gc_end();
 
   gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions());
< prev index next >