diff src/share/vm/memory/iterator.hpp @ 941:8b46c4d82093

4957990: Perm heap bloat in JVM Summary: Treat ProfileData in MDO's as a source of weak, not strong, roots. Fixes the bug for stop-world collection -- the case of concurrent collection will be fixed separately. Reviewed-by: jcoomes, jmasa, kvn, never
author ysr
date Wed, 02 Sep 2009 00:04:29 -0700
parents 05f89f00a864
children 89e0543e1737 54b3b351d6f9
line wrap: on
line diff
--- a/src/share/vm/memory/iterator.hpp	Mon Aug 31 05:27:29 2009 -0700
+++ b/src/share/vm/memory/iterator.hpp	Wed Sep 02 00:04:29 2009 -0700
@@ -25,6 +25,7 @@
 // The following classes are C++ `closures` for iterating over objects, roots and spaces
 
 class ReferenceProcessor;
+class DataLayout;
 
 // Closure provides abortability.
 
@@ -62,6 +63,12 @@
 
   virtual void remember_klass(Klass* k) { /* do nothing */ }
 
+  // In support of post-processing of weak references in
+  // ProfileData (MethodDataOop) objects; see, for example,
+  // VirtualCallData::oop_iterate().
+  virtual const bool should_remember_mdo() const { return false; }
+  virtual void remember_mdo(DataLayout* v) { /* do nothing */ }
+
   // If "true", invoke on nmethods (when scanning compiled frames).
   virtual const bool do_nmethods() const { return false; }