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

Print this page




 139   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 140   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 141   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 142   void send_reference_stats_event(ReferenceType type, size_t count) const;
 143   void send_phase_events(TimePartitions* time_partitions) const;
 144 };
 145 
 146 class YoungGCTracer : public GCTracer {
 147   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 148 
 149   uint _tenuring_threshold;
 150 
 151  protected:
 152   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 153   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 154 
 155  public:
 156   void report_promotion_failed(const PromotionFailedInfo& pf_info);
 157   void report_tenuring_threshold(const uint tenuring_threshold);
 158 






















 159  private:
 160   void send_young_gc_event() const;
 161   void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const;







 162 };
 163 
 164 class OldGCTracer : public GCTracer {
 165  protected:
 166   OldGCTracer(GCName name) : GCTracer(name) {}
 167   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 168 
 169  public:
 170   void report_concurrent_mode_failure();
 171 
 172  private:
 173   void send_old_gc_event() const;
 174   void send_concurrent_mode_failure_event();
 175 };
 176 
 177 class ParallelOldTracer : public OldGCTracer {
 178   ParallelOldGCInfo _parallel_old_gc_info;
 179 
 180  public:
 181   ParallelOldTracer() : OldGCTracer(ParallelOld) {}




 139   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 140   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 141   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 142   void send_reference_stats_event(ReferenceType type, size_t count) const;
 143   void send_phase_events(TimePartitions* time_partitions) const;
 144 };
 145 
 146 class YoungGCTracer : public GCTracer {
 147   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 148 
 149   uint _tenuring_threshold;
 150 
 151  protected:
 152   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 153   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 154 
 155  public:
 156   void report_promotion_failed(const PromotionFailedInfo& pf_info);
 157   void report_tenuring_threshold(const uint tenuring_threshold);
 158 
 159   /*
 160    * Methods for reporting Promotion in new or outside PLAB Events.
 161    * 
 162    * The object age is always required as it is not certain that the mark word 
 163    * of the oop can be trusted at this stage.
 164    *
 165    * obj_size is the size of the promoted object in bytes.
 166    * 
 167    * tenured should be true if the object has been promoted to the old 
 168    * space during this GC, if the object is copied to survivor space 
 169    * from young space or survivor space (aging) tenured should be false.
 170    * 
 171    * plab_size is the size of the newly allocated PLAB in bytes.
 172    */
 173   bool should_report_promotion_in_new_plab_event() const;
 174   bool should_report_promotion_outside_plab_event() const;
 175   void report_promotion_in_new_plab_event(Klass* klass, size_t obj_size,
 176                                           uint age, bool tenured,
 177                                           size_t plab_size) const;
 178   void report_promotion_outside_plab_event(Klass* klass, size_t obj_size,
 179                                            uint age, bool tenured) const;
 180 
 181  private:
 182   void send_young_gc_event() const;
 183   void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const;
 184   bool should_send_promotion_in_new_plab_event() const;
 185   bool should_send_promotion_outside_plab_event() const;
 186   void send_promotion_in_new_plab_event(Klass* klass, size_t obj_size,
 187                                         uint age, bool tenured,
 188                                         size_t plab_size) const;
 189   void send_promotion_outside_plab_event(Klass* klass, size_t obj_size,
 190                                          uint age, bool tenured) const;
 191 };
 192 
 193 class OldGCTracer : public GCTracer {
 194  protected:
 195   OldGCTracer(GCName name) : GCTracer(name) {}
 196   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 197 
 198  public:
 199   void report_concurrent_mode_failure();
 200 
 201  private:
 202   void send_old_gc_event() const;
 203   void send_concurrent_mode_failure_event();
 204 };
 205 
 206 class ParallelOldTracer : public OldGCTracer {
 207   ParallelOldGCInfo _parallel_old_gc_info;
 208 
 209  public:
 210   ParallelOldTracer() : OldGCTracer(ParallelOld) {}