hotspot/src/share/vm/memory/heapInspection.cpp
changeset 1893 c82e388e17c5
parent 1388 3677f5f3d66b
child 2141 e9a644aaff87
child 2105 347008ce7984
--- a/hotspot/src/share/vm/memory/heapInspection.cpp	Sat Dec 20 00:45:18 2008 -0800
+++ b/hotspot/src/share/vm/memory/heapInspection.cpp	Tue Jan 06 07:05:05 2009 -0800
@@ -263,6 +263,9 @@
   if (!cit.allocation_failed()) {
     // Iterate over objects in the heap
     RecordInstanceClosure ric(&cit);
+    // If this operation encounters a bad object when using CMS,
+    // consider using safe_object_iterate() which avoids perm gen
+    // objects that may contain bad references.
     Universe::heap()->object_iterate(&ric);
 
     // Report if certain classes are not counted because of
@@ -317,5 +320,8 @@
 
   // Iterate over objects in the heap
   FindInstanceClosure fic(k, result);
+  // If this operation encounters a bad object when using CMS,
+  // consider using safe_object_iterate() which avoids perm gen
+  // objects that may contain bad references.
   Universe::heap()->object_iterate(&fic);
 }