< prev index next >

src/hotspot/share/gc/g1/g1ParScanThreadState.hpp

Print this page
rev 49680 : imported patch 6672778-partial-queue-trimming
rev 49681 : [mq]: 6672778-refactoring

*** 33,50 **** #include "gc/g1/g1RemSet.hpp" #include "gc/g1/heapRegionRemSet.hpp" #include "gc/shared/ageTable.hpp" #include "memory/allocation.hpp" #include "oops/oop.hpp" class G1PLABAllocator; class G1EvacuationRootClosures; class HeapRegion; class outputStream; class G1ParScanThreadState : public CHeapObj<mtGC> { - private: G1CollectedHeap* _g1h; RefToScanQueue* _refs; DirtyCardQueue _dcq; G1CardTable* _ct; G1EvacuationRootClosures* _closures; --- 33,50 ---- #include "gc/g1/g1RemSet.hpp" #include "gc/g1/heapRegionRemSet.hpp" #include "gc/shared/ageTable.hpp" #include "memory/allocation.hpp" #include "oops/oop.hpp" + #include "utilities/ticks.hpp" class G1PLABAllocator; class G1EvacuationRootClosures; class HeapRegion; class outputStream; class G1ParScanThreadState : public CHeapObj<mtGC> { G1CollectedHeap* _g1h; RefToScanQueue* _refs; DirtyCardQueue _dcq; G1CardTable* _ct; G1EvacuationRootClosures* _closures;
*** 58,67 **** --- 58,72 ---- G1ScanEvacuatedObjClosure _scanner; int _hash_seed; uint _worker_id; + // Upper and lower threshold to start and end work queue draining. + uint const _stack_drain_upper_threshold; + uint const _stack_drain_lower_threshold; + + Tickspan _trim_ticks; // Map from young-age-index (0 == not young, 1 is youngest) to // surviving words. base is what we get back from the malloc call size_t* _surviving_young_words_base; // this points into the array, as we use the first few entries for padding size_t* _surviving_young_words;
*** 81,91 **** assert(_dest[original.value()].is_valid_gen(), "Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value()); return _dest[original.value()]; } ! public: G1ParScanThreadState(G1CollectedHeap* g1h, uint worker_id, size_t young_cset_length); virtual ~G1ParScanThreadState(); void set_ref_processor(ReferenceProcessor* rp) { _scanner.set_ref_processor(rp); } --- 86,96 ---- assert(_dest[original.value()].is_valid_gen(), "Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value()); return _dest[original.value()]; } ! public: G1ParScanThreadState(G1CollectedHeap* g1h, uint worker_id, size_t young_cset_length); virtual ~G1ParScanThreadState(); void set_ref_processor(ReferenceProcessor* rp) { _scanner.set_ref_processor(rp); }
*** 127,137 **** return _surviving_young_words + 1; } void flush(size_t* surviving_young_words); ! private: #define G1_PARTIAL_ARRAY_MASK 0x2 inline bool has_partial_array_mask(oop* ref) const { return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK; } --- 132,142 ---- return _surviving_young_words + 1; } void flush(size_t* surviving_young_words); ! private: #define G1_PARTIAL_ARRAY_MASK 0x2 inline bool has_partial_array_mask(oop* ref) const { return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK; }
*** 183,197 **** inline InCSetState next_state(InCSetState const state, markOop const m, uint& age); void report_promotion_event(InCSetState const dest_state, oop const old, size_t word_sz, uint age, HeapWord * const obj_ptr) const; - public: oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark); void trim_queue(); inline void steal_and_trim_queue(RefToScanQueueSet *task_queues); // An attempt to evacuate "obj" has failed; take necessary steps. oop handle_evacuation_failure_par(oop obj, markOop m); --- 188,209 ---- inline InCSetState next_state(InCSetState const state, markOop const m, uint& age); void report_promotion_event(InCSetState const dest_state, oop const old, size_t word_sz, uint age, HeapWord * const obj_ptr) const; + inline bool should_start_trim_queue_partially() const; + inline bool should_end_trim_queue_partially() const; + + inline void trim_queue_partially_internal(); + public: oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark); void trim_queue(); + void trim_queue_partially(); + + Tickspan trim_ticks_and_reset(); inline void steal_and_trim_queue(RefToScanQueueSet *task_queues); // An attempt to evacuate "obj" has failed; take necessary steps. oop handle_evacuation_failure_par(oop obj, markOop m);
< prev index next >