8199430: Rename MetaspaceAux to something more meaningful
authorstuefe
Sun, 11 Mar 2018 07:11:03 +0100
changeset 49389 9ef2eee8ca7c
parent 49388 ec9091426557
child 49391 02076019c25d
8199430: Rename MetaspaceAux to something more meaningful Reviewed-by: zgu, coleenp
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
src/hotspot/share/gc/g1/g1HeapTransition.cpp
src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp
src/hotspot/share/gc/parallel/psMarkSweep.cpp
src/hotspot/share/gc/parallel/psParallelCompact.cpp
src/hotspot/share/gc/parallel/psScavenge.cpp
src/hotspot/share/gc/shared/collectedHeap.cpp
src/hotspot/share/gc/shared/genCollectedHeap.cpp
src/hotspot/share/memory/metaspace.cpp
src/hotspot/share/memory/metaspace.hpp
src/hotspot/share/memory/metaspaceCounters.cpp
src/hotspot/share/memory/universe.cpp
src/hotspot/share/memory/universe.hpp
src/hotspot/share/prims/whitebox.cpp
src/hotspot/share/runtime/vm_operations.cpp
src/hotspot/share/services/memReporter.cpp
src/hotspot/share/services/memoryPool.cpp
src/hotspot/share/services/virtualMemoryTracker.cpp
src/hotspot/share/utilities/internalVMTests.cpp
test/hotspot/gtest/memory/test_metaspace_allocation.cpp
test/hotspot/jtreg/gc/TestVerifySubSet.java
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -1074,7 +1074,7 @@
 void G1CollectedHeap::prepare_heap_for_mutators() {
   // Delete metaspaces for unloaded class loaders and clean up loader_data graph
   ClassLoaderDataGraph::purge();
-  MetaspaceAux::verify_metrics();
+  MetaspaceUtils::verify_metrics();
 
   // Prepare heap for normal collections.
   assert(num_free_regions() == 0, "we should not have added any free regions");
@@ -2345,7 +2345,7 @@
   st->print("%u survivors (" SIZE_FORMAT "K)", survivor_regions,
             (size_t) survivor_regions * HeapRegion::GrainBytes / K);
   st->cr();
-  MetaspaceAux::print_on(st);
+  MetaspaceUtils::print_on(st);
 }
 
 void G1CollectedHeap::print_regions_on(outputStream* st) const {
--- a/src/hotspot/share/gc/g1/g1HeapTransition.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1HeapTransition.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -34,7 +34,7 @@
   _survivor_length = g1_heap->survivor_regions_count();
   _old_length = g1_heap->old_regions_count();
   _humongous_length = g1_heap->humongous_regions_count();
-  _metaspace_used_bytes = MetaspaceAux::used_bytes();
+  _metaspace_used_bytes = MetaspaceUtils::used_bytes();
 }
 
 G1HeapTransition::G1HeapTransition(G1CollectedHeap* g1_heap) : _g1_heap(g1_heap), _before(g1_heap) { }
@@ -117,5 +117,5 @@
   log_trace(gc, heap)(" Used: " SIZE_FORMAT "K, Waste: " SIZE_FORMAT "K",
       usage._humongous_used / K, ((after._humongous_length * HeapRegion::GrainBytes) - usage._humongous_used) / K);
 
-  MetaspaceAux::print_metaspace_change(_before._metaspace_used_bytes);
+  MetaspaceUtils::print_metaspace_change(_before._metaspace_used_bytes);
 }
