diff src/share/vm/runtime/java.cpp @ 17612:6aa49042b101

8025277: Add -XX: flag to print code cache sweeper statistics Summary: New diagnostic flag prints statistics about the code cache sweeper Reviewed-by: kvn Contributed-by: tobi.hartmann@gmail.com
author anoll
date Thu, 19 Dec 2013 14:08:02 +0100
parents 5ccbab1c69f3
children a3ba776d6ab6 606acabe7b5c
line wrap: on
line diff
--- a/src/share/vm/runtime/java.cpp	Thu Dec 19 06:09:16 2013 +0100
+++ b/src/share/vm/runtime/java.cpp	Thu Dec 19 14:08:02 2013 +0100
@@ -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 @@
 
 
 // General statistics printing (profiling ...)
-
 void print_statistics() {
-
 #ifdef ASSERT
 
   if (CountRuntimeCalls) {
@@ -315,6 +314,10 @@
     CodeCache::print();
   }
 
+  if (PrintMethodFlushingStatistics) {
+    NMethodSweeper::print();
+  }
+
   if (PrintCodeCache2) {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     CodeCache::print_internals();
@@ -382,6 +385,10 @@
     CodeCache::print();
   }
 
+  if (PrintMethodFlushingStatistics) {
+    NMethodSweeper::print();
+  }
+
 #ifdef COMPILER2
   if (PrintPreciseBiasedLockingStatistics) {
     OptoRuntime::print_named_counters();