1559 } |
1559 } |
1560 #endif |
1560 #endif |
1561 |
1561 |
1562 // ChunkManager methods |
1562 // ChunkManager methods |
1563 |
1563 |
1564 // Verification of _free_chunks_total and _free_chunks_count does not |
|
1565 // work with the CMS collector because its use of additional locks |
|
1566 // complicate the mutex deadlock detection but it can still be useful |
|
1567 // for detecting errors in the chunk accounting with other collectors. |
|
1568 |
|
1569 size_t ChunkManager::free_chunks_total() { |
1564 size_t ChunkManager::free_chunks_total() { |
1570 #ifdef ASSERT |
|
1571 if (!UseConcMarkSweepGC && !SpaceManager::expand_lock()->is_locked()) { |
|
1572 MutexLockerEx cl(SpaceManager::expand_lock(), |
|
1573 Mutex::_no_safepoint_check_flag); |
|
1574 slow_locked_verify_free_chunks_total(); |
|
1575 } |
|
1576 #endif |
|
1577 return _free_chunks_total; |
1565 return _free_chunks_total; |
1578 } |
1566 } |
1579 |
1567 |
1580 size_t ChunkManager::free_chunks_total_in_bytes() { |
1568 size_t ChunkManager::free_chunks_total_in_bytes() { |
1581 return free_chunks_total() * BytesPerWord; |
1569 return free_chunks_total() * BytesPerWord; |
2608 if (PrintGCDetails && Verbose) { |
2596 if (PrintGCDetails && Verbose) { |
2609 gclog_or_tty->print(" " SIZE_FORMAT |
2597 gclog_or_tty->print(" " SIZE_FORMAT |
2610 "->" SIZE_FORMAT |
2598 "->" SIZE_FORMAT |
2611 "(" SIZE_FORMAT ")", |
2599 "(" SIZE_FORMAT ")", |
2612 prev_metadata_used, |
2600 prev_metadata_used, |
2613 allocated_capacity_bytes(), |
2601 allocated_used_bytes(), |
2614 reserved_in_bytes()); |
2602 reserved_in_bytes()); |
2615 } else { |
2603 } else { |
2616 gclog_or_tty->print(" " SIZE_FORMAT "K" |
2604 gclog_or_tty->print(" " SIZE_FORMAT "K" |
2617 "->" SIZE_FORMAT "K" |
2605 "->" SIZE_FORMAT "K" |
2618 "(" SIZE_FORMAT "K)", |
2606 "(" SIZE_FORMAT "K)", |
2619 prev_metadata_used / K, |
2607 prev_metadata_used / K, |
2620 allocated_capacity_bytes() / K, |
2608 allocated_used_bytes() / K, |
2621 reserved_in_bytes()/ K); |
2609 reserved_in_bytes()/ K); |
2622 } |
2610 } |
2623 |
2611 |
2624 gclog_or_tty->print("]"); |
2612 gclog_or_tty->print("]"); |
2625 } |
2613 } |