< prev index next >

src/share/vm/gc_implementation/g1/g1ParScanThreadState.hpp

Print this page
rev 7902 : [mq]: 8073052-Rename-and-clean-up-the-allocation-manager-hierarchy-in-g1Allocator
rev 7903 : imported patch 8073013-add-detailed-information-about-plab-memory-usage
rev 7904 : imported patch 8040162-avoid-reallocating-plab-allocators

*** 36,88 **** #include "oops/oop.hpp" class HeapRegion; class outputStream; ! class G1ParScanThreadState : public StackObj { private: G1CollectedHeap* _g1h; RefToScanQueue* _refs; DirtyCardQueue _dcq; G1SATBCardTableModRefBS* _ct_bs; G1RemSet* _g1_rem; ! G1ParGCAllocator* _g1_par_allocator; ageTable _age_table; InCSetState _dest[InCSetState::Num]; // Local tenuring threshold. uint _tenuring_threshold; G1ParScanClosure _scanner; ! ! size_t _alloc_buffer_waste; ! size_t _undo_waste; ! ! OopsInHeapRegionClosure* _evac_failure_cl; int _hash_seed; ! uint _queue_num; ! ! size_t _term_attempts; ! ! double _start; ! double _start_strong_roots; ! double _strong_roots_time; ! double _start_term; ! double _term_time; // 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; #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t)) - void add_to_alloc_buffer_waste(size_t waste) { _alloc_buffer_waste += waste; } - void add_to_undo_waste(size_t waste) { _undo_waste += waste; } - DirtyCardQueue& dirty_card_queue() { return _dcq; } G1SATBCardTableModRefBS* ctbs() { return _ct_bs; } InCSetState dest(InCSetState original) const { assert(original.is_valid(), --- 36,73 ---- #include "oops/oop.hpp" class HeapRegion; class outputStream; ! class G1ParScanThreadState : public CHeapObj<mtGC> { private: G1CollectedHeap* _g1h; RefToScanQueue* _refs; DirtyCardQueue _dcq; G1SATBCardTableModRefBS* _ct_bs; G1RemSet* _g1_rem; ! PLABAllocator* _plab_allocator; ageTable _age_table; InCSetState _dest[InCSetState::Num]; // Local tenuring threshold. uint _tenuring_threshold; G1ParScanClosure _scanner; ! G1ParScanHeapEvacFailureClosure _evac_failure_cl; int _hash_seed; ! uint _worker_id; // 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; #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t)) DirtyCardQueue& dirty_card_queue() { return _dcq; } G1SATBCardTableModRefBS* ctbs() { return _ct_bs; } InCSetState dest(InCSetState original) const { assert(original.is_valid(),
*** 91,103 **** err_msg("Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value())); return _dest[original.value()]; } public: ! G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp); ~G1ParScanThreadState(); ageTable* age_table() { return &_age_table; } #ifdef ASSERT bool queue_is_empty() const { return _refs->is_empty(); } --- 76,90 ---- err_msg("Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value())); return _dest[original.value()]; } public: ! G1ParScanThreadState(G1CollectedHeap* g1h, uint worker_id); ~G1ParScanThreadState(); + void set_ref_processor(ReferenceProcessor* rp) { _scanner.set_ref_processor(rp); _evac_failure_cl.set_ref_processor(rp); } + ageTable* age_table() { return &_age_table; } #ifdef ASSERT bool queue_is_empty() const { return _refs->is_empty(); }
*** 121,165 **** dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index)); } } } ! void set_evac_failure_closure(OopsInHeapRegionClosure* evac_failure_cl) { ! _evac_failure_cl = evac_failure_cl; ! } ! ! OopsInHeapRegionClosure* evac_failure_closure() { return _evac_failure_cl; } int* hash_seed() { return &_hash_seed; } ! uint queue_num() { return _queue_num; } ! ! size_t term_attempts() const { return _term_attempts; } ! void note_term_attempt() { _term_attempts++; } ! ! void start_strong_roots() { ! _start_strong_roots = os::elapsedTime(); ! } ! void end_strong_roots() { ! _strong_roots_time += (os::elapsedTime() - _start_strong_roots); ! } ! double strong_roots_time() const { return _strong_roots_time; } ! ! void start_term_time() { ! note_term_attempt(); ! _start_term = os::elapsedTime(); ! } ! void end_term_time() { ! _term_time += (os::elapsedTime() - _start_term); ! } ! double term_time() const { return _term_time; } ! ! double elapsed_time() const { ! return os::elapsedTime() - _start; ! } ! static void print_termination_stats_hdr(outputStream* const st = gclog_or_tty); ! void print_termination_stats(int i, outputStream* const st = gclog_or_tty) const; size_t* surviving_young_words() { // We add on to hide entry 0 which accumulates surviving words for // age -1 regions (i.e. non-young ones) return _surviving_young_words; --- 108,128 ---- dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index)); } } } ! OopsInHeapRegionClosure* evac_failure_closure() { return &_evac_failure_cl; } int* hash_seed() { return &_hash_seed; } ! uint worker_queue_id() { return _worker_id; } ! // Returns the current amount of waste due to alignment or not being able to fit ! // objects within LABs. ! size_t lab_waste() const; ! // Returns the current amount of waste due to undo after trying to reserve space ! // in the LAB. ! size_t lab_undo_waste() const; size_t* surviving_young_words() { // We add on to hide entry 0 which accumulates surviving words for // age -1 regions (i.e. non-young ones) return _surviving_young_words;
< prev index next >