< prev index next >

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

Print this page
rev 57625 : [mq]: metaspace-improvement


  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  *
  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:


 115  protected:
 116   SharedGCInfo _shared_gc_info;
 117 
 118  public:
 119   void report_gc_start(GCCause::Cause cause, const Ticks& timestamp);
 120   void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions);
 121   void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 122   void report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& metaspace_summary) const;
 123   void report_gc_reference_stats(const ReferenceProcessorStats& rp) const;
 124   void report_object_count_after_gc(BoolObjectClosure* object_filter) NOT_SERVICES_RETURN;
 125 
 126  protected:
 127   GCTracer(GCName name) : _shared_gc_info(name) {}
 128   virtual void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp);
 129   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 130 
 131  private:
 132   void send_garbage_collection_event() const;
 133   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 134   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 135   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 136   void send_reference_stats_event(ReferenceType type, size_t count) const;
 137   void send_phase_events(TimePartitions* time_partitions) const;
 138 };
 139 
 140 class YoungGCTracer : public GCTracer {
 141   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 142 
 143   uint _tenuring_threshold;
 144 
 145  protected:
 146   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 147   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 148 
 149  public:
 150   void report_promotion_failed(const PromotionFailedInfo& pf_info) const;
 151   void report_tenuring_threshold(const uint tenuring_threshold);
 152 
 153   /*
 154    * Methods for reporting Promotion in new or outside PLAB Events.
 155    *




  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  *
  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/metaspaceEnums.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:


 115  protected:
 116   SharedGCInfo _shared_gc_info;
 117 
 118  public:
 119   void report_gc_start(GCCause::Cause cause, const Ticks& timestamp);
 120   void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions);
 121   void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 122   void report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& metaspace_summary) const;
 123   void report_gc_reference_stats(const ReferenceProcessorStats& rp) const;
 124   void report_object_count_after_gc(BoolObjectClosure* object_filter) NOT_SERVICES_RETURN;
 125 
 126  protected:
 127   GCTracer(GCName name) : _shared_gc_info(name) {}
 128   virtual void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp);
 129   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 130 
 131  private:
 132   void send_garbage_collection_event() const;
 133   void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
 134   void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
 135   void send_metaspace_chunk_free_list_summary(GCWhen::Type when, metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
 136   void send_reference_stats_event(ReferenceType type, size_t count) const;
 137   void send_phase_events(TimePartitions* time_partitions) const;
 138 };
 139 
 140 class YoungGCTracer : public GCTracer {
 141   static const uint UNSET_TENURING_THRESHOLD = (uint) -1;
 142 
 143   uint _tenuring_threshold;
 144 
 145  protected:
 146   YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {}
 147   virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
 148 
 149  public:
 150   void report_promotion_failed(const PromotionFailedInfo& pf_info) const;
 151   void report_tenuring_threshold(const uint tenuring_threshold);
 152 
 153   /*
 154    * Methods for reporting Promotion in new or outside PLAB Events.
 155    *


< prev index next >