8025277: Add -XX: flag to print code cache sweeper statistics

New diagnostic flag prints statistics about the code cache sweeper

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2013-12-19 14:08:02 +01:00 committed by Albert Noll
parent 0679f774af
commit 63f7ba0045
4 changed files with 66 additions and 31 deletions

View file

@ -52,6 +52,7 @@
#include "runtime/memprofiler.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/sweeper.hpp"
#include "runtime/task.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
@ -217,9 +218,7 @@ AllocStats alloc_stats;
// General statistics printing (profiling ...)
void print_statistics() {
#ifdef ASSERT
if (CountRuntimeCalls) {
@ -315,6 +314,10 @@ void print_statistics() {
CodeCache::print();
}
if (PrintMethodFlushingStatistics) {
NMethodSweeper::print();
}
if (PrintCodeCache2) {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
CodeCache::print_internals();
@ -382,6 +385,10 @@ void print_statistics() {
CodeCache::print();
}
if (PrintMethodFlushingStatistics) {
NMethodSweeper::print();
}
#ifdef COMPILER2
if (PrintPreciseBiasedLockingStatistics) {
OptoRuntime::print_named_counters();