< prev index next >

src/hotspot/share/gc/g1/g1RemSetSummary.cpp

Print this page

 90   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
 91   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
 92   _sampling_thread_vtime(0.0f) {
 93 
 94   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
 95 }
 96 
 97 G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
 98   _rem_set(rem_set),
 99   _num_conc_refined_cards(0),
100   _num_processed_buf_mutator(0),
101   _num_processed_buf_rs_threads(0),
102   _num_coarsenings(0),
103   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
104   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
105   _sampling_thread_vtime(0.0f) {
106   update();
107 }
108 
109 G1RemSetSummary::~G1RemSetSummary() {
110   if (_rs_threads_vtimes) {
111     FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
112   }
113 }
114 
115 void G1RemSetSummary::set(G1RemSetSummary* other) {
116   assert(other != NULL, "just checking");
117   assert(_num_vtimes == other->_num_vtimes, "just checking");
118 
119   _num_conc_refined_cards = other->num_conc_refined_cards();
120 
121   _num_processed_buf_mutator = other->num_processed_buf_mutator();
122   _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads();
123 
124   _num_coarsenings = other->_num_coarsenings;
125 
126   memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes);
127 
128   set_sampling_thread_vtime(other->sampling_thread_vtime());
129 }
130 
131 void G1RemSetSummary::subtract_from(G1RemSetSummary* other) {
132   assert(other != NULL, "just checking");

 90   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
 91   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
 92   _sampling_thread_vtime(0.0f) {
 93 
 94   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
 95 }
 96 
 97 G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
 98   _rem_set(rem_set),
 99   _num_conc_refined_cards(0),
100   _num_processed_buf_mutator(0),
101   _num_processed_buf_rs_threads(0),
102   _num_coarsenings(0),
103   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
104   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
105   _sampling_thread_vtime(0.0f) {
106   update();
107 }
108 
109 G1RemSetSummary::~G1RemSetSummary() {
110   FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);


111 }
112 
113 void G1RemSetSummary::set(G1RemSetSummary* other) {
114   assert(other != NULL, "just checking");
115   assert(_num_vtimes == other->_num_vtimes, "just checking");
116 
117   _num_conc_refined_cards = other->num_conc_refined_cards();
118 
119   _num_processed_buf_mutator = other->num_processed_buf_mutator();
120   _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads();
121 
122   _num_coarsenings = other->_num_coarsenings;
123 
124   memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes);
125 
126   set_sampling_thread_vtime(other->sampling_thread_vtime());
127 }
128 
129 void G1RemSetSummary::subtract_from(G1RemSetSummary* other) {
130   assert(other != NULL, "just checking");
< prev index next >