equal
deleted
inserted
replaced
2672 |
2672 |
2673 // If we serve an "allFun" call, it is beneficial to hold the CodeCache_lock |
2673 // If we serve an "allFun" call, it is beneficial to hold the CodeCache_lock |
2674 // for the entire duration of aggregation and printing. That makes sure |
2674 // for the entire duration of aggregation and printing. That makes sure |
2675 // we see a consistent picture and do not run into issues caused by |
2675 // we see a consistent picture and do not run into issues caused by |
2676 // the CodeHeap being altered concurrently. |
2676 // the CodeHeap being altered concurrently. |
2677 Monitor* global_lock = allFun ? CodeCache_lock : NULL; |
2677 Mutex* global_lock = allFun ? CodeCache_lock : NULL; |
2678 Monitor* function_lock = allFun ? NULL : CodeCache_lock; |
2678 Mutex* function_lock = allFun ? NULL : CodeCache_lock; |
2679 ts_global.update(); // record starting point |
2679 ts_global.update(); // record starting point |
2680 MutexLocker mu2(global_lock, Mutex::_no_safepoint_check_flag); |
2680 MutexLocker mu2(global_lock, Mutex::_no_safepoint_check_flag); |
2681 if (global_lock != NULL) { |
2681 if (global_lock != NULL) { |
2682 out->print_cr("\n__ CodeCache (global) lock wait took %10.3f seconds _________\n", ts_global.seconds()); |
2682 out->print_cr("\n__ CodeCache (global) lock wait took %10.3f seconds _________\n", ts_global.seconds()); |
2683 ts_global.update(); // record starting point |
2683 ts_global.update(); // record starting point |