diff src/share/vm/gc_interface/collectedHeap.hpp @ 3377:2aa9ddbb9e60

7041789: 30% perf regression with c2/arm following 7017732 Summary: Implement a more accurate is_scavengable() Reviewed-by: stefank, jcoomes, ysr
author jmasa
date Tue, 03 May 2011 10:30:34 -0700
parents f95d63e2154a
children 6747fd0512e0
line wrap: on
line diff
--- a/src/share/vm/gc_interface/collectedHeap.hpp	Thu May 12 19:39:58 2011 -0700
+++ b/src/share/vm/gc_interface/collectedHeap.hpp	Tue May 03 10:30:34 2011 -0700
@@ -269,6 +269,13 @@
   // space). If you need the more conservative answer use is_permanent().
   virtual bool is_in_permanent(const void *p) const = 0;
 
+
+#ifdef ASSERT
+  // Returns true if "p" is in the part of the
+  // heap being collected.
+  virtual bool is_in_partial_collection(const void *p) = 0;
+#endif
+
   bool is_in_permanent_or_null(const void *p) const {
     return p == NULL || is_in_permanent(p);
   }
@@ -284,11 +291,7 @@
 
   // An object is scavengable if its location may move during a scavenge.
   // (A scavenge is a GC which is not a full GC.)
-  // Currently, this just means it is not perm (and not null).
-  // This could change if we rethink what's in perm-gen.
-  bool is_scavengable(const void *p) const {
-    return !is_in_permanent_or_null(p);
-  }
+  virtual bool is_scavengable(const void *p) = 0;
 
   // Returns "TRUE" if "p" is a method oop in the
   // current heap, with high probability. This predicate