Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1RemSet.hpp @ 10372:e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
Summary: Fixed the output of G1SummarizeRSetStats: too small datatype for the number of concurrently processed cards, added concurrent remembered set thread time retrieval for Linux and Windows (BSD uses os::elapsedTime() now), and other cleanup. The information presented during VM operation is now relative to the previous output, not always cumulative if G1SummarizeRSetStatsPeriod > 0. At VM exit, the code prints a cumulative summary.
Reviewed-by: johnc, jwilhelm
author | tschatzl |
---|---|
date | Tue, 28 May 2013 09:32:06 +0200 |
parents | 194f52aa2f23 |
children | 5888334c9c24 |
comparison
equal
deleted
inserted
replaced
10371:c20186fa611b | 10372:e72f7eecc96d |
---|---|
23 */ | 23 */ |
24 | 24 |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP | 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP | 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP |
27 | 27 |
28 #include "gc_implementation/g1/g1RemSetSummary.hpp" | |
29 | |
28 // A G1RemSet provides ways of iterating over pointers into a selected | 30 // A G1RemSet provides ways of iterating over pointers into a selected |
29 // collection set. | 31 // collection set. |
30 | 32 |
31 class G1CollectedHeap; | 33 class G1CollectedHeap; |
32 class CardTableModRefBarrierSet; | 34 class CardTableModRefBarrierSet; |
35 // A G1RemSet in which each heap region has a rem set that records the | 37 // A G1RemSet in which each heap region has a rem set that records the |
36 // external heap references into it. Uses a mod ref bs to track updates, | 38 // external heap references into it. Uses a mod ref bs to track updates, |
37 // so that they can be used to update the individual region remsets. | 39 // so that they can be used to update the individual region remsets. |
38 | 40 |
39 class G1RemSet: public CHeapObj<mtGC> { | 41 class G1RemSet: public CHeapObj<mtGC> { |
42 private: | |
43 G1RemSetSummary _prev_period_summary; | |
40 protected: | 44 protected: |
41 G1CollectedHeap* _g1; | 45 G1CollectedHeap* _g1; |
42 unsigned _conc_refine_cards; | 46 size_t _conc_refine_cards; |
43 uint n_workers(); | 47 uint n_workers(); |
44 | 48 |
45 protected: | 49 protected: |
46 enum SomePrivateConstants { | 50 enum SomePrivateConstants { |
47 UpdateRStoMergeSync = 0, | 51 UpdateRStoMergeSync = 0, |
64 | 68 |
65 // Used for caching the closure that is responsible for scanning | 69 // Used for caching the closure that is responsible for scanning |
66 // references into the collection set. | 70 // references into the collection set. |
67 OopsInHeapRegionClosure** _cset_rs_update_cl; | 71 OopsInHeapRegionClosure** _cset_rs_update_cl; |
68 | 72 |
73 // Print the given summary info | |
74 virtual void print_summary_info(G1RemSetSummary * summary, const char * header = NULL); | |
69 public: | 75 public: |
70 // This is called to reset dual hash tables after the gc pause | 76 // This is called to reset dual hash tables after the gc pause |
71 // is finished and the initial hash table is no longer being | 77 // is finished and the initial hash table is no longer being |
72 // scanned. | 78 // scanned. |
73 void cleanupHRRS(); | 79 void cleanupHRRS(); |
121 // current collection set. | 127 // current collection set. |
122 virtual bool refine_card(jbyte* card_ptr, | 128 virtual bool refine_card(jbyte* card_ptr, |
123 int worker_i, | 129 int worker_i, |
124 bool check_for_refs_into_cset); | 130 bool check_for_refs_into_cset); |
125 | 131 |
126 // Print any relevant summary info. | 132 // Print accumulated summary info from the start of the VM. |
127 virtual void print_summary_info(); | 133 virtual void print_summary_info(); |
134 | |
135 // Print accumulated summary info from the last time called. | |
136 virtual void print_periodic_summary_info(); | |
128 | 137 |
129 // Prepare remembered set for verification. | 138 // Prepare remembered set for verification. |
130 virtual void prepare_for_verify(); | 139 virtual void prepare_for_verify(); |
140 | |
141 size_t conc_refine_cards() const { | |
142 return _conc_refine_cards; | |
143 } | |
131 }; | 144 }; |
132 | 145 |
133 class CountNonCleanMemRegionClosure: public MemRegionClosure { | 146 class CountNonCleanMemRegionClosure: public MemRegionClosure { |
134 G1CollectedHeap* _g1; | 147 G1CollectedHeap* _g1; |
135 int _n; | 148 int _n; |