src/hotspot/share/memory/heapInspection.cpp
changeset 51608 625a5bdde0c5
parent 51554 5b0d86499960
child 51959 db0c3952de52
--- a/src/hotspot/share/memory/heapInspection.cpp	Fri Aug 31 12:41:00 2018 +0200
+++ b/src/hotspot/share/memory/heapInspection.cpp	Fri Aug 31 07:03:46 2018 -0400
@@ -153,11 +153,17 @@
   }
 }
 
-void KlassInfoTable::AllClassesFinder::do_klass(Klass* k) {
-  // This has the SIDE EFFECT of creating a KlassInfoEntry
-  // for <k>, if one doesn't exist yet.
-  _table->lookup(k);
-}
+class KlassInfoTable::AllClassesFinder : public LockedClassesDo {
+  KlassInfoTable *_table;
+public:
+  AllClassesFinder(KlassInfoTable* table) : _table(table) {}
+  virtual void do_klass(Klass* k) {
+    // This has the SIDE EFFECT of creating a KlassInfoEntry
+    // for <k>, if one doesn't exist yet.
+    _table->lookup(k);
+  }
+};
+
 
 KlassInfoTable::KlassInfoTable(bool add_all_classes) {
   _size_of_instances_in_words = 0;