< prev index next >

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

Print this page
rev 10385 : [mq]: step.01
   1 /*
   2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 109   }
 110   G1YCType type() const { return _type; }
 111 };
 112 
 113 #endif // INCLUDE_ALL_GCS
 114 
 115 class GCTracer : public ResourceObj {
 116  protected:
 117   SharedGCInfo _shared_gc_info;
 118 
 119  public:
 120   void report_gc_start(GCCause::Cause cause, const Ticks& timestamp);
 121   void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions);
 122   void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 123   void report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& metaspace_summary) const;
 124   void report_gc_reference_stats(const ReferenceProcessorStats& rp) const;
 125   void report_object_count_after_gc(BoolObjectClosure* object_filter) NOT_SERVICES_RETURN;
 126 
 127  protected:
 128   GCTracer(GCName name) : _shared_gc_info(name) {}
 129   void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp);
 130   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 131 
 132  private:
 133   void send_garbage_collection_event() const;
 134   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 135   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 136   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 137   void send_reference_stats_event(ReferenceType type, size_t count) const;
 138   void send_phase_events(TimePartitions* time_partitions) const;
 139 };
 140 
 141 class YoungGCTracer : public GCTracer {
 142   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 143 
 144   uint _tenuring_threshold;
 145 
 146  protected:
 147   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 148   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 149 


 280                                   size_t current_occupancy,
 281                                   size_t last_allocation_size,
 282                                   double last_allocation_duration,
 283                                   double last_marking_length);
 284   void send_adaptive_ihop_statistics(size_t threshold,
 285                                      size_t internal_target_occupancy,
 286                                      size_t current_occupancy,
 287                                      size_t additional_buffer_size,
 288                                      double predicted_allocation_rate,
 289                                      double predicted_marking_length,
 290                                      bool prediction_active);
 291 };
 292 #endif
 293 
 294 class CMSTracer : public OldGCTracer {
 295  public:
 296   CMSTracer() : OldGCTracer(ConcurrentMarkSweep) {}
 297 };
 298 
 299 class G1OldTracer : public OldGCTracer {


 300  public:
 301   G1OldTracer() : OldGCTracer(G1Old) {}

 302 };
 303 
 304 #endif // SHARE_VM_GC_SHARED_GCTRACE_HPP
   1 /*
   2  * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 109   }
 110   G1YCType type() const { return _type; }
 111 };
 112 
 113 #endif // INCLUDE_ALL_GCS
 114 
 115 class GCTracer : public ResourceObj {
 116  protected:
 117   SharedGCInfo _shared_gc_info;
 118 
 119  public:
 120   void report_gc_start(GCCause::Cause cause, const Ticks& timestamp);
 121   void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions);
 122   void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 123   void report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& metaspace_summary) const;
 124   void report_gc_reference_stats(const ReferenceProcessorStats& rp) const;
 125   void report_object_count_after_gc(BoolObjectClosure* object_filter) NOT_SERVICES_RETURN;
 126 
 127  protected:
 128   GCTracer(GCName name) : _shared_gc_info(name) {}
 129   virtual void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp);
 130   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 131 
 132  private:
 133   void send_garbage_collection_event() const;
 134   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 135   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 136   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 137   void send_reference_stats_event(ReferenceType type, size_t count) const;
 138   void send_phase_events(TimePartitions* time_partitions) const;
 139 };
 140 
 141 class YoungGCTracer : public GCTracer {
 142   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 143 
 144   uint _tenuring_threshold;
 145 
 146  protected:
 147   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 148   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 149 


 280                                   size_t current_occupancy,
 281                                   size_t last_allocation_size,
 282                                   double last_allocation_duration,
 283                                   double last_marking_length);
 284   void send_adaptive_ihop_statistics(size_t threshold,
 285                                      size_t internal_target_occupancy,
 286                                      size_t current_occupancy,
 287                                      size_t additional_buffer_size,
 288                                      double predicted_allocation_rate,
 289                                      double predicted_marking_length,
 290                                      bool prediction_active);
 291 };
 292 #endif
 293 
 294 class CMSTracer : public OldGCTracer {
 295  public:
 296   CMSTracer() : OldGCTracer(ConcurrentMarkSweep) {}
 297 };
 298 
 299 class G1OldTracer : public OldGCTracer {
 300  protected:
 301   void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp);
 302  public:
 303   G1OldTracer() : OldGCTracer(G1Old) {}
 304   void set_gc_cause(GCCause::Cause cause);
 305 };
 306 
 307 #endif // SHARE_VM_GC_SHARED_GCTRACE_HPP
< prev index next >