equal
deleted
inserted
replaced
154 size_t used = _space->used(); |
154 size_t used = _space->used(); |
155 |
155 |
156 // Allocation successful, update counters |
156 // Allocation successful, update counters |
157 { |
157 { |
158 size_t last = _last_counter_update; |
158 size_t last = _last_counter_update; |
159 if ((used - last >= _step_counter_update) && Atomic::cmpxchg(used, &_last_counter_update, last) == last) { |
159 if ((used - last >= _step_counter_update) && Atomic::cmpxchg(&_last_counter_update, last, used) == last) { |
160 _monitoring_support->update_counters(); |
160 _monitoring_support->update_counters(); |
161 } |
161 } |
162 } |
162 } |
163 |
163 |
164 // ...and print the occupancy line, if needed |
164 // ...and print the occupancy line, if needed |
165 { |
165 { |
166 size_t last = _last_heap_print; |
166 size_t last = _last_heap_print; |
167 if ((used - last >= _step_heap_print) && Atomic::cmpxchg(used, &_last_heap_print, last) == last) { |
167 if ((used - last >= _step_heap_print) && Atomic::cmpxchg(&_last_heap_print, last, used) == last) { |
168 print_heap_info(used); |
168 print_heap_info(used); |
169 print_metaspace_info(); |
169 print_metaspace_info(); |
170 } |
170 } |
171 } |
171 } |
172 |
172 |