src/hotspot/share/memory/metaspace.cpp
changeset 50038 3db7884546a1
parent 50020 9e82ca74f086
child 50066 bd3e4517dfa3
--- a/src/hotspot/share/memory/metaspace.cpp	Thu May 03 04:18:22 2018 -0700
+++ b/src/hotspot/share/memory/metaspace.cpp	Mon May 07 20:42:36 2018 +0200
@@ -245,7 +245,6 @@
       locked_verify_free_chunks_count();
     }
   }
-  void verify_free_chunks_count();
 
   // Given a pointer to a chunk, attempts to merge it with neighboring
   // free chunks to form a bigger chunk. Returns true if successful.
@@ -368,13 +367,10 @@
       locked_verify();
     }
   }
-  void verify_free_chunks_total();
 
   void locked_print_free_chunks(outputStream* st);
   void locked_print_sum_free_chunks(outputStream* st);
 
-  void print_on(outputStream* st) const;
-
   // Fill in current statistic values to the given statistics object.
   void collect_statistics(ChunkManagerStatistics* out) const;
 
@@ -1705,7 +1701,6 @@
       ls.print("VirtualSpaceNode::take_from_committed() not available " SIZE_FORMAT " words ", chunk_word_size);
       // Dump some information about the virtual space that is nearly full
       print_on(&ls);
-      ls.cr(); // ~LogStream does not autoflush.
     }
     return NULL;
   }
@@ -2221,7 +2216,6 @@
     VirtualSpaceNode* vsl = current_virtual_space();
     ResourceMark rm;
     vsl->print_on(&ls);
-    ls.cr(); // ~LogStream does not autoflush.
   }
 }
 
@@ -2710,12 +2704,6 @@
          sum_free_chunks());
 }
 
-void ChunkManager::verify_free_chunks_total() {
-  MutexLockerEx cl(MetaspaceExpand_lock,
-                     Mutex::_no_safepoint_check_flag);
-  locked_verify_free_chunks_total();
-}
-
 void ChunkManager::locked_verify_free_chunks_count() {
   assert_lock_strong(MetaspaceExpand_lock);
   assert(sum_free_chunks_count() == _free_chunks_count,
@@ -2724,14 +2712,6 @@
          sum_free_chunks_count());
 }
 
-void ChunkManager::verify_free_chunks_count() {
-#ifdef ASSERT
-  MutexLockerEx cl(MetaspaceExpand_lock,
-                     Mutex::_no_safepoint_check_flag);
-  locked_verify_free_chunks_count();
-#endif
-}
-
 void ChunkManager::verify() {
   MutexLockerEx cl(MetaspaceExpand_lock,
                      Mutex::_no_safepoint_check_flag);
@@ -3041,7 +3021,6 @@
              p2i(this), p2i(chunk), chunk->word_size(), list_count);
     ResourceMark rm;
     locked_print_free_chunks(&ls);
-    ls.cr(); // ~LogStream does not autoflush.
   }
 
   return chunk;
@@ -3132,10 +3111,6 @@
   }
 }
 
-void ChunkManager::print_on(outputStream* out) const {
-  _humongous_dictionary.report_statistics(out);
-}
-
 void ChunkManager::collect_statistics(ChunkManagerStatistics* out) const {
   MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
   for (ChunkIndex i = ZeroIndex; i < NumberOfInUseLists; i = next_chunk_index(i)) {
@@ -3220,7 +3195,6 @@
   }
 
   chunk_manager()->locked_print_free_chunks(st);
-  chunk_manager()->locked_print_sum_free_chunks(st);
 }
 
 size_t SpaceManager::calc_chunk_size(size_t word_size) {
@@ -3418,7 +3392,6 @@
     if (block_freelists() != NULL) {
       block_freelists()->print_on(&ls);
     }
-    ls.cr(); // ~LogStream does not autoflush.
   }
 
   // Add all the chunks in use by this space manager
@@ -3487,7 +3460,6 @@
     LogStream ls(log.trace());
     new_chunk->print_on(&ls);
     chunk_manager()->locked_print_free_chunks(&ls);
-    ls.cr(); // ~LogStream does not autoflush.
   }
 }
 
@@ -4441,7 +4413,6 @@
     ResourceMark rm;
     LogStream ls(lt);
     print_compressed_class_space(&ls, requested_addr);
-    ls.cr(); // ~LogStream does not autoflush.
   }
 }
 
@@ -4663,13 +4634,11 @@
       if (loader_data->metaspace_or_null() != NULL) {
         LogStream ls(log.debug());
         loader_data->print_value_on(&ls);
-        ls.cr(); // ~LogStream does not autoflush.
       }
     }
     LogStream ls(log.info());
     // In case of an OOM, log out a short but still useful report.
     MetaspaceUtils::print_basic_report(&ls, 0);
-    ls.cr(); // ~LogStream does not autoflush.
   }
 
   bool out_of_compressed_class_space = false;