< prev index next >

src/share/vm/gc/shared/cardTableRS.cpp

Print this page
rev 8456 : GenerationRemovalPart6
rev 8457 : [mq]: increment

@@ -300,11 +300,11 @@
 #endif
   _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
 }
 
 void CardTableRS::clear_into_younger(Generation* old_gen) {
-  assert(old_gen == GenCollectedHeap::heap()->old_gen(),
+  assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
          "Should only be called for the old generation");
   // The card tables for the youngest gen need never be cleared.
   // There's a bit of subtlety in the clear() and invalidate()
   // methods that we exploit here and in invalidate_or_clear()
   // below to avoid missing cards at the fringes. If clear() or

@@ -312,11 +312,11 @@
   // be revisited. 20040107.ysr
   clear(old_gen->prev_used_region());
 }
 
 void CardTableRS::invalidate_or_clear(Generation* old_gen) {
-  assert(old_gen == GenCollectedHeap::heap()->old_gen(),
+  assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
          "Should only be called for the old generation");
   // Invalidate the cards for the currently occupied part of
   // the old generation and clear the cards for the
   // unoccupied part of the generation (if any, making use
   // of that generation's prev_used_region to determine that

@@ -379,11 +379,11 @@
   CardTableRS* _ct;
 public:
   VerifyCTGenClosure(CardTableRS* ct) : _ct(ct) {}
   void do_generation(Generation* gen) {
     // Skip the youngest generation.
-    if (gen == GenCollectedHeap::heap()->young_gen()) {
+    if (GenCollectedHeap::heap()->is_young_gen(gen)) {
       return;
     }
     // Normally, we're interested in pointers to younger generations.
     VerifyCTSpaceClosure blk(_ct, gen->reserved().start());
     gen->space_iterate(&blk, true);
< prev index next >