< prev index next >

src/share/vm/gc/g1/g1HeapVerifier.cpp

Print this page

        

@@ -159,25 +159,10 @@
 
   int count() { return _count; }
   void reset_count() { _count = 0; };
 };
 
-class VerifyKlassClosure: public KlassClosure {
-  YoungRefCounterClosure _young_ref_counter_closure;
-  OopClosure *_oop_closure;
- public:
-  VerifyKlassClosure(G1CollectedHeap* g1h, OopClosure* cl) : _young_ref_counter_closure(g1h), _oop_closure(cl) {}
-  void do_klass(Klass* k) {
-    k->oops_do(_oop_closure);
-
-    _young_ref_counter_closure.reset_count();
-    k->oops_do(&_young_ref_counter_closure);
-    if (_young_ref_counter_closure.count() > 0) {
-      guarantee(k->has_modified_oops(), "Klass " PTR_FORMAT ", has young refs but is not dirty.", p2i(k));
-    }
-  }
-};
 
 class VerifyLivenessOopClosure: public OopClosure {
   G1CollectedHeap* _g1h;
   VerifyOption _vo;
 public:

@@ -388,12 +373,11 @@
   assert(Thread::current()->is_VM_thread(),
          "Expected to be executed serially by the VM thread at this point");
 
   log_debug(gc, verify)("Roots");
   VerifyRootsClosure rootsCl(vo);
-  VerifyKlassClosure klassCl(_g1h, &rootsCl);
-  CLDToKlassAndOopClosure cldCl(&klassCl, &rootsCl, false);
+  CLDToKlassAndOopClosure cldCl(&rootsCl, false);
 
   // We apply the relevant closures to all the oops in the
   // system dictionary, class loader data graph, the string table
   // and the nmethods in the code cache.
   G1VerifyCodeRootOopClosure codeRootsCl(_g1h, &rootsCl, vo);
< prev index next >