--- a/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -572,7 +572,7 @@
 void ParallelScavengeHeap::print_on(outputStream* st) const {
   young_gen()->print_on(st);
   old_gen()->print_on(st);
-  MetaspaceAux::print_on(st);
+  MetaspaceUtils::print_on(st);
 }
 
 void ParallelScavengeHeap::print_on_error(outputStream* st) const {
--- a/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp	Sun Mar 11 07:11:03 2018 +0100
@@ -267,7 +267,7 @@
       _heap_used(heap->used()),
       _young_gen_used(heap->young_gen()->used_in_bytes()),
       _old_gen_used(heap->old_gen()->used_in_bytes()),
-      _metadata_used(MetaspaceAux::used_bytes()) { };
+      _metadata_used(MetaspaceUtils::used_bytes()) { };
 
   size_t heap_used() const      { return _heap_used; }
   size_t young_gen_used() const { return _young_gen_used; }
--- a/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -186,7 +186,7 @@
     BiasedLocking::preserve_marks();
 
     // Capture metadata size before collection for sizing.
-    size_t metadata_prev_used = MetaspaceAux::used_bytes();
+    size_t metadata_prev_used = MetaspaceUtils::used_bytes();
 
     size_t old_gen_prev_used = old_gen->used_in_bytes();
     size_t young_gen_prev_used = young_gen->used_in_bytes();
@@ -247,7 +247,7 @@
 
     // Delete metaspaces for unloaded class loaders and clean up loader_data graph
     ClassLoaderDataGraph::purge();
-    MetaspaceAux::verify_metrics();
+    MetaspaceUtils::verify_metrics();
 
     BiasedLocking::restore_marks();
     CodeCache::gc_epilogue();
@@ -352,7 +352,7 @@
 
     young_gen->print_used_change(young_gen_prev_used);
     old_gen->print_used_change(old_gen_prev_used);
-    MetaspaceAux::print_metaspace_change(metadata_prev_used);
+    MetaspaceUtils::print_metaspace_change(metadata_prev_used);
 
     // Track memory usage and detect low memory
     MemoryService::track_memory_usage();
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -1028,7 +1028,7 @@
 
   // Delete metaspaces for unloaded class loaders and clean up loader_data graph
   ClassLoaderDataGraph::purge();
-  MetaspaceAux::verify_metrics();
+  MetaspaceUtils::verify_metrics();
 
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
@@ -1902,7 +1902,7 @@
 
     young_gen->print_used_change(pre_gc_values.young_gen_used());
     old_gen->print_used_change(pre_gc_values.old_gen_used());
-    MetaspaceAux::print_metaspace_change(pre_gc_values.metadata_used());
+    MetaspaceUtils::print_metaspace_change(pre_gc_values.metadata_used());
 
     // Track memory usage and detect low memory
     MemoryService::track_memory_usage();
--- a/src/hotspot/share/gc/parallel/psScavenge.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/parallel/psScavenge.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -626,7 +626,7 @@
 
     young_gen->print_used_change(pre_gc_values.young_gen_used());
     old_gen->print_used_change(pre_gc_values.old_gen_used());
-    MetaspaceAux::print_metaspace_change(pre_gc_values.metadata_used());
+    MetaspaceUtils::print_metaspace_change(pre_gc_values.metadata_used());
 
     // Track memory usage and detect low memory
     MemoryService::track_memory_usage();
--- a/src/hotspot/share/gc/shared/collectedHeap.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -97,22 +97,22 @@
 
 MetaspaceSummary CollectedHeap::create_metaspace_summary() {
   const MetaspaceSizes meta_space(
-      MetaspaceAux::committed_bytes(),
-      MetaspaceAux::used_bytes(),
-      MetaspaceAux::reserved_bytes());
+      MetaspaceUtils::committed_bytes(),
+      MetaspaceUtils::used_bytes(),
+      MetaspaceUtils::reserved_bytes());
   const MetaspaceSizes data_space(
-      MetaspaceAux::committed_bytes(Metaspace::NonClassType),
-      MetaspaceAux::used_bytes(Metaspace::NonClassType),
-      MetaspaceAux::reserved_bytes(Metaspace::NonClassType));
+      MetaspaceUtils::committed_bytes(Metaspace::NonClassType),
+      MetaspaceUtils::used_bytes(Metaspace::NonClassType),
+      MetaspaceUtils::reserved_bytes(Metaspace::NonClassType));
   const MetaspaceSizes class_space(
-      MetaspaceAux::committed_bytes(Metaspace::ClassType),
-      MetaspaceAux::used_bytes(Metaspace::ClassType),
-      MetaspaceAux::reserved_bytes(Metaspace::ClassType));
+      MetaspaceUtils::committed_bytes(Metaspace::ClassType),
+      MetaspaceUtils::used_bytes(Metaspace::ClassType),
+      MetaspaceUtils::reserved_bytes(Metaspace::ClassType));
 
   const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =
-    MetaspaceAux::chunk_free_list_summary(Metaspace::NonClassType);
+    MetaspaceUtils::chunk_free_list_summary(Metaspace::NonClassType);
   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
-    MetaspaceAux::chunk_free_list_summary(Metaspace::ClassType);
+    MetaspaceUtils::chunk_free_list_summary(Metaspace::ClassType);
 
   return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
                           ms_chunk_free_list_summary, class_chunk_free_list_summary);
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -558,7 +558,7 @@
 
   ClearedAllSoftRefs casr(do_clear_all_soft_refs, soft_ref_policy());
 
-  const size_t metadata_prev_used = MetaspaceAux::used_bytes();
+  const size_t metadata_prev_used = MetaspaceUtils::used_bytes();
 
   print_heap_before_gc();
 
@@ -644,7 +644,7 @@
     complete = complete || collected_old;
 
     print_heap_change(young_prev_used, old_prev_used);
