src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp	Thu May 30 11:15:51 2013
--- new/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp	Thu May 30 11:15:51 2013

*** 66,78 **** --- 66,81 ---- static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing static CardTableExtension* _card_table; // We cache the card table for fast access. static bool _survivor_overflow; // Overflow this collection static uint _tenuring_threshold; // tenuring threshold for next scavenge static elapsedTimer _accumulated_time; // total time spent on scavenge - static HeapWord* _young_generation_boundary; // The lowest address possible for the young_gen. // This is used to decide if an oop should be scavenged, // cards should be marked, etc. + static HeapWord* _young_generation_boundary; + // Used to optimize compressed oops young gen boundary checking. + static uintptr_t _young_generation_boundary_compressed; static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion static Stack<oop, mtGC> _preserved_oop_stack; // List of oops that need their mark restored. static CollectorCounters* _counters; // collector performance counters static bool _promotion_failed;
*** 110,119 **** --- 113,125 ---- } // Adaptive size policy support. When the young generation/old generation // boundary moves, _young_generation_boundary must be reset static void set_young_generation_boundary(HeapWord* v) { _young_generation_boundary = v; + if (UseCompressedOops) { + _young_generation_boundary_compressed = (uintptr_t)oopDesc::encode_heap_oop((oop)v); + } } // Called by parallelScavengeHeap to init the tenuring threshold static void initialize();
*** 138,151 **** --- 144,165 ---- inline static void copy_and_push_safe_barrier(PSPromotionManager* pm, T* p); static void copy_and_push_safe_barrier_from_klass(PSPromotionManager* pm, oop* p); // Is an object in the young generation ! // This assumes that the HeapWord argument is in the heap, ! // This assumes that the 'o' is in the heap, // so it only checks one side of the complete predicate. + + inline static bool is_obj_in_young(oop o) { + return (HeapWord*)o >= _young_generation_boundary; + } + + inline static bool is_obj_in_young(narrowOop o) { + return (uintptr_t)o >= _young_generation_boundary_compressed; + } + inline static bool is_obj_in_young(HeapWord* o) { ! const bool result = (o >= _young_generation_boundary); return result; ! return o >= _young_generation_boundary; } }; #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSSCAVENGE_HPP

src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File