8036703: Add trace event with statistics for the metaspace chunk free lists

Fri, 21 Mar 2014 10:31:51 +0100

author
ehelin
date
Fri, 21 Mar 2014 10:31:51 +0100
changeset 6420
9fdaa79b0c27
parent 6419
5af31f70a866
child 6421
7d175751ef7f

8036703: Add trace event with statistics for the metaspace chunk free lists
Reviewed-by: stefank, mgerdin, coleenp, egahlin

src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/gcHeapSummary.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/gcTrace.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/gcTrace.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/gcTraceSend.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_interface/collectedHeap.cpp file | annotate | diff | comparison | revisions
src/share/vm/memory/metaspace.cpp file | annotate | diff | comparison | revisions
src/share/vm/memory/metaspace.hpp file | annotate | diff | comparison | revisions
src/share/vm/memory/metaspaceChunkFreeListSummary.hpp file | annotate | diff | comparison | revisions
src/share/vm/trace/trace.xml file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Mar 21 10:28:07 2014 +0100
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Mar 21 10:31:51 2014 +0100
     1.3 @@ -2496,7 +2496,8 @@
     1.4  }
     1.5  
     1.6  void CMSCollector::report_heap_summary(GCWhen::Type when) {
     1.7 -  _gc_tracer_cm->report_gc_heap_summary(when, _last_heap_summary, _last_metaspace_summary);
     1.8 +  _gc_tracer_cm->report_gc_heap_summary(when, _last_heap_summary);
     1.9 +  _gc_tracer_cm->report_metaspace_summary(when, _last_metaspace_summary);
    1.10  }
    1.11  
    1.12  void CMSCollector::collect_in_foreground(bool clear_all_soft_refs, GCCause::Cause cause) {
     2.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Fri Mar 21 10:28:07 2014 +0100
     2.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Fri Mar 21 10:31:51 2014 +0100
     2.3 @@ -669,8 +669,10 @@
     2.4  
     2.5  void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) {
     2.6    const PSHeapSummary& heap_summary = create_ps_heap_summary();
     2.7 +  gc_tracer->report_gc_heap_summary(when, heap_summary);
     2.8 +
     2.9    const MetaspaceSummary& metaspace_summary = create_metaspace_summary();
    2.10 -  gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary);
    2.11 +  gc_tracer->report_metaspace_summary(when, metaspace_summary);
    2.12  }
    2.13  
    2.14  ParallelScavengeHeap* ParallelScavengeHeap::heap() {
     3.1 --- a/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp	Fri Mar 21 10:28:07 2014 +0100
     3.2 +++ b/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp	Fri Mar 21 10:31:51 2014 +0100
     3.3 @@ -26,6 +26,7 @@
     3.4  #define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCHEAPSUMMARY_HPP
     3.5  
     3.6  #include "memory/allocation.hpp"
     3.7 +#include "memory/metaspaceChunkFreeListSummary.hpp"
     3.8  
     3.9  class VirtualSpaceSummary : public StackObj {
    3.10    HeapWord* _start;
    3.11 @@ -129,16 +130,45 @@
    3.12    MetaspaceSizes _meta_space;
    3.13    MetaspaceSizes _data_space;
    3.14    MetaspaceSizes _class_space;
    3.15 +  MetaspaceChunkFreeListSummary _metaspace_chunk_free_list_summary;
    3.16 +  MetaspaceChunkFreeListSummary _class_chunk_free_list_summary;
    3.17  
    3.18   public:
    3.19 -  MetaspaceSummary() : _capacity_until_GC(0), _meta_space(), _data_space(), _class_space() {}
    3.20 -  MetaspaceSummary(size_t capacity_until_GC, const MetaspaceSizes& meta_space, const MetaspaceSizes& data_space, const MetaspaceSizes& class_space) :
    3.21 -       _capacity_until_GC(capacity_until_GC), _meta_space(meta_space), _data_space(data_space), _class_space(class_space) { }
    3.22 +  MetaspaceSummary() :
    3.23 +    _capacity_until_GC(0),
    3.24 +    _meta_space(),
    3.25 +    _data_space(),
    3.26 +    _class_space(),
    3.27 +    _metaspace_chunk_free_list_summary(),
    3.28 +    _class_chunk_free_list_summary()
    3.29 +  {}
    3.30 +  MetaspaceSummary(size_t capacity_until_GC,
    3.31 +                   const MetaspaceSizes& meta_space,
    3.32 +                   const MetaspaceSizes& data_space,
    3.33 +                   const MetaspaceSizes& class_space,
    3.34 +                   const MetaspaceChunkFreeListSummary& metaspace_chunk_free_list_summary,
    3.35 +                   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary) :
    3.36 +    _capacity_until_GC(capacity_until_GC),
    3.37 +    _meta_space(meta_space),
    3.38 +    _data_space(data_space),
    3.39 +    _class_space(class_space),
    3.40 +    _metaspace_chunk_free_list_summary(metaspace_chunk_free_list_summary),
    3.41 +    _class_chunk_free_list_summary(class_chunk_free_list_summary)
    3.42 +  {}
    3.43  
    3.44    size_t capacity_until_GC() const { return _capacity_until_GC; }
    3.45    const MetaspaceSizes& meta_space() const { return _meta_space; }
    3.46    const MetaspaceSizes& data_space() const { return _data_space; }
    3.47    const MetaspaceSizes& class_space() const { return _class_space; }
    3.48 +
    3.49 +  const MetaspaceChunkFreeListSummary& metaspace_chunk_free_list_summary() const {
    3.50 +    return _metaspace_chunk_free_list_summary;
    3.51 +  }
    3.52 +
    3.53 +  const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary() const {
    3.54 +    return _class_chunk_free_list_summary;
    3.55 +  }
    3.56 +
    3.57  };
    3.58  
    3.59  #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_GCHEAPSUMMARY_HPP
     4.1 --- a/src/share/vm/gc_implementation/shared/gcTrace.cpp	Fri Mar 21 10:28:07 2014 +0100
     4.2 +++ b/src/share/vm/gc_implementation/shared/gcTrace.cpp	Fri Mar 21 10:31:51 2014 +0100
     4.3 @@ -139,11 +139,21 @@
     4.4  }
     4.5  #endif // INCLUDE_SERVICES
     4.6  
     4.7 -void GCTracer::report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary, const MetaspaceSummary& meta_space_summary) const {
     4.8 +void GCTracer::report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const {
     4.9    assert_set_gc_id();
    4.10  
    4.11    send_gc_heap_summary_event(when, heap_summary);
    4.12 -  send_meta_space_summary_event(when, meta_space_summary);
    4.13 +}
    4.14 +
    4.15 +void GCTracer::report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& summary) const {
    4.16 +  assert_set_gc_id();
    4.17 +
    4.18 +  send_meta_space_summary_event(when, summary);
    4.19 +
    4.20 +  send_metaspace_chunk_free_list_summary(when, Metaspace::NonClassType, summary.metaspace_chunk_free_list_summary());
    4.21 +  if (UseCompressedClassPointers) {
    4.22 +    send_metaspace_chunk_free_list_summary(when, Metaspace::ClassType, summary.class_chunk_free_list_summary());
    4.23 +  }
    4.24  }
    4.25  
    4.26  void YoungGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
     5.1 --- a/src/share/vm/gc_implementation/shared/gcTrace.hpp	Fri Mar 21 10:28:07 2014 +0100
     5.2 +++ b/src/share/vm/gc_implementation/shared/gcTrace.hpp	Fri Mar 21 10:31:51 2014 +0100
     5.3 @@ -30,6 +30,7 @@
     5.4  #include "gc_implementation/shared/gcWhen.hpp"
     5.5  #include "gc_implementation/shared/copyFailedInfo.hpp"
     5.6  #include "memory/allocation.hpp"
     5.7 +#include "memory/metaspace.hpp"
     5.8  #include "memory/referenceType.hpp"
     5.9  #if INCLUDE_ALL_GCS
    5.10  #include "gc_implementation/g1/g1YCTypes.hpp"
    5.11 @@ -41,6 +42,7 @@
    5.12  
    5.13  class EvacuationInfo;
    5.14  class GCHeapSummary;
    5.15 +class MetaspaceChunkFreeListSummary;
    5.16  class MetaspaceSummary;
    5.17  class PSHeapSummary;
    5.18  class ReferenceProcessorStats;
    5.19 @@ -124,7 +126,8 @@
    5.20   public:
    5.21    void report_gc_start(GCCause::Cause cause, const Ticks& timestamp);
    5.22    void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions);
    5.23 -  void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary, const MetaspaceSummary& meta_space_summary) const;
    5.24 +  void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
    5.25 +  void report_metaspace_summary(GCWhen::Type when, const MetaspaceSummary& metaspace_summary) const;
    5.26    void report_gc_reference_stats(const ReferenceProcessorStats& rp) const;
    5.27    void report_object_count_after_gc(BoolObjectClosure* object_filter) NOT_SERVICES_RETURN;
    5.28    bool has_reported_gc_start() const;
    5.29 @@ -138,6 +141,7 @@
    5.30    void send_garbage_collection_event() const;
    5.31    void send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const;
    5.32    void send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const;
    5.33 +  void send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const;
    5.34    void send_reference_stats_event(ReferenceType type, size_t count) const;
    5.35    void send_phase_events(TimePartitions* time_partitions) const;
    5.36  };
     6.1 --- a/src/share/vm/gc_implementation/shared/gcTraceSend.cpp	Fri Mar 21 10:28:07 2014 +0100
     6.2 +++ b/src/share/vm/gc_implementation/shared/gcTraceSend.cpp	Fri Mar 21 10:31:51 2014 +0100
     6.3 @@ -64,6 +64,30 @@
     6.4    }
     6.5  }
     6.6  
     6.7 +void GCTracer::send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype,
     6.8 +                                                      const MetaspaceChunkFreeListSummary& summary) const {
     6.9 +  EventMetaspaceChunkFreeListSummary e;
    6.10 +  if (e.should_commit()) {
    6.11 +    e.set_gcId(_shared_gc_info.id());
    6.12 +    e.set_when(when);
    6.13 +    e.set_metadataType(mdtype);
    6.14 +
    6.15 +    e.set_specializedChunks(summary.num_specialized_chunks());
    6.16 +    e.set_specializedChunksTotalSize(summary.specialized_chunks_size_in_bytes());
    6.17 +
    6.18 +    e.set_smallChunks(summary.num_small_chunks());
    6.19 +    e.set_smallChunksTotalSize(summary.small_chunks_size_in_bytes());
    6.20 +
    6.21 +    e.set_mediumChunks(summary.num_medium_chunks());
    6.22 +    e.set_mediumChunksTotalSize(summary.medium_chunks_size_in_bytes());
    6.23 +
    6.24 +    e.set_humongousChunks(summary.num_humongous_chunks());
    6.25 +    e.set_humongousChunksTotalSize(summary.humongous_chunks_size_in_bytes());
    6.26 +
    6.27 +    e.commit();
    6.28 +  }
    6.29 +}
    6.30 +
    6.31  void ParallelOldTracer::send_parallel_old_event() const {
    6.32    EventGCParallelOld e(UNTIMED);
    6.33    if (e.should_commit()) {
     7.1 --- a/src/share/vm/gc_interface/collectedHeap.cpp	Fri Mar 21 10:28:07 2014 +0100
     7.2 +++ b/src/share/vm/gc_interface/collectedHeap.cpp	Fri Mar 21 10:31:51 2014 +0100
     7.3 @@ -97,7 +97,13 @@
     7.4        MetaspaceAux::allocated_used_bytes(Metaspace::ClassType),
     7.5        MetaspaceAux::reserved_bytes(Metaspace::ClassType));
     7.6  
     7.7 -  return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space);
     7.8 +  const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =
     7.9 +    MetaspaceAux::chunk_free_list_summary(Metaspace::NonClassType);
    7.10 +  const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
    7.11 +    MetaspaceAux::chunk_free_list_summary(Metaspace::ClassType);
    7.12 +
    7.13 +  return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
    7.14 +                          ms_chunk_free_list_summary, class_chunk_free_list_summary);
    7.15  }
    7.16  
    7.17  void CollectedHeap::print_heap_before_gc() {
    7.18 @@ -128,8 +134,10 @@
    7.19  
    7.20  void CollectedHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) {
    7.21    const GCHeapSummary& heap_summary = create_heap_summary();
    7.22 +  gc_tracer->report_gc_heap_summary(when, heap_summary);
    7.23 +
    7.24    const MetaspaceSummary& metaspace_summary = create_metaspace_summary();
    7.25 -  gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary);
    7.26 +  gc_tracer->report_metaspace_summary(when, metaspace_summary);
    7.27  }
    7.28  
    7.29  void CollectedHeap::trace_heap_before_gc(GCTracer* gc_tracer) {
     8.1 --- a/src/share/vm/memory/metaspace.cpp	Fri Mar 21 10:28:07 2014 +0100
     8.2 +++ b/src/share/vm/memory/metaspace.cpp	Fri Mar 21 10:31:51 2014 +0100
     8.3 @@ -185,6 +185,48 @@
     8.4    // Remove from a list by size.  Selects list based on size of chunk.
     8.5    Metachunk* free_chunks_get(size_t chunk_word_size);
     8.6  
     8.7 +#define index_bounds_check(index)                                         \
     8.8 +  assert(index == SpecializedIndex ||                                     \
     8.9 +         index == SmallIndex ||                                           \
    8.10 +         index == MediumIndex ||                                          \
    8.11 +         index == HumongousIndex, err_msg("Bad index: %d", (int) index))
    8.12 +
    8.13 +  size_t num_free_chunks(ChunkIndex index) const {
    8.14 +    index_bounds_check(index);
    8.15 +
    8.16 +    if (index == HumongousIndex) {
    8.17 +      return _humongous_dictionary.total_free_blocks();
    8.18 +    }
    8.19 +
    8.20 +    ssize_t count = _free_chunks[index].count();
    8.21 +    return count == -1 ? 0 : (size_t) count;
    8.22 +  }
    8.23 +
    8.24 +  size_t size_free_chunks_in_bytes(ChunkIndex index) const {
    8.25 +    index_bounds_check(index);
    8.26 +
    8.27 +    size_t word_size = 0;
    8.28 +    if (index == HumongousIndex) {
    8.29 +      word_size = _humongous_dictionary.total_size();
    8.30 +    } else {
    8.31 +      const size_t size_per_chunk_in_words = _free_chunks[index].size();
    8.32 +      word_size = size_per_chunk_in_words * num_free_chunks(index);
    8.33 +    }
    8.34 +
    8.35 +    return word_size * BytesPerWord;
    8.36 +  }
    8.37 +
    8.38 +  MetaspaceChunkFreeListSummary chunk_free_list_summary() const {
    8.39 +    return MetaspaceChunkFreeListSummary(num_free_chunks(SpecializedIndex),
    8.40 +                                         num_free_chunks(SmallIndex),
    8.41 +                                         num_free_chunks(MediumIndex),
    8.42 +                                         num_free_chunks(HumongousIndex),
    8.43 +                                         size_free_chunks_in_bytes(SpecializedIndex),
    8.44 +                                         size_free_chunks_in_bytes(SmallIndex),
    8.45 +                                         size_free_chunks_in_bytes(MediumIndex),
    8.46 +                                         size_free_chunks_in_bytes(HumongousIndex));
    8.47 +  }
    8.48 +
    8.49    // Debug support
    8.50    void verify();
    8.51    void slow_verify() {
    8.52 @@ -2636,6 +2678,19 @@
    8.53    return free_chunks_total_words() * BytesPerWord;
    8.54  }
    8.55  
    8.56 +bool MetaspaceAux::has_chunk_free_list(Metaspace::MetadataType mdtype) {
    8.57 +  return Metaspace::get_chunk_manager(mdtype) != NULL;
    8.58 +}
    8.59 +
    8.60 +MetaspaceChunkFreeListSummary MetaspaceAux::chunk_free_list_summary(Metaspace::MetadataType mdtype) {
    8.61 +  if (!has_chunk_free_list(mdtype)) {
    8.62 +    return MetaspaceChunkFreeListSummary();
    8.63 +  }
    8.64 +
    8.65 +  const ChunkManager* cm = Metaspace::get_chunk_manager(mdtype);
    8.66 +  return cm->chunk_free_list_summary();
    8.67 +}
    8.68 +
    8.69  void MetaspaceAux::print_metaspace_change(size_t prev_metadata_used) {
    8.70    gclog_or_tty->print(", [Metaspace:");
    8.71    if (PrintGCDetails && Verbose) {
     9.1 --- a/src/share/vm/memory/metaspace.hpp	Fri Mar 21 10:28:07 2014 +0100
     9.2 +++ b/src/share/vm/memory/metaspace.hpp	Fri Mar 21 10:31:51 2014 +0100
     9.3 @@ -26,6 +26,7 @@
     9.4  
     9.5  #include "memory/allocation.hpp"
     9.6  #include "memory/memRegion.hpp"
     9.7 +#include "memory/metaspaceChunkFreeListSummary.hpp"
     9.8  #include "runtime/virtualspace.hpp"
     9.9  #include "utilities/exceptions.hpp"
    9.10  
    9.11 @@ -354,6 +355,9 @@
    9.12      return min_chunk_size_words() * BytesPerWord;
    9.13    }
    9.14  
    9.15 +  static bool has_chunk_free_list(Metaspace::MetadataType mdtype);
    9.16 +  static MetaspaceChunkFreeListSummary chunk_free_list_summary(Metaspace::MetadataType mdtype);
    9.17 +
    9.18    // Print change in used metadata.
    9.19    static void print_metaspace_change(size_t prev_metadata_used);
    9.20    static void print_on(outputStream * out);
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/src/share/vm/memory/metaspaceChunkFreeListSummary.hpp	Fri Mar 21 10:31:51 2014 +0100
    10.3 @@ -0,0 +1,103 @@
    10.4 +/*
    10.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    10.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.7 + *
    10.8 + * This code is free software; you can redistribute it and/or modify it
    10.9 + * under the terms of the GNU General Public License version 2 only, as
   10.10 + * published by the Free Software Foundation.
   10.11 + *
   10.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   10.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   10.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   10.15 + * version 2 for more details (a copy is included in the LICENSE file that
   10.16 + * accompanied this code).
   10.17 + *
   10.18 + * You should have received a copy of the GNU General Public License version
   10.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   10.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   10.21 + *
   10.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   10.23 + * or visit www.oracle.com if you need additional information or have any
   10.24 + * questions.
   10.25 + *
   10.26 + */
   10.27 +#ifndef SHARE_VM_MEMORY_METASPACE_CHUNK_FREE_LIST_SUMMARY_HPP
   10.28 +#define SHARE_VM_MEMORY_METASPACE_CHUNK_FREE_LIST_SUMMARY_HPP
   10.29 +
   10.30 +#include "memory/allocation.hpp"
   10.31 +
   10.32 +class MetaspaceChunkFreeListSummary VALUE_OBJ_CLASS_SPEC {
   10.33 +  size_t _num_specialized_chunks;
   10.34 +  size_t _num_small_chunks;
   10.35 +  size_t _num_medium_chunks;
   10.36 +  size_t _num_humongous_chunks;
   10.37 +
   10.38 +  size_t _specialized_chunks_size_in_bytes;
   10.39 +  size_t _small_chunks_size_in_bytes;
   10.40 +  size_t _medium_chunks_size_in_bytes;
   10.41 +  size_t _humongous_chunks_size_in_bytes;
   10.42 +
   10.43 + public:
   10.44 +  MetaspaceChunkFreeListSummary() :
   10.45 +    _num_specialized_chunks(0),
   10.46 +    _num_small_chunks(0),
   10.47 +    _num_medium_chunks(0),
   10.48 +    _num_humongous_chunks(0),
   10.49 +    _specialized_chunks_size_in_bytes(0),
   10.50 +    _small_chunks_size_in_bytes(0),
   10.51 +    _medium_chunks_size_in_bytes(0),
   10.52 +    _humongous_chunks_size_in_bytes(0)
   10.53 +  {}
   10.54 +
   10.55 +  MetaspaceChunkFreeListSummary(size_t num_specialized_chunks,
   10.56 +                                size_t num_small_chunks,
   10.57 +                                size_t num_medium_chunks,
   10.58 +                                size_t num_humongous_chunks,
   10.59 +                                size_t specialized_chunks_size_in_bytes,
   10.60 +                                size_t small_chunks_size_in_bytes,
   10.61 +                                size_t medium_chunks_size_in_bytes,
   10.62 +                                size_t humongous_chunks_size_in_bytes) :
   10.63 +    _num_specialized_chunks(num_specialized_chunks),
   10.64 +    _num_small_chunks(num_small_chunks),
   10.65 +    _num_medium_chunks(num_medium_chunks),
   10.66 +    _num_humongous_chunks(num_humongous_chunks),
   10.67 +    _specialized_chunks_size_in_bytes(specialized_chunks_size_in_bytes),
   10.68 +    _small_chunks_size_in_bytes(small_chunks_size_in_bytes),
   10.69 +    _medium_chunks_size_in_bytes(medium_chunks_size_in_bytes),
   10.70 +    _humongous_chunks_size_in_bytes(humongous_chunks_size_in_bytes)
   10.71 +  {}
   10.72 +
   10.73 +  size_t num_specialized_chunks() const {
   10.74 +    return _num_specialized_chunks;
   10.75 +  }
   10.76 +
   10.77 +  size_t num_small_chunks() const {
   10.78 +    return _num_small_chunks;
   10.79 +  }
   10.80 +
   10.81 +  size_t num_medium_chunks() const {
   10.82 +    return _num_medium_chunks;
   10.83 +  }
   10.84 +
   10.85 +  size_t num_humongous_chunks() const {
   10.86 +    return _num_humongous_chunks;
   10.87 +  }
   10.88 +
   10.89 +  size_t specialized_chunks_size_in_bytes() const {
   10.90 +    return _specialized_chunks_size_in_bytes;
   10.91 +  }
   10.92 +
   10.93 +  size_t small_chunks_size_in_bytes() const {
   10.94 +    return _small_chunks_size_in_bytes;
   10.95 +  }
   10.96 +
   10.97 +  size_t medium_chunks_size_in_bytes() const {
   10.98 +    return _medium_chunks_size_in_bytes;
   10.99 +  }
  10.100 +
  10.101 +  size_t humongous_chunks_size_in_bytes() const {
  10.102 +    return _humongous_chunks_size_in_bytes;
  10.103 +  }
  10.104 +};
  10.105 +
  10.106 +#endif // SHARE_VM_MEMORY_METASPACE_CHUNK_FREE_LIST_SUMMARY_HPP
    11.1 --- a/src/share/vm/trace/trace.xml	Fri Mar 21 10:28:07 2014 +0100
    11.2 +++ b/src/share/vm/trace/trace.xml	Fri Mar 21 10:31:51 2014 +0100
    11.3 @@ -221,6 +221,20 @@
    11.4        <value type="METASPACEOBJTYPE" field="metaspaceObjectType" label="Metaspace Object Type" />
    11.5      </event>
    11.6  
    11.7 +    <event id="MetaspaceChunkFreeListSummary" path="vm/gc/metaspace/chunk_free_list_summary" label="Metaspace Chunk Free List Summary" is_instant="true">
    11.8 +      <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
    11.9 +      <value type="GCWHEN" field="when" label="When" />
   11.10 +      <value type="METADATATYPE" field="metadataType" label="Metadata Type" />
   11.11 +      <value type="ULONG" field="specializedChunks" label="Specialized Chunks" />
   11.12 +      <value type="BYTES64" field="specializedChunksTotalSize" label="Specialized Chunks Total Size" />
   11.13 +      <value type="ULONG" field="smallChunks" label="Small Chunks" />
   11.14 +      <value type="BYTES64" field="smallChunksTotalSize" label="Small Chunks Total Size" />
   11.15 +      <value type="ULONG" field="mediumChunks" label="Medium Chunks" />
   11.16 +      <value type="BYTES64" field="mediumChunksTotalSize" label="Medium Chunks Total Size" />
   11.17 +      <value type="ULONG" field="humongousChunks" label="Humongous Chunks" />
   11.18 +      <value type="BYTES64" field="humongousChunksTotalSize" label="Humongous Chunks Total Size" />
   11.19 +    </event>
   11.20 +
   11.21      <event id="PSHeapSummary" path="vm/gc/heap/ps_summary" label="Parallel Scavenge Heap Summary" is_instant="true">
   11.22        <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
   11.23        <value type="GCWHEN" field="when" label="When" />

mercurial