-    MetaspaceAux::print_metaspace_change(metadata_prev_used);
+    MetaspaceUtils::print_metaspace_change(metadata_prev_used);
 
     // Adjust generation sizes.
     if (collected_old) {
@@ -655,7 +655,7 @@
     if (complete) {
       // Delete metaspaces for unloaded class loaders and clean up loader_data graph
       ClassLoaderDataGraph::purge();
-      MetaspaceAux::verify_metrics();
+      MetaspaceUtils::verify_metrics();
       // Resize the metaspace capacity after full collections
       MetaspaceGC::compute_new_size();
       update_full_collections_completed();
@@ -1258,7 +1258,7 @@
 void GenCollectedHeap::print_on(outputStream* st) const {
   _young_gen->print_on(st);
   _old_gen->print_on(st);
-  MetaspaceAux::print_on(st);
+  MetaspaceUtils::print_on(st);
 }
 
 void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
--- a/src/hotspot/share/memory/metaspace.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/memory/metaspace.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -1824,10 +1824,10 @@
 }
 
 #define assert_committed_below_limit()                        \
-  assert(MetaspaceAux::committed_bytes() <= MaxMetaspaceSize, \
+  assert(MetaspaceUtils::committed_bytes() <= MaxMetaspaceSize, \
          "Too much committed memory. Committed: " SIZE_FORMAT \
          " limit (MaxMetaspaceSize): " SIZE_FORMAT,           \
-         MetaspaceAux::committed_bytes(), MaxMetaspaceSize);
+          MetaspaceUtils::committed_bytes(), MaxMetaspaceSize);
 
 void VirtualSpaceList::inc_committed_words(size_t v) {
   assert_lock_strong(SpaceManager::expand_lock());
@@ -2424,13 +2424,13 @@
 
 void MetaspaceGC::post_initialize() {
   // Reset the high-water mark once the VM initialization is done.
-  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
+  _capacity_until_GC = MAX2(MetaspaceUtils::committed_bytes(), MetaspaceSize);
 }
 
 bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
   // Check if the compressed class space is full.
   if (is_class && Metaspace::using_class_space()) {
-    size_t class_committed = MetaspaceAux::committed_bytes(Metaspace::ClassType);
+    size_t class_committed = MetaspaceUtils::committed_bytes(Metaspace::ClassType);
     if (class_committed + word_size * BytesPerWord > CompressedClassSpaceSize) {
       log_trace(gc, metaspace, freelist)("Cannot expand %s metaspace by " SIZE_FORMAT " words (CompressedClassSpaceSize = " SIZE_FORMAT " words)",
                 (is_class ? "class" : "non-class"), word_size, CompressedClassSpaceSize / sizeof(MetaWord));
@@ -2439,7 +2439,7 @@
   }
 
   // Check if the user has imposed a limit on the metaspace memory.
-  size_t committed_bytes = MetaspaceAux::committed_bytes();
+  size_t committed_bytes = MetaspaceUtils::committed_bytes();
   if (committed_bytes + word_size * BytesPerWord > MaxMetaspaceSize) {
     log_trace(gc, metaspace, freelist)("Cannot expand %s metaspace by " SIZE_FORMAT " words (MaxMetaspaceSize = " SIZE_FORMAT " words)",
               (is_class ? "class" : "non-class"), word_size, MaxMetaspaceSize / sizeof(MetaWord));
@@ -2450,7 +2450,7 @@
 }
 
 size_t MetaspaceGC::allowed_expansion() {
-  size_t committed_bytes = MetaspaceAux::committed_bytes();
+  size_t committed_bytes = MetaspaceUtils::committed_bytes();
   size_t capacity_until_gc = capacity_until_GC();
 
   assert(capacity_until_gc >= committed_bytes,
@@ -2480,7 +2480,7 @@
   // Including the chunk free lists in the definition of "in use" is therefore
   // necessary. Not including the chunk free lists can cause capacity_until_GC to
   // shrink below committed_bytes() and this has caused serious bugs in the past.
-  const size_t used_after_gc = MetaspaceAux::committed_bytes();
+  const size_t used_after_gc = MetaspaceUtils::committed_bytes();
   const size_t capacity_until_GC = MetaspaceGC::capacity_until_GC();
 
   const double minimum_free_percentage = MinMetaspaceFreeRatio / 100.0;
@@ -3491,27 +3491,27 @@
   _allocated_chunks_words = _allocated_chunks_words + words;
   _allocated_chunks_count++;
   // Global total of capacity in allocated Metachunks
-  MetaspaceAux::inc_capacity(mdtype(), words);
+  MetaspaceUtils::inc_capacity(mdtype(), words);
   // Global total of allocated Metablocks.
   // used_words_slow() includes the overhead in each
   // Metachunk so include it in the used when the
   // Metachunk is first added (so only added once per
   // Metachunk).
-  MetaspaceAux::inc_used(mdtype(), Metachunk::overhead());
+  MetaspaceUtils::inc_used(mdtype(), Metachunk::overhead());
 }
 
 void SpaceManager::inc_used_metrics(size_t words) {
   // Add to the per SpaceManager total
   Atomic::add(words, &_allocated_blocks_words);
   // Add to the global total
-  MetaspaceAux::inc_used(mdtype(), words);
+  MetaspaceUtils::inc_used(mdtype(), words);
 }
 
 void SpaceManager::dec_total_from_size_metrics() {
-  MetaspaceAux::dec_capacity(mdtype(), allocated_chunks_words());
-  MetaspaceAux::dec_used(mdtype(), allocated_blocks_words());
+  MetaspaceUtils::dec_capacity(mdtype(), allocated_chunks_words());
+  MetaspaceUtils::dec_used(mdtype(), allocated_blocks_words());
   // Also deduct the overhead per Metachunk
-  MetaspaceAux::dec_used(mdtype(), allocated_chunks_count() * Metachunk::overhead());
+  MetaspaceUtils::dec_used(mdtype(), allocated_chunks_count() * Metachunk::overhead());
 }
 
 void SpaceManager::initialize() {
@@ -3784,22 +3784,22 @@
                 " waste " SIZE_FORMAT, curr_total, used, free, capacity, waste);
 }
 
-// MetaspaceAux
-
-
-size_t MetaspaceAux::_capacity_words[] = {0, 0};
-volatile size_t MetaspaceAux::_used_words[] = {0, 0};
-
-size_t MetaspaceAux::free_bytes(Metaspace::MetadataType mdtype) {
+// MetaspaceUtils
+
+
+size_t MetaspaceUtils::_capacity_words[] = {0, 0};
+volatile size_t MetaspaceUtils::_used_words[] = {0, 0};
+
+size_t MetaspaceUtils::free_bytes(Metaspace::MetadataType mdtype) {
   VirtualSpaceList* list = Metaspace::get_space_list(mdtype);
   return list == NULL ? 0 : list->free_bytes();
 }
 
-size_t MetaspaceAux::free_bytes() {
+size_t MetaspaceUtils::free_bytes() {
   return free_bytes(Metaspace::ClassType) + free_bytes(Metaspace::NonClassType);
 }
 
-void MetaspaceAux::dec_capacity(Metaspace::MetadataType mdtype, size_t words) {
+void MetaspaceUtils::dec_capacity(Metaspace::MetadataType mdtype, size_t words) {
   assert_lock_strong(SpaceManager::expand_lock());
   assert(words <= capacity_words(mdtype),
          "About to decrement below 0: words " SIZE_FORMAT
@@ -3808,13 +3808,13 @@
   _capacity_words[mdtype] -= words;
 }
 
-void MetaspaceAux::inc_capacity(Metaspace::MetadataType mdtype, size_t words) {
+void MetaspaceUtils::inc_capacity(Metaspace::MetadataType mdtype, size_t words) {
   assert_lock_strong(SpaceManager::expand_lock());
   // Needs to be atomic
   _capacity_words[mdtype] += words;
 }
 
-void MetaspaceAux::dec_used(Metaspace::MetadataType mdtype, size_t words) {
+void MetaspaceUtils::dec_used(Metaspace::MetadataType mdtype, size_t words) {
   assert(words <= used_words(mdtype),
          "About to decrement below 0: words " SIZE_FORMAT
          " is greater than _used_words[%u] " SIZE_FORMAT,
@@ -3826,7 +3826,7 @@
   Atomic::sub(words, &_used_words[mdtype]);
 }
 
-void MetaspaceAux::inc_used(Metaspace::MetadataType mdtype, size_t words) {
+void MetaspaceUtils::inc_used(Metaspace::MetadataType mdtype, size_t words) {
   // _used_words tracks allocations for
   // each piece of metadata.  Those allocations are
   // generally done concurrently by different application
@@ -3834,7 +3834,7 @@
   Atomic::add(words, &_used_words[mdtype]);
 }
 
-size_t MetaspaceAux::used_bytes_slow(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::used_bytes_slow(Metaspace::MetadataType mdtype) {
   size_t used = 0;
   ClassLoaderDataGraphMetaspaceIterator iter;
   while (iter.repeat()) {
@@ -3847,7 +3847,7 @@
   return used * BytesPerWord;
 }
 
-size_t MetaspaceAux::free_bytes_slow(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::free_bytes_slow(Metaspace::MetadataType mdtype) {
   size_t free = 0;
   ClassLoaderDataGraphMetaspaceIterator iter;
   while (iter.repeat()) {
@@ -3859,7 +3859,7 @@
   return free * BytesPerWord;
 }
 
-size_t MetaspaceAux::capacity_bytes_slow(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::capacity_bytes_slow(Metaspace::MetadataType mdtype) {
   if ((mdtype == Metaspace::ClassType) && !Metaspace::using_class_space()) {
     return 0;
   }
@@ -3876,7 +3876,7 @@
   return capacity * BytesPerWord;
 }
 
-size_t MetaspaceAux::capacity_bytes_slow() {
+size_t MetaspaceUtils::capacity_bytes_slow() {
 #ifdef PRODUCT
   // Use capacity_bytes() in PRODUCT instead of this function.
   guarantee(false, "Should not call capacity_bytes_slow() in the PRODUCT");
@@ -3893,19 +3893,19 @@
   return class_capacity + non_class_capacity;
 }
 
-size_t MetaspaceAux::reserved_bytes(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::reserved_bytes(Metaspace::MetadataType mdtype) {
   VirtualSpaceList* list = Metaspace::get_space_list(mdtype);
   return list == NULL ? 0 : list->reserved_bytes();
 }
 
-size_t MetaspaceAux::committed_bytes(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::committed_bytes(Metaspace::MetadataType mdtype) {
   VirtualSpaceList* list = Metaspace::get_space_list(mdtype);
   return list == NULL ? 0 : list->committed_bytes();
 }
 
-size_t MetaspaceAux::min_chunk_size_words() { return Metaspace::first_chunk_word_size(); }
-
-size_t MetaspaceAux::free_chunks_total_words(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::min_chunk_size_words() { return Metaspace::first_chunk_word_size(); }
+
+size_t MetaspaceUtils::free_chunks_total_words(Metaspace::MetadataType mdtype) {
   ChunkManager* chunk_manager = Metaspace::get_chunk_manager(mdtype);
   if (chunk_manager == NULL) {
     return 0;
@@ -3914,24 +3914,24 @@
   return chunk_manager->free_chunks_total_words();
 }
 
-size_t MetaspaceAux::free_chunks_total_bytes(Metaspace::MetadataType mdtype) {
+size_t MetaspaceUtils::free_chunks_total_bytes(Metaspace::MetadataType mdtype) {
   return free_chunks_total_words(mdtype) * BytesPerWord;
 }
 
-size_t MetaspaceAux::free_chunks_total_words() {
+size_t MetaspaceUtils::free_chunks_total_words() {
   return free_chunks_total_words(Metaspace::ClassType) +
          free_chunks_total_words(Metaspace::NonClassType);
 }
 
-size_t MetaspaceAux::free_chunks_total_bytes() {
+size_t MetaspaceUtils::free_chunks_total_bytes() {
   return free_chunks_total_words() * BytesPerWord;
 }
 
-bool MetaspaceAux::has_chunk_free_list(Metaspace::MetadataType mdtype) {
+bool MetaspaceUtils::has_chunk_free_list(Metaspace::MetadataType mdtype) {
   return Metaspace::get_chunk_manager(mdtype) != NULL;
 }
 
-MetaspaceChunkFreeListSummary MetaspaceAux::chunk_free_list_summary(Metaspace::MetadataType mdtype) {
+MetaspaceChunkFreeListSummary MetaspaceUtils::chunk_free_list_summary(Metaspace::MetadataType mdtype) {
   if (!has_chunk_free_list(mdtype)) {
     return MetaspaceChunkFreeListSummary();
   }
@@ -3940,12 +3940,12 @@
   return cm->chunk_free_list_summary();
 }
 
-void MetaspaceAux::print_metaspace_change(size_t prev_metadata_used) {
+void MetaspaceUtils::print_metaspace_change(size_t prev_metadata_used) {
   log_info(gc, metaspace)("Metaspace: "  SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
                           prev_metadata_used/K, used_bytes()/K, reserved_bytes()/K);
 }
 
-void MetaspaceAux::print_on(outputStream* out) {
+void MetaspaceUtils::print_on(outputStream* out) {
   Metaspace::MetadataType nct = Metaspace::NonClassType;
 
   out->print_cr(" Metaspace       "
@@ -3974,7 +3974,7 @@
 
 // Print information for class space and data space separately.
 // This is almost the same as above.
-void MetaspaceAux::print_on(outputStream* out, Metaspace::MetadataType mdtype) {
+void MetaspaceUtils::print_on(outputStream* out, Metaspace::MetadataType mdtype) {
   size_t free_chunks_capacity_bytes = free_chunks_total_bytes(mdtype);
   size_t capacity_bytes = capacity_bytes_slow(mdtype);
   size_t used_bytes = used_bytes_slow(mdtype);
@@ -3995,7 +3995,7 @@
 }
 
 // Print total fragmentation for class metaspaces
-void MetaspaceAux::print_class_waste(outputStream* out) {
+void MetaspaceUtils::print_class_waste(outputStream* out) {
   assert(Metaspace::using_class_space(), "class metaspace not used");
   size_t cls_specialized_waste = 0, cls_small_waste = 0, cls_medium_waste = 0;
   size_t cls_specialized_count = 0, cls_small_count = 0, cls_medium_count = 0, cls_humongous_count = 0;
@@ -4022,7 +4022,7 @@
 }
 
 // Print total fragmentation for data and class metaspaces separately
-void MetaspaceAux::print_waste(outputStream* out) {
+void MetaspaceUtils::print_waste(outputStream* out) {
   size_t specialized_waste = 0, small_waste = 0, medium_waste = 0;
   size_t specialized_count = 0, small_count = 0, medium_count = 0, humongous_count = 0;
 
@@ -4215,7 +4215,7 @@
   }
 }
 
-void MetaspaceAux::print_metadata_for_nmt(outputStream* out, size_t scale) {
+void MetaspaceUtils::print_metadata_for_nmt(outputStream* out, size_t scale) {
   const char* unit = scale_unit(scale);
   out->print_cr("Metaspaces:");
   out->print_cr("  Metadata space: reserved=" SIZE_FORMAT_W(10) "%s committed=" SIZE_FORMAT_W(10) "%s",
@@ -4240,7 +4240,7 @@
 
 
 // Dump global metaspace things from the end of ClassLoaderDataGraph
-void MetaspaceAux::dump(outputStream* out) {
+void MetaspaceUtils::dump(outputStream* out) {
   out->print_cr("All Metaspace:");
   out->print("data space: "); print_on(out, Metaspace::NonClassType);
   out->print("class space: "); print_on(out, Metaspace::ClassType);
@@ -4248,7 +4248,7 @@
 }
 
 // Prints an ASCII representation of the given space.
-void MetaspaceAux::print_metaspace_map(outputStream* out, Metaspace::MetadataType mdtype) {
+void MetaspaceUtils::print_metaspace_map(outputStream* out, Metaspace::MetadataType mdtype) {
   MutexLockerEx cl(SpaceManager::expand_lock(), Mutex::_no_safepoint_check_flag);
   const bool for_class = mdtype == Metaspace::ClassType ? true : false;
   VirtualSpaceList* const vsl = for_class ? Metaspace::class_space_list() : Metaspace::space_list();
@@ -4272,14 +4272,14 @@
   }
 }
 
-void MetaspaceAux::verify_free_chunks() {
+void MetaspaceUtils::verify_free_chunks() {
   Metaspace::chunk_manager_metadata()->verify();
   if (Metaspace::using_class_space()) {
     Metaspace::chunk_manager_class()->verify();
   }
 }
 
-void MetaspaceAux::verify_capacity() {
+void MetaspaceUtils::verify_capacity() {
 #ifdef ASSERT
   size_t running_sum_capacity_bytes = capacity_bytes();
   // For purposes of the running sum of capacity, verify against capacity
@@ -4300,7 +4300,7 @@
 #endif
 }
 
-void MetaspaceAux::verify_used() {
+void MetaspaceUtils::verify_used() {
 #ifdef ASSERT
   size_t running_sum_used_bytes = used_bytes();
   // For purposes of the running sum of used, verify against used
@@ -4321,7 +4321,7 @@
 #endif
 }
 
-void MetaspaceAux::verify_metrics() {
+void MetaspaceUtils::verify_metrics() {
   verify_capacity();
   verify_used();
 }
@@ -4903,8 +4903,8 @@
       }
     }
     LogStream ls(log.info());
-    MetaspaceAux::dump(&ls);
-    MetaspaceAux::print_metaspace_map(&ls, mdtype);
+    MetaspaceUtils::dump(&ls);
+    MetaspaceUtils::print_metaspace_map(&ls, mdtype);
     ChunkManager::print_all_chunkmanagers(&ls);
   }
 
@@ -4912,7 +4912,7 @@
   if (is_class_space_allocation(mdtype)) {
     Metaspace* metaspace = loader_data->metaspace_non_null();
     out_of_compressed_class_space =
-      MetaspaceAux::committed_bytes(Metaspace::ClassType) +
+      MetaspaceUtils::committed_bytes(Metaspace::ClassType) +
       (metaspace->class_chunk_size(word_size) * BytesPerWord) >
       CompressedClassSpaceSize;
   }
@@ -5026,41 +5026,41 @@
 
 #ifndef PRODUCT
 
-class TestMetaspaceAuxTest : AllStatic {
+class TestMetaspaceUtilsTest : AllStatic {
  public:
   static void test_reserved() {
-    size_t reserved = MetaspaceAux::reserved_bytes();
+    size_t reserved = MetaspaceUtils::reserved_bytes();
 
     assert(reserved > 0, "assert");
 
-    size_t committed  = MetaspaceAux::committed_bytes();
+    size_t committed  = MetaspaceUtils::committed_bytes();
     assert(committed <= reserved, "assert");
 
-    size_t reserved_metadata = MetaspaceAux::reserved_bytes(Metaspace::NonClassType);
+    size_t reserved_metadata = MetaspaceUtils::reserved_bytes(Metaspace::NonClassType);
     assert(reserved_metadata > 0, "assert");
     assert(reserved_metadata <= reserved, "assert");
 
     if (UseCompressedClassPointers) {
-      size_t reserved_class    = MetaspaceAux::reserved_bytes(Metaspace::ClassType);
+      size_t reserved_class    = MetaspaceUtils::reserved_bytes(Metaspace::ClassType);
       assert(reserved_class > 0, "assert");
       assert(reserved_class < reserved, "assert");
     }
   }
 
   static void test_committed() {
-    size_t committed = MetaspaceAux::committed_bytes();
+    size_t committed = MetaspaceUtils::committed_bytes();
 
     assert(committed > 0, "assert");
 
-    size_t reserved  = MetaspaceAux::reserved_bytes();
+    size_t reserved  = MetaspaceUtils::reserved_bytes();
     assert(committed <= reserved, "assert");
 
-    size_t committed_metadata = MetaspaceAux::committed_bytes(Metaspace::NonClassType);
+    size_t committed_metadata = MetaspaceUtils::committed_bytes(Metaspace::NonClassType);
     assert(committed_metadata > 0, "assert");
     assert(committed_metadata <= committed, "assert");
 
     if (UseCompressedClassPointers) {
-      size_t committed_class    = MetaspaceAux::committed_bytes(Metaspace::ClassType);
+      size_t committed_class    = MetaspaceUtils::committed_bytes(Metaspace::ClassType);
       assert(committed_class > 0, "assert");
       assert(committed_class < committed, "assert");
     }
@@ -5083,8 +5083,8 @@
   }
 };
 
-void TestMetaspaceAux_test() {
-  TestMetaspaceAuxTest::test();
+void TestMetaspaceUtils_test() {
+  TestMetaspaceUtilsTest::test();
 }
 
 class TestVirtualSpaceNodeTest {
--- a/src/hotspot/share/memory/metaspace.hpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/memory/metaspace.hpp	Sun Mar 11 07:11:03 2018 +0100
@@ -85,7 +85,7 @@
   friend class SpaceManager;
   friend class VM_CollectForMetadataAllocation;
   friend class MetaspaceGC;
-  friend class MetaspaceAux;
+  friend class MetaspaceUtils;
   friend class MetaspaceShared;
   friend class CollectedHeap;
   friend class PrintCLDMetaspaceInfoClosure;
@@ -265,7 +265,7 @@
 
 };
 
-class MetaspaceAux : AllStatic {
+class MetaspaceUtils : AllStatic {
   static size_t free_chunks_total_words(Metaspace::MetadataType mdtype);
 
   // These methods iterate over the classloader data graph
--- a/src/hotspot/share/memory/metaspaceCounters.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/memory/metaspaceCounters.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -66,15 +66,15 @@
 MetaspacePerfCounters* MetaspaceCounters::_perf_counters = NULL;
 
 size_t MetaspaceCounters::used() {
-  return MetaspaceAux::used_bytes();
+  return MetaspaceUtils::used_bytes();
 }
 
 size_t MetaspaceCounters::capacity() {
-  return MetaspaceAux::committed_bytes();
+  return MetaspaceUtils::committed_bytes();
 }
 
 size_t MetaspaceCounters::max_capacity() {
-  return MetaspaceAux::reserved_bytes();
+  return MetaspaceUtils::reserved_bytes();
 }
 
 void MetaspaceCounters::initialize_performance_counters() {
@@ -98,15 +98,15 @@
 MetaspacePerfCounters* CompressedClassSpaceCounters::_perf_counters = NULL;
 
 size_t CompressedClassSpaceCounters::used() {
-  return MetaspaceAux::used_bytes(Metaspace::ClassType);
+  return MetaspaceUtils::used_bytes(Metaspace::ClassType);
 }
 
 size_t CompressedClassSpaceCounters::capacity() {
-  return MetaspaceAux::committed_bytes(Metaspace::ClassType);
+  return MetaspaceUtils::committed_bytes(Metaspace::ClassType);
 }
 
 size_t CompressedClassSpaceCounters::max_capacity() {
-  return MetaspaceAux::reserved_bytes(Metaspace::ClassType);
+  return MetaspaceUtils::reserved_bytes(Metaspace::ClassType);
 }
 
 void CompressedClassSpaceCounters::update_performance_counters() {
--- a/src/hotspot/share/memory/universe.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/memory/universe.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -1162,7 +1162,7 @@
     } else if (strcmp(token, "classloader_data_graph") == 0) {
       verify_flags |= Verify_ClassLoaderDataGraph;
     } else if (strcmp(token, "metaspace") == 0) {
-      verify_flags |= Verify_MetaspaceAux;
+      verify_flags |= Verify_MetaspaceUtils;
     } else if (strcmp(token, "jni_handles") == 0) {
       verify_flags |= Verify_JNIHandles;
     } else if (strcmp(token, "codecache_oops") == 0) {
@@ -1234,9 +1234,9 @@
     ClassLoaderDataGraph::verify();
   }
 #endif
-  if (should_verify_subset(Verify_MetaspaceAux)) {
-    log_debug(gc, verify)("MetaspaceAux");
-    MetaspaceAux::verify_free_chunks();
+  if (should_verify_subset(Verify_MetaspaceUtils)) {
+    log_debug(gc, verify)("MetaspaceUtils");
+    MetaspaceUtils::verify_free_chunks();
   }
   if (should_verify_subset(Verify_JNIHandles)) {
     log_debug(gc, verify)("JNIHandles");
--- a/src/hotspot/share/memory/universe.hpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/memory/universe.hpp	Sun Mar 11 07:11:03 2018 +0100
@@ -489,7 +489,7 @@
     Verify_CodeCache = 16,
     Verify_SystemDictionary = 32,
     Verify_ClassLoaderDataGraph = 64,
-    Verify_MetaspaceAux = 128,
+    Verify_MetaspaceUtils = 128,
     Verify_JNIHandles = 256,
     Verify_CodeCacheOops = 512,
     Verify_All = -1
--- a/src/hotspot/share/prims/whitebox.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/prims/whitebox.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -192,7 +192,7 @@
 void TestReservedSpace_test();
 void TestReserveMemorySpecial_test();
 void TestVirtualSpace_test();
-void TestMetaspaceAux_test();
+void TestMetaspaceUtils_test();
 #endif
 
 WB_ENTRY(void, WB_RunMemoryUnitTests(JNIEnv* env, jobject o))
@@ -200,7 +200,7 @@
   TestReservedSpace_test();
   TestReserveMemorySpecial_test();
   TestVirtualSpace_test();
-  TestMetaspaceAux_test();
+  TestMetaspaceUtils_test();
 #endif
 WB_END
 
--- a/src/hotspot/share/runtime/vm_operations.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/runtime/vm_operations.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -234,7 +234,7 @@
 }
 
 void VM_PrintMetadata::doit() {
-  MetaspaceAux::print_metadata_for_nmt(_out, _scale);
+  MetaspaceUtils::print_metadata_for_nmt(_out, _scale);
 }
 
 VM_FindDeadlocks::~VM_FindDeadlocks() {
--- a/src/hotspot/share/services/memReporter.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/services/memReporter.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -197,18 +197,18 @@
 
   outputStream* out = output();
   const char* scale = current_scale();
-  size_t committed   = MetaspaceAux::committed_bytes(type);
-  size_t used = MetaspaceAux::used_bytes(type);
-  size_t free = (MetaspaceAux::capacity_bytes(type) - used)
-              + MetaspaceAux::free_chunks_total_bytes(type)
-              + MetaspaceAux::free_bytes(type);
+  size_t committed   = MetaspaceUtils::committed_bytes(type);
+  size_t used = MetaspaceUtils::used_bytes(type);
+  size_t free = (MetaspaceUtils::capacity_bytes(type) - used)
+              + MetaspaceUtils::free_chunks_total_bytes(type)
+              + MetaspaceUtils::free_bytes(type);
 
   assert(committed >= used + free, "Sanity");
   size_t waste = committed - (used + free);
 
   out->print_cr("%27s (  %s)", " ", name);
   out->print("%27s (    ", " ");
-  print_total(MetaspaceAux::reserved_bytes(type), committed);
+  print_total(MetaspaceUtils::reserved_bytes(type), committed);
   out->print_cr(")");
   out->print_cr("%27s (    used=" SIZE_FORMAT "%s)", " ", amount_in_current_scale(used), scale);
   out->print_cr("%27s (    free=" SIZE_FORMAT "%s)", " ", amount_in_current_scale(free), scale);
--- a/src/hotspot/share/services/memoryPool.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/services/memoryPool.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -194,12 +194,12 @@
   MemoryPool("Metaspace", NonHeap, 0, calculate_max_size(), true, false) { }
 
 MemoryUsage MetaspacePool::get_memory_usage() {
-  size_t committed = MetaspaceAux::committed_bytes();
+  size_t committed = MetaspaceUtils::committed_bytes();
   return MemoryUsage(initial_size(), used_in_bytes(), committed, max_size());
 }
 
 size_t MetaspacePool::used_in_bytes() {
-  return MetaspaceAux::used_bytes();
+  return MetaspaceUtils::used_bytes();
 }
 
 size_t MetaspacePool::calculate_max_size() const {
@@ -211,10 +211,10 @@
   MemoryPool("Compressed Class Space", NonHeap, 0, CompressedClassSpaceSize, true, false) { }
 
 size_t CompressedKlassSpacePool::used_in_bytes() {
-  return MetaspaceAux::used_bytes(Metaspace::ClassType);
+  return MetaspaceUtils::used_bytes(Metaspace::ClassType);
 }
 
 MemoryUsage CompressedKlassSpacePool::get_memory_usage() {
-  size_t committed = MetaspaceAux::committed_bytes(Metaspace::ClassType);
+  size_t committed = MetaspaceUtils::committed_bytes(Metaspace::ClassType);
   return MemoryUsage(initial_size(), used_in_bytes(), committed, max_size());
 }
--- a/src/hotspot/share/services/virtualMemoryTracker.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/services/virtualMemoryTracker.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -510,13 +510,13 @@
 void MetaspaceSnapshot::snapshot(Metaspace::MetadataType type, MetaspaceSnapshot& mss) {
   assert_valid_metadata_type(type);
 
-  mss._reserved_in_bytes[type]   = MetaspaceAux::reserved_bytes(type);
-  mss._committed_in_bytes[type]  = MetaspaceAux::committed_bytes(type);
-  mss._used_in_bytes[type]       = MetaspaceAux::used_bytes(type);
+  mss._reserved_in_bytes[type]   = MetaspaceUtils::reserved_bytes(type);
+  mss._committed_in_bytes[type]  = MetaspaceUtils::committed_bytes(type);
+  mss._used_in_bytes[type]       = MetaspaceUtils::used_bytes(type);
 
-  size_t free_in_bytes = (MetaspaceAux::capacity_bytes(type) - MetaspaceAux::used_bytes(type))
-                       + MetaspaceAux::free_chunks_total_bytes(type)
-                       + MetaspaceAux::free_bytes(type);
+  size_t free_in_bytes = (MetaspaceUtils::capacity_bytes(type) - MetaspaceUtils::used_bytes(type))
+                       + MetaspaceUtils::free_chunks_total_bytes(type)
+                       + MetaspaceUtils::free_bytes(type);
   mss._free_in_bytes[type] = free_in_bytes;
 }
 
--- a/src/hotspot/share/utilities/internalVMTests.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/src/hotspot/share/utilities/internalVMTests.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -44,7 +44,7 @@
   run_unit_test(TestReservedSpace_test);
   run_unit_test(TestReserveMemorySpecial_test);
   run_unit_test(TestVirtualSpace_test);
-  run_unit_test(TestMetaspaceAux_test);
+  run_unit_test(TestMetaspaceUtils_test);
   run_unit_test(GCTimer_test);
   run_unit_test(ObjectMonitor_test);
   run_unit_test(DirectivesParser_test);
--- a/test/hotspot/gtest/memory/test_metaspace_allocation.cpp	Wed Mar 14 10:38:02 2018 +0100
+++ b/test/hotspot/gtest/memory/test_metaspace_allocation.cpp	Sun Mar 11 07:11:03 2018 +0100
@@ -225,7 +225,7 @@
     }
 #ifdef DEBUG_VERBOSE
     tty->print_cr("Test finished. ");
-    MetaspaceAux::print_metaspace_map(tty, mdType);
+    MetaspaceUtils::print_metaspace_map(tty, mdType);
     print_chunkmanager_statistics(tty, mdType);
 #endif
   }
--- a/test/hotspot/jtreg/gc/TestVerifySubSet.java	Wed Mar 14 10:38:02 2018 +0100
+++ b/test/hotspot/jtreg/gc/TestVerifySubSet.java	Sun Mar 11 07:11:03 2018 +0100
@@ -69,7 +69,7 @@
         output.shouldContain("Heap");
         output.shouldContain("Threads");
         output.shouldContain("CodeCache");
-        output.shouldContain("MetaspaceAux");
+        output.shouldContain("MetaspaceUtils");
         output.shouldNotContain("SymbolTable");
         output.shouldNotContain("StringTable");
         output.shouldNotContain("SystemDictionary");
@@ -80,7 +80,7 @@
         output.shouldContain("memory sub-system is unknown, please correct it");
         output.shouldNotContain("Threads");
         output.shouldNotContain("CodeCache");
-        output.shouldNotContain("MetaspaceAux");
+        output.shouldNotContain("MetaspaceUtils");
         output.shouldHaveExitValue(1);
     }
 }