Mercurial > hg > truffle
diff src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp @ 7448:b735136e0d82
8004132: SerialGC: ValidateMarkSweep broken when running GCOld
Summary: Remove bit-rotten ValidateMarkSweep functionality and flag.
Reviewed-by: johnc, jmasa
Contributed-by: tamao <tao.mao@oracle.com>
author | johnc |
---|---|
date | Wed, 02 Jan 2013 11:32:41 -0800 |
parents | aed758eda82a |
children | 7b835924c31c |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp Wed Dec 26 15:05:30 2012 -0800 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp Wed Jan 02 11:32:41 2013 -0800 @@ -1006,34 +1006,6 @@ // Reset time since last full gc static void reset_millis_since_last_gc(); - protected: -#ifdef VALIDATE_MARK_SWEEP - static GrowableArray<void*>* _root_refs_stack; - static GrowableArray<oop> * _live_oops; - static GrowableArray<oop> * _live_oops_moved_to; - static GrowableArray<size_t>* _live_oops_size; - static size_t _live_oops_index; - static size_t _live_oops_index_at_perm; - static GrowableArray<void*>* _other_refs_stack; - static GrowableArray<void*>* _adjusted_pointers; - static bool _pointer_tracking; - static bool _root_tracking; - - // The following arrays are saved since the time of the last GC and - // assist in tracking down problems where someone has done an errant - // store into the heap, usually to an oop that wasn't properly - // handleized across a GC. If we crash or otherwise fail before the - // next GC, we can query these arrays to find out the object we had - // intended to do the store to (assuming it is still alive) and the - // offset within that object. Covered under RecordMarkSweepCompaction. - static GrowableArray<HeapWord*> * _cur_gc_live_oops; - static GrowableArray<HeapWord*> * _cur_gc_live_oops_moved_to; - static GrowableArray<size_t>* _cur_gc_live_oops_size; - static GrowableArray<HeapWord*> * _last_gc_live_oops; - static GrowableArray<HeapWord*> * _last_gc_live_oops_moved_to; - static GrowableArray<size_t>* _last_gc_live_oops_size; -#endif - public: class MarkAndPushClosure: public OopClosure { private: @@ -1191,25 +1163,6 @@ // Time since last full gc (in milliseconds). static jlong millis_since_last_gc(); -#ifdef VALIDATE_MARK_SWEEP - static void track_adjusted_pointer(void* p, bool isroot); - static void check_adjust_pointer(void* p); - static void track_interior_pointers(oop obj); - static void check_interior_pointers(); - - static void reset_live_oop_tracking(); - static void register_live_oop(oop p, size_t size); - static void validate_live_oop(oop p, size_t size); - static void live_oop_moved_to(HeapWord* q, size_t size, HeapWord* compaction_top); - static void compaction_complete(); - - // Querying operation of RecordMarkSweepCompaction results. - // Finds and prints the current base oop and offset for a word - // within an oop that was live during the last GC. Helpful for - // tracking down heap stomps. - static void print_new_location_of_heap_address(HeapWord* q); -#endif // #ifdef VALIDATE_MARK_SWEEP - #ifndef PRODUCT // Debugging support. static const char* space_names[last_space_id]; @@ -1250,12 +1203,7 @@ inline void PSParallelCompact::follow_root(ParCompactionManager* cm, T* p) { assert(!Universe::heap()->is_in_reserved(p), "roots shouldn't be things within the heap"); -#ifdef VALIDATE_MARK_SWEEP - if (ValidateMarkSweep) { - guarantee(!_root_refs_stack->contains(p), "should only be in here once"); - _root_refs_stack->push(p); - } -#endif + T heap_oop = oopDesc::load_heap_oop(p); if (!oopDesc::is_null(heap_oop)) { oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); @@ -1294,20 +1242,10 @@ oopDesc::encode_store_heap_oop_not_null(p, new_obj); } } - VALIDATE_MARK_SWEEP_ONLY(track_adjusted_pointer(p, isroot)); } template <class T> inline void PSParallelCompact::KeepAliveClosure::do_oop_work(T* p) { -#ifdef VALIDATE_MARK_SWEEP - if (ValidateMarkSweep) { - if (!Universe::heap()->is_in_reserved(p)) { - _root_refs_stack->push(p); - } else { - _other_refs_stack->push(p); - } - } -#endif mark_and_push(_compaction_manager, p); }