140 void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const; 141 void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const; 142 void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const; 143 void send_reference_stats_event(ReferenceType type, size_t count) const; 144 void send_phase_events(TimePartitions* time_partitions) const; 145 }; 146 147 class YoungGCTracer : public GCTracer { 148 static const uint UNSET_TENURING_THRESHOLD = (uint) -1; 149 150 uint _tenuring_threshold; 151 152 protected: 153 YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {} 154 virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); 155 156 public: 157 void report_promotion_failed(const PromotionFailedInfo& pf_info); 158 void report_tenuring_threshold(const uint tenuring_threshold); 159 160 private: 161 void send_young_gc_event() const; 162 void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const; 163 }; 164 165 class OldGCTracer : public GCTracer { 166 protected: 167 OldGCTracer(GCName name) : GCTracer(name) {} 168 virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); 169 170 public: 171 void report_concurrent_mode_failure(); 172 173 private: 174 void send_old_gc_event() const; 175 void send_concurrent_mode_failure_event(); 176 }; 177 178 class ParallelOldTracer : public OldGCTracer { 179 ParallelOldGCInfo _parallel_old_gc_info; | 140 void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const; 141 void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const; 142 void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const; 143 void send_reference_stats_event(ReferenceType type, size_t count) const; 144 void send_phase_events(TimePartitions* time_partitions) const; 145 }; 146 147 class YoungGCTracer : public GCTracer { 148 static const uint UNSET_TENURING_THRESHOLD = (uint) -1; 149 150 uint _tenuring_threshold; 151 152 protected: 153 YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {} 154 virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); 155 156 public: 157 void report_promotion_failed(const PromotionFailedInfo& pf_info); 158 void report_tenuring_threshold(const uint tenuring_threshold); 159 160 /* 161 * Generates and commits a Promotion Sample if the trace event is enabled. 162 * 163 * The object age is always required as it is not certain that the mark word 164 * can be trusted at this stage. 165 * 166 * tenured should be true if the object has been promoted to the old 167 * space during this GC, if the object is copied to survivor space 168 * from young space or survivor space (aging) tenured should be false. 169 * 170 * If the plab_size is the same as object size the assumption is that the 171 * object was directly allocated instead of copied into a PLAB. 172 */ 173 void report_promotion_to_new_plab(oop const old, uint age, bool tenured, size_t plab_size); 174 175 private: 176 void send_young_gc_event() const; 177 void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const; 178 }; 179 180 class OldGCTracer : public GCTracer { 181 protected: 182 OldGCTracer(GCName name) : GCTracer(name) {} 183 virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); 184 185 public: 186 void report_concurrent_mode_failure(); 187 188 private: 189 void send_old_gc_event() const; 190 void send_concurrent_mode_failure_event(); 191 }; 192 193 class ParallelOldTracer : public OldGCTracer { 194 ParallelOldGCInfo _parallel_old_gc_info; |