< prev index next >

src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp

Print this page
rev 7858 : 8073543: Circular include dependency between psScavenge.inline.hpp and psPromotionManager.inline.hpp


 127   // Called by parallelScavengeHeap to init the tenuring threshold
 128   static void initialize();
 129 
 130   // Scavenge entry point.  This may invoke a full gc; return true if so.
 131   static bool invoke();
 132   // Return true if a collection was done; false otherwise.
 133   static bool invoke_no_policy();
 134 
 135   // If an attempt to promote fails, this method is invoked
 136   static void oop_promotion_failed(oop obj, markOop obj_mark);
 137 
 138   template <class T> static inline bool should_scavenge(T* p);
 139 
 140   // These call should_scavenge() above and, if it returns true, also check that
 141   // the object was not newly copied into to_space.  The version with the bool
 142   // argument is a convenience wrapper that fetches the to_space pointer from
 143   // the heap and calls the other version (if the arg is true).
 144   template <class T> static inline bool should_scavenge(T* p, MutableSpace* to_space);
 145   template <class T> static inline bool should_scavenge(T* p, bool check_to_space);
 146 
 147   template <class T, bool promote_immediately>
 148     inline static void copy_and_push_safe_barrier(PSPromotionManager* pm, T* p);
 149 
 150   static void copy_and_push_safe_barrier_from_klass(PSPromotionManager* pm, oop* p);
 151 
 152   // Is an object in the young generation
 153   // This assumes that the 'o' is in the heap,
 154   // so it only checks one side of the complete predicate.
 155 
 156   inline static bool is_obj_in_young(oop o) {
 157     return (HeapWord*)o >= _young_generation_boundary;
 158   }
 159 
 160   inline static bool is_obj_in_young(narrowOop o) {
 161     return (uintptr_t)o >= _young_generation_boundary_compressed;
 162   }
 163 
 164   inline static bool is_obj_in_young(HeapWord* o) {
 165     return o >= _young_generation_boundary;
 166   }
 167 };
 168 
 169 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSSCAVENGE_HPP


 127   // Called by parallelScavengeHeap to init the tenuring threshold
 128   static void initialize();
 129 
 130   // Scavenge entry point.  This may invoke a full gc; return true if so.
 131   static bool invoke();
 132   // Return true if a collection was done; false otherwise.
 133   static bool invoke_no_policy();
 134 
 135   // If an attempt to promote fails, this method is invoked
 136   static void oop_promotion_failed(oop obj, markOop obj_mark);
 137 
 138   template <class T> static inline bool should_scavenge(T* p);
 139 
 140   // These call should_scavenge() above and, if it returns true, also check that
 141   // the object was not newly copied into to_space.  The version with the bool
 142   // argument is a convenience wrapper that fetches the to_space pointer from
 143   // the heap and calls the other version (if the arg is true).
 144   template <class T> static inline bool should_scavenge(T* p, MutableSpace* to_space);
 145   template <class T> static inline bool should_scavenge(T* p, bool check_to_space);
 146 



 147   static void copy_and_push_safe_barrier_from_klass(PSPromotionManager* pm, oop* p);
 148 
 149   // Is an object in the young generation
 150   // This assumes that the 'o' is in the heap,
 151   // so it only checks one side of the complete predicate.
 152 
 153   inline static bool is_obj_in_young(oop o) {
 154     return (HeapWord*)o >= _young_generation_boundary;
 155   }
 156 
 157   inline static bool is_obj_in_young(narrowOop o) {
 158     return (uintptr_t)o >= _young_generation_boundary_compressed;
 159   }
 160 
 161   inline static bool is_obj_in_young(HeapWord* o) {
 162     return o >= _young_generation_boundary;
 163   }
 164 };
 165 
 166 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSSCAVENGE_HPP
< prev index next >