21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_SHARED_GCTRACE_HPP
26 #define SHARE_GC_SHARED_GCTRACE_HPP
27
28 #include "gc/shared/copyFailedInfo.hpp"
29 #include "gc/shared/gcCause.hpp"
30 #include "gc/shared/gcId.hpp"
31 #include "gc/shared/gcName.hpp"
32 #include "gc/shared/gcWhen.hpp"
33 #include "memory/metaspace.hpp"
34 #include "memory/referenceType.hpp"
35 #include "utilities/macros.hpp"
36 #include "utilities/ticks.hpp"
37 #if INCLUDE_G1GC
38 #include "gc/g1/g1YCTypes.hpp"
39 #endif
40
41 class EvacuationInfo;
42 class GCHeapSummary;
43 class MetaspaceChunkFreeListSummary;
44 class MetaspaceSummary;
45 class PSHeapSummary;
46 class G1HeapSummary;
47 class G1EvacSummary;
48 class ReferenceProcessorStats;
49 class TimePartitions;
50 class BoolObjectClosure;
51
52 class SharedGCInfo {
53 private:
54 GCName _name;
55 GCCause::Cause _cause;
56 Ticks _start_timestamp;
57 Ticks _end_timestamp;
58 Tickspan _sum_of_pauses;
59 Tickspan _longest_pause;
60
61 public:
231 public:
232 ParNewTracer() : YoungGCTracer(ParNew) {}
233 };
234
235 #if INCLUDE_G1GC
236 class G1MMUTracer : public AllStatic {
237 static void send_g1_mmu_event(double time_slice_ms, double gc_time_ms, double max_time_ms);
238
239 public:
240 static void report_mmu(double time_slice_sec, double gc_time_sec, double max_time_sec);
241 };
242
243 class G1NewTracer : public YoungGCTracer {
244 G1YoungGCInfo _g1_young_gc_info;
245
246 public:
247 G1NewTracer() : YoungGCTracer(G1New) {}
248
249 void report_yc_type(G1YCType type);
250 void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
251 void report_evacuation_info(EvacuationInfo* info);
252 void report_evacuation_failed(EvacuationFailedInfo& ef_info);
253
254 void report_evacuation_statistics(const G1EvacSummary& young_summary, const G1EvacSummary& old_summary) const;
255
256 void report_basic_ihop_statistics(size_t threshold,
257 size_t target_occupancy,
258 size_t current_occupancy,
259 size_t last_allocation_size,
260 double last_allocation_duration,
261 double last_marking_length);
262 void report_adaptive_ihop_statistics(size_t threshold,
263 size_t internal_target_occupancy,
264 size_t current_occupancy,
265 size_t additional_buffer_size,
266 double predicted_allocation_rate,
267 double predicted_marking_length,
268 bool prediction_active);
269 private:
270 void send_g1_young_gc_event();
271 void send_evacuation_info_event(EvacuationInfo* info);
272 void send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const;
273
274 void send_young_evacuation_statistics(const G1EvacSummary& summary) const;
275 void send_old_evacuation_statistics(const G1EvacSummary& summary) const;
276
277 void send_basic_ihop_statistics(size_t threshold,
278 size_t target_occupancy,
279 size_t current_occupancy,
280 size_t last_allocation_size,
281 double last_allocation_duration,
282 double last_marking_length);
283 void send_adaptive_ihop_statistics(size_t threshold,
284 size_t internal_target_occupancy,
285 size_t current_occupancy,
286 size_t additional_buffer_size,
287 double predicted_allocation_rate,
288 double predicted_marking_length,
289 bool prediction_active);
290 };
291
|
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_SHARED_GCTRACE_HPP
26 #define SHARE_GC_SHARED_GCTRACE_HPP
27
28 #include "gc/shared/copyFailedInfo.hpp"
29 #include "gc/shared/gcCause.hpp"
30 #include "gc/shared/gcId.hpp"
31 #include "gc/shared/gcName.hpp"
32 #include "gc/shared/gcWhen.hpp"
33 #include "memory/metaspace.hpp"
34 #include "memory/referenceType.hpp"
35 #include "utilities/macros.hpp"
36 #include "utilities/ticks.hpp"
37 #if INCLUDE_G1GC
38 #include "gc/g1/g1YCTypes.hpp"
39 #endif
40
41 class G1EvacuationInfo;
42 class GCHeapSummary;
43 class MetaspaceChunkFreeListSummary;
44 class MetaspaceSummary;
45 class PSHeapSummary;
46 class G1HeapSummary;
47 class G1EvacSummary;
48 class ReferenceProcessorStats;
49 class TimePartitions;
50 class BoolObjectClosure;
51
52 class SharedGCInfo {
53 private:
54 GCName _name;
55 GCCause::Cause _cause;
56 Ticks _start_timestamp;
57 Ticks _end_timestamp;
58 Tickspan _sum_of_pauses;
59 Tickspan _longest_pause;
60
61 public:
231 public:
232 ParNewTracer() : YoungGCTracer(ParNew) {}
233 };
234
235 #if INCLUDE_G1GC
236 class G1MMUTracer : public AllStatic {
237 static void send_g1_mmu_event(double time_slice_ms, double gc_time_ms, double max_time_ms);
238
239 public:
240 static void report_mmu(double time_slice_sec, double gc_time_sec, double max_time_sec);
241 };
242
243 class G1NewTracer : public YoungGCTracer {
244 G1YoungGCInfo _g1_young_gc_info;
245
246 public:
247 G1NewTracer() : YoungGCTracer(G1New) {}
248
249 void report_yc_type(G1YCType type);
250 void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
251 void report_evacuation_info(G1EvacuationInfo* info);
252 void report_evacuation_failed(EvacuationFailedInfo& ef_info);
253
254 void report_evacuation_statistics(const G1EvacSummary& young_summary, const G1EvacSummary& old_summary) const;
255
256 void report_basic_ihop_statistics(size_t threshold,
257 size_t target_occupancy,
258 size_t current_occupancy,
259 size_t last_allocation_size,
260 double last_allocation_duration,
261 double last_marking_length);
262 void report_adaptive_ihop_statistics(size_t threshold,
263 size_t internal_target_occupancy,
264 size_t current_occupancy,
265 size_t additional_buffer_size,
266 double predicted_allocation_rate,
267 double predicted_marking_length,
268 bool prediction_active);
269 private:
270 void send_g1_young_gc_event();
271 void send_evacuation_info_event(G1EvacuationInfo* info);
272 void send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const;
273
274 void send_young_evacuation_statistics(const G1EvacSummary& summary) const;
275 void send_old_evacuation_statistics(const G1EvacSummary& summary) const;
276
277 void send_basic_ihop_statistics(size_t threshold,
278 size_t target_occupancy,
279 size_t current_occupancy,
280 size_t last_allocation_size,
281 double last_allocation_duration,
282 double last_marking_length);
283 void send_adaptive_ihop_statistics(size_t threshold,
284 size_t internal_target_occupancy,
285 size_t current_occupancy,
286 size_t additional_buffer_size,
287 double predicted_allocation_rate,
288 double predicted_marking_length,
289 bool prediction_active);
290 };
291
|