src/share/vm/gc_implementation/shared/gcTrace.hpp

Print this page




 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;
 180 
 181  public:
 182   ParallelOldTracer() : OldGCTracer(ParallelOld) {}




 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    * Methods for reporting Promotion in new or outside PLAB Events.
 162    * 
 163    * The object age is always required as it is not certain that the mark word 
 164    * of the oop can be trusted at this stage.
 165    *
 166    * obj_size is the size of the promoted object in HeapWords
 167    * 
 168    * tenured should be true if the object has been promoted to the old 
 169    * space during this GC, if the object is copied to survivor space 
 170    * from young space or survivor space (aging) tenured should be false.
 171    * 
 172    * plab_size is the size of the newly allocated PLAB in HeapWords
 173    */
 174   bool should_report_promotion_in_new_plab_event() const;
 175   bool should_report_promotion_outside_plab_event() const;
 176   void report_promotion_in_new_plab_event(const oop old, const size_t obj_size,
 177                                           const uint age, bool tenured,
 178                                           const size_t plab_size) const;
 179   void report_promotion_outside_plab_event(const oop old, const size_t obj_size,
 180                                            const uint age, bool tenured) const;
 181 
 182  private:
 183   void send_young_gc_event() const;
 184   void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const;
 185   bool should_send_promotion_in_new_plab_event() const;
 186   bool should_send_promotion_outside_plab_event() const;
 187   void send_promotion_in_new_plab_event(const oop old, const size_t obj_size,
 188                                         const uint age, bool tenured,
 189                                         const size_t plab_size) const;
 190   void send_promotion_outside_plab_event(const oop old, const size_t obj_size,
 191                                          const uint age, bool tenured) const;
 192 };
 193 
 194 class OldGCTracer : public GCTracer {
 195  protected:
 196   OldGCTracer(GCName name) : GCTracer(name) {}
 197   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 198 
 199  public:
 200   void report_concurrent_mode_failure();
 201 
 202  private:
 203   void send_old_gc_event() const;
 204   void send_concurrent_mode_failure_event();
 205 };
 206 
 207 class ParallelOldTracer : public OldGCTracer {
 208   ParallelOldGCInfo _parallel_old_gc_info;
 209 
 210  public:
 211   ParallelOldTracer() : OldGCTracer(ParallelOld) {}