< prev index next >

src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp

Print this page
rev 8070 : imported patch gencollected_heap_cleanup

@@ -297,12 +297,10 @@
   }
 }
 
 AdaptiveSizePolicy* CMSCollector::size_policy() {
   GenCollectedHeap* gch = GenCollectedHeap::heap();
-  assert(gch->kind() == CollectedHeap::GenCollectedHeap,
-    "Wrong type of heap");
   return gch->gen_policy()->size_policy();
 }
 
 void ConcurrentMarkSweepGeneration::initialize_performance_counters() {
 

@@ -979,11 +977,11 @@
   // allocate, copy and if necessary update promoinfo --
   // delegate to underlying space.
   assert_lock_strong(freelistLock());
 
 #ifndef PRODUCT
-  if (Universe::heap()->promotion_should_fail()) {
+  if (GenCollectedHeap::heap()->promotion_should_fail()) {
     return NULL;
   }
 #endif  // #ifndef PRODUCT
 
   oop res = _cmsSpace->promote(obj, obj_size);

@@ -1056,11 +1054,11 @@
 oop
 ConcurrentMarkSweepGeneration::par_promote(int thread_num,
                                            oop old, markOop m,
                                            size_t word_sz) {
 #ifndef PRODUCT
-  if (Universe::heap()->promotion_should_fail()) {
+  if (GenCollectedHeap::heap()->promotion_should_fail()) {
     return NULL;
   }
 #endif  // #ifndef PRODUCT
 
   CMSParGCThreadState* ps = _par_gc_thread_states[thread_num];

@@ -2466,11 +2464,11 @@
   // errors by printing corresponding objects.
   VerifyMarkedClosure vcl(markBitMap());
   verification_mark_bm()->iterate(&vcl);
   if (vcl.failed()) {
     gclog_or_tty->print("Verification failed");
-    Universe::heap()->print_on(gclog_or_tty);
+    gch->print_on(gclog_or_tty);
     fatal("CMS: failed marking verification after remark");
   }
 }
 
 class VerifyKlassOopsKlassClosure : public KlassClosure {
< prev index next >