27
28 #include "utilities/globalDefinitions.hpp"
29 #include "utilities/ostream.hpp"
30
31 class G1RemSet;
32
33 // A G1RemSetSummary manages statistical information about the G1RemSet
34
35 class G1RemSetSummary {
36 private:
37 size_t _total_mutator_refined_cards;
38 size_t _total_concurrent_refined_cards;
39
40 size_t _num_coarsenings;
41
42 size_t _num_vtimes;
43 double* _rs_threads_vtimes;
44
45 double _sampling_thread_vtime;
46
47 void set_rs_thread_vtime(uint thread, double value);
48 void set_sampling_thread_vtime(double value) {
49 _sampling_thread_vtime = value;
50 }
51
52 // update this summary with current data from various places
53 void update();
54
55 public:
56 G1RemSetSummary(bool should_update = true);
57
58 ~G1RemSetSummary();
59
60 // set the counters in this summary to the values of the others
61 void set(G1RemSetSummary* other);
62 // subtract all counters from the other summary, and set them in the current
63 void subtract_from(G1RemSetSummary* other);
64
65 void print_on(outputStream* out);
66
67 double rs_thread_vtime(uint thread) const;
68
69 double sampling_thread_vtime() const {
70 return _sampling_thread_vtime;
71 }
72
73 size_t total_mutator_refined_cards() const {
74 return _total_mutator_refined_cards;
75 }
76
77 size_t total_concurrent_refined_cards() const {
78 return _total_concurrent_refined_cards;
79 }
80
81 size_t total_refined_cards() const {
82 return total_mutator_refined_cards() + total_concurrent_refined_cards();
83 }
84
85 size_t num_coarsenings() const {
86 return _num_coarsenings;
87 }
88 };
89
90 #endif // SHARE_GC_G1_G1REMSETSUMMARY_HPP
|
27
28 #include "utilities/globalDefinitions.hpp"
29 #include "utilities/ostream.hpp"
30
31 class G1RemSet;
32
33 // A G1RemSetSummary manages statistical information about the G1RemSet
34
35 class G1RemSetSummary {
36 private:
37 size_t _total_mutator_refined_cards;
38 size_t _total_concurrent_refined_cards;
39
40 size_t _num_coarsenings;
41
42 size_t _num_vtimes;
43 double* _rs_threads_vtimes;
44
45 double _sampling_thread_vtime;
46
47 // Snapshot of counters from G1EpochSynchronizerCounters
48 size_t _num_fast_sync;
49 size_t _num_no_handshake_sync;
50 size_t _num_handshake_sync;
51 size_t _no_handshake_accum_time_ms;
52 size_t _handshake_accum_time_ms;
53 size_t _num_handshake_no_safepoint;
54 size_t _num_handshake_safepoint;
55
56 void set_rs_thread_vtime(uint thread, double value);
57 void set_sampling_thread_vtime(double value) {
58 _sampling_thread_vtime = value;
59 }
60
61 // update this summary with current data from various places
62 void update();
63
64 public:
65 G1RemSetSummary(bool should_update = true);
66
67 ~G1RemSetSummary();
68
69 // set the counters in this summary to the values of the others
70 void set(G1RemSetSummary* other);
71 // subtract all counters from the other summary, and set them in the current
72 void subtract_from(G1RemSetSummary* other);
73
74 void print_on(outputStream* out);
75
76 double rs_thread_vtime(uint thread) const;
77
78 double sampling_thread_vtime() const {
79 return _sampling_thread_vtime;
80 }
81
82 size_t total_mutator_refined_cards() const {
83 return _total_mutator_refined_cards;
84 }
85
86 size_t total_concurrent_refined_cards() const {
87 return _total_concurrent_refined_cards;
88 }
89
90 size_t total_refined_cards() const {
91 return total_mutator_refined_cards() + total_concurrent_refined_cards();
92 }
93
94 size_t num_coarsenings() const {
95 return _num_coarsenings;
96 }
97
98 size_t num_fast_sync() const {
99 return _num_fast_sync;
100 }
101
102 size_t num_no_handshake_sync() const {
103 return _num_no_handshake_sync;
104 }
105
106 size_t num_handshake_sync() const {
107 return _num_handshake_sync;
108 }
109
110 size_t no_handshake_accum_time_ms() const {
111 return _no_handshake_accum_time_ms;
112 }
113
114 size_t handshake_accum_time_ms() const {
115 return _handshake_accum_time_ms;
116 }
117
118 size_t num_handshake_no_safepoint() const {
119 return _num_handshake_no_safepoint;
120 }
121
122 size_t num_handshake_safepoint() const {
123 return _num_handshake_safepoint;
124 }
125 };
126
127 #endif // SHARE_GC_G1_G1REMSETSUMMARY_HPP
|