mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
7188594: Print statistic collected by NMT with VM flag
Print out statistics of collected NMT data if it is on at VM exits Reviewed-by: kvn, coleenp, twisti
This commit is contained in:
parent
afd497eecc
commit
fb2076c572
4 changed files with 35 additions and 2 deletions
|
@ -56,6 +56,8 @@
|
|||
#include "runtime/task.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vm_operations.hpp"
|
||||
#include "services/memReporter.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "trace/tracing.hpp"
|
||||
#include "trace/traceEventTypes.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
|
@ -359,6 +361,15 @@ void print_statistics() {
|
|||
}
|
||||
#endif // COMPILER2
|
||||
#endif // ENABLE_ZAP_DEAD_LOCALS
|
||||
// Native memory tracking data
|
||||
if (PrintNMTStatistics) {
|
||||
if (MemTracker::is_on()) {
|
||||
BaselineTTYOutputer outputer(tty);
|
||||
MemTracker::print_memory_usage(outputer, K, false);
|
||||
} else {
|
||||
tty->print_cr(MemTracker::reason());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else // PRODUCT MODE STATISTICS
|
||||
|
@ -376,6 +387,16 @@ void print_statistics() {
|
|||
if (PrintBiasedLockingStatistics) {
|
||||
BiasedLocking::print_counters();
|
||||
}
|
||||
|
||||
// Native memory tracking data
|
||||
if (PrintNMTStatistics) {
|
||||
if (MemTracker::is_on()) {
|
||||
BaselineTTYOutputer outputer(tty);
|
||||
MemTracker::print_memory_usage(outputer, K, false);
|
||||
} else {
|
||||
tty->print_cr(MemTracker::reason());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue