1 /* |
1 /* |
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
34 #include "memory/resourceArea.hpp" |
34 #include "memory/resourceArea.hpp" |
35 #include "runtime/os.hpp" |
35 #include "runtime/os.hpp" |
36 #include "utilities/globalDefinitions.hpp" |
36 #include "utilities/globalDefinitions.hpp" |
37 #include "utilities/macros.hpp" |
37 #include "utilities/macros.hpp" |
38 #include "utilities/ticks.hpp" |
38 #include "utilities/ticks.hpp" |
39 #if INCLUDE_G1GC |
|
40 #include "gc/g1/g1EvacuationInfo.hpp" |
|
41 #endif |
|
42 |
39 |
43 void GCTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) { |
40 void GCTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) { |
44 _shared_gc_info.set_cause(cause); |
41 _shared_gc_info.set_cause(cause); |
45 _shared_gc_info.set_start_timestamp(timestamp); |
42 _shared_gc_info.set_start_timestamp(timestamp); |
46 } |
43 } |
181 } |
178 } |
182 |
179 |
183 void OldGCTracer::report_concurrent_mode_failure() { |
180 void OldGCTracer::report_concurrent_mode_failure() { |
184 send_concurrent_mode_failure_event(); |
181 send_concurrent_mode_failure_event(); |
185 } |
182 } |
186 |
|
187 #if INCLUDE_G1GC |
|
188 void G1MMUTracer::report_mmu(double time_slice_sec, double gc_time_sec, double max_time_sec) { |
|
189 send_g1_mmu_event(time_slice_sec * MILLIUNITS, |
|
190 gc_time_sec * MILLIUNITS, |
|
191 max_time_sec * MILLIUNITS); |
|
192 } |
|
193 |
|
194 void G1NewTracer::report_yc_type(G1YCType type) { |
|
195 _g1_young_gc_info.set_type(type); |
|
196 } |
|
197 |
|
198 void G1NewTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { |
|
199 YoungGCTracer::report_gc_end_impl(timestamp, time_partitions); |
|
200 send_g1_young_gc_event(); |
|
201 } |
|
202 |
|
203 void G1NewTracer::report_evacuation_info(G1EvacuationInfo* info) { |
|
204 send_evacuation_info_event(info); |
|
205 } |
|
206 |
|
207 void G1NewTracer::report_evacuation_failed(EvacuationFailedInfo& ef_info) { |
|
208 send_evacuation_failed_event(ef_info); |
|
209 ef_info.reset(); |
|
210 } |
|
211 |
|
212 void G1NewTracer::report_evacuation_statistics(const G1EvacSummary& young_summary, const G1EvacSummary& old_summary) const { |
|
213 send_young_evacuation_statistics(young_summary); |
|
214 send_old_evacuation_statistics(old_summary); |
|
215 } |
|
216 |
|
217 void G1NewTracer::report_basic_ihop_statistics(size_t threshold, |
|
218 size_t target_ccupancy, |
|
219 size_t current_occupancy, |
|
220 size_t last_allocation_size, |
|
221 double last_allocation_duration, |
|
222 double last_marking_length) { |
|
223 send_basic_ihop_statistics(threshold, |
|
224 target_ccupancy, |
|
225 current_occupancy, |
|
226 last_allocation_size, |
|
227 last_allocation_duration, |
|
228 last_marking_length); |
|
229 } |
|
230 |
|
231 void G1NewTracer::report_adaptive_ihop_statistics(size_t threshold, |
|
232 size_t internal_target_occupancy, |
|
233 size_t current_occupancy, |
|
234 size_t additional_buffer_size, |
|
235 double predicted_allocation_rate, |
|
236 double predicted_marking_length, |
|
237 bool prediction_active) { |
|
238 send_adaptive_ihop_statistics(threshold, |
|
239 internal_target_occupancy, |
|
240 additional_buffer_size, |
|
241 current_occupancy, |
|
242 predicted_allocation_rate, |
|
243 predicted_marking_length, |
|
244 prediction_active); |
|
245 } |
|
246 |
|
247 void G1OldTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) { |
|
248 _shared_gc_info.set_start_timestamp(timestamp); |
|
249 } |
|
250 |
|
251 void G1OldTracer::set_gc_cause(GCCause::Cause cause) { |
|
252 _shared_gc_info.set_cause(cause); |
|
253 } |
|
254 |
|
255 #endif // INCLUDE_G1GC |
|