Mercurial > hg > truffle
comparison src/share/vm/memory/metaspace.cpp @ 11039:71963b3f802a
8013590: NPG: Add a memory pool MXBean for Metaspace
Reviewed-by: jmasa, mgerdin
author | ehelin |
---|---|
date | Wed, 26 Jun 2013 16:58:37 +0200 |
parents | df7e1c0e3dc1 |
children | cedf20e2a655 |
comparison
equal
deleted
inserted
replaced
11038:f99cd6e20ab1 | 11039:71963b3f802a |
---|---|
1554 } | 1554 } |
1555 #endif | 1555 #endif |
1556 | 1556 |
1557 // ChunkManager methods | 1557 // ChunkManager methods |
1558 | 1558 |
1559 // Verification of _free_chunks_total and _free_chunks_count does not | |
1560 // work with the CMS collector because its use of additional locks | |
1561 // complicate the mutex deadlock detection but it can still be useful | |
1562 // for detecting errors in the chunk accounting with other collectors. | |
1563 | |
1564 size_t ChunkManager::free_chunks_total() { | 1559 size_t ChunkManager::free_chunks_total() { |
1565 #ifdef ASSERT | |
1566 if (!UseConcMarkSweepGC && !SpaceManager::expand_lock()->is_locked()) { | |
1567 MutexLockerEx cl(SpaceManager::expand_lock(), | |
1568 Mutex::_no_safepoint_check_flag); | |
1569 slow_locked_verify_free_chunks_total(); | |
1570 } | |
1571 #endif | |
1572 return _free_chunks_total; | 1560 return _free_chunks_total; |
1573 } | 1561 } |
1574 | 1562 |
1575 size_t ChunkManager::free_chunks_total_in_bytes() { | 1563 size_t ChunkManager::free_chunks_total_in_bytes() { |
1576 return free_chunks_total() * BytesPerWord; | 1564 return free_chunks_total() * BytesPerWord; |