src/share/vm/memory/metaspace.cpp

Print this page
rev 4801 : 8013590: NPG: Add a memory pool MXBean for Metaspace

@@ -1554,23 +1554,11 @@
 }
 #endif
 
 // ChunkManager methods
 
-// Verification of _free_chunks_total and _free_chunks_count does not
-// work with the CMS collector because its use of additional locks
-// complicate the mutex deadlock detection but it can still be useful
-// for detecting errors in the chunk accounting with other collectors.
-
 size_t ChunkManager::free_chunks_total() {
-#ifdef ASSERT
-  if (!UseConcMarkSweepGC && !SpaceManager::expand_lock()->is_locked()) {
-    MutexLockerEx cl(SpaceManager::expand_lock(),
-                     Mutex::_no_safepoint_check_flag);
-    slow_locked_verify_free_chunks_total();
-  }
-#endif
   return _free_chunks_total;
 }
 
 size_t ChunkManager::free_chunks_total_in_bytes() {
   return free_chunks_total() * BytesPerWord;