8013590: NPG: Add a memory pool MXBean for Metaspace

Reviewed-by: jmasa, mgerdin
This commit is contained in:
Erik Helin 2013-06-26 16:58:37 +02:00
parent ca3a1be3fe
commit 604a75ff30
10 changed files with 222 additions and 21 deletions

View file

@ -1556,19 +1556,7 @@ bool Metadebug::test_metadata_failure() {
// 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;
}