mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8317761: Combine two versions of print_statistics() in java.cpp
Reviewed-by: kvn, vlivanov
This commit is contained in:
parent
3aa4cba175
commit
84b7cc15c2
2 changed files with 9 additions and 51 deletions
|
@ -225,6 +225,13 @@ void print_bytecode_count() {
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void print_method_invocation_histogram() {}
|
||||
void print_bytecode_count() {}
|
||||
|
||||
#endif // PRODUCT
|
||||
|
||||
|
||||
// General statistics printing (profiling ...)
|
||||
void print_statistics() {
|
||||
|
@ -337,56 +344,6 @@ void print_statistics() {
|
|||
ThreadsSMRSupport::log_statistics();
|
||||
}
|
||||
|
||||
#else // PRODUCT MODE STATISTICS
|
||||
|
||||
void print_statistics() {
|
||||
|
||||
if (PrintMethodData) {
|
||||
print_method_profiling_data();
|
||||
}
|
||||
|
||||
if (CITime) {
|
||||
CompileBroker::print_times();
|
||||
}
|
||||
|
||||
#ifdef COMPILER2_OR_JVMCI
|
||||
if ((LogVMOutput || LogCompilation) && UseCompiler) {
|
||||
// Only print the statistics to the log file
|
||||
FlagSetting fs(DisplayVMOutput, false);
|
||||
Deoptimization::print_statistics();
|
||||
}
|
||||
#endif /* COMPILER2 || INCLUDE_JVMCI */
|
||||
|
||||
if (PrintCodeCache) {
|
||||
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
CodeCache::print();
|
||||
}
|
||||
|
||||
// CodeHeap State Analytics.
|
||||
if (PrintCodeHeapAnalytics) {
|
||||
CompileBroker::print_heapinfo(nullptr, "all", 4096); // details
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
if (PrintPreciseRTMLockingStatistics) {
|
||||
OptoRuntime::print_named_counters();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Native memory tracking data
|
||||
if (PrintNMTStatistics) {
|
||||
MemTracker::final_report(tty);
|
||||
}
|
||||
|
||||
if (PrintMetaspaceStatisticsAtExit) {
|
||||
MetaspaceUtils::print_basic_report(tty, 0);
|
||||
}
|
||||
|
||||
ThreadsSMRSupport::log_statistics();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Note: before_exit() can be executed only once, if more than one threads
|
||||
// are trying to shutdown the VM at the same time, only one thread
|
||||
// can run before_exit() and all other threads must wait.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue