comparison src/share/vm/runtime/java.cpp @ 14199:49a31fd8b93d

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
comparison
equal deleted inserted replaced
14198:b8b5791fa045 14199:49a31fd8b93d
50 #include "runtime/interfaceSupport.hpp" 50 #include "runtime/interfaceSupport.hpp"
51 #include "runtime/java.hpp" 51 #include "runtime/java.hpp"
52 #include "runtime/memprofiler.hpp" 52 #include "runtime/memprofiler.hpp"
53 #include "runtime/sharedRuntime.hpp" 53 #include "runtime/sharedRuntime.hpp"
54 #include "runtime/statSampler.hpp" 54 #include "runtime/statSampler.hpp"
55 #include "runtime/sweeper.hpp"
55 #include "runtime/task.hpp" 56 #include "runtime/task.hpp"
56 #include "runtime/thread.inline.hpp" 57 #include "runtime/thread.inline.hpp"
57 #include "runtime/timer.hpp" 58 #include "runtime/timer.hpp"
58 #include "runtime/vm_operations.hpp" 59 #include "runtime/vm_operations.hpp"
59 #include "services/memReporter.hpp" 60 #include "services/memReporter.hpp"
215 AllocStats alloc_stats; 216 AllocStats alloc_stats;
216 217
217 218
218 219
219 // General statistics printing (profiling ...) 220 // General statistics printing (profiling ...)
220
221 void print_statistics() { 221 void print_statistics() {
222
223 #ifdef ASSERT 222 #ifdef ASSERT
224 223
225 if (CountRuntimeCalls) { 224 if (CountRuntimeCalls) {
226 extern Histogram *RuntimeHistogram; 225 extern Histogram *RuntimeHistogram;
227 RuntimeHistogram->print(); 226 RuntimeHistogram->print();
313 if (PrintCodeCache) { 312 if (PrintCodeCache) {
314 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 313 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
315 CodeCache::print(); 314 CodeCache::print();
316 } 315 }
317 316
317 if (PrintMethodFlushingStatistics) {
318 NMethodSweeper::print();
319 }
320
318 if (PrintCodeCache2) { 321 if (PrintCodeCache2) {
319 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 322 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
320 CodeCache::print_internals(); 323 CodeCache::print_internals();
321 } 324 }
322 325
378 } 381 }
379 382
380 if (PrintCodeCache) { 383 if (PrintCodeCache) {
381 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 384 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
382 CodeCache::print(); 385 CodeCache::print();
386 }
387
388 if (PrintMethodFlushingStatistics) {
389 NMethodSweeper::print();
383 } 390 }
384 391
385 #ifdef COMPILER2 392 #ifdef COMPILER2
386 if (PrintPreciseBiasedLockingStatistics) { 393 if (PrintPreciseBiasedLockingStatistics) {
387 OptoRuntime::print_named_counters(); 394 OptoRuntime::print_named_counters();