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:
Zhengyu Gu 2012-09-17 16:37:26 -04:00
parent afd497eecc
commit fb2076c572
4 changed files with 35 additions and 2 deletions

View file

@ -85,7 +85,7 @@ class MemTracker : AllStatic {
NMT_shutdown // shutdown
};
public:
// native memory tracking level
enum NMTLevel {
NMT_off, // native memory tracking is off
@ -93,7 +93,6 @@ class MemTracker : AllStatic {
NMT_detail // track callsite also
};
public:
enum ShutdownReason {
NMT_shutdown_none, // no shutdown requested
NMT_shutdown_user, // user requested shutdown
@ -117,6 +116,10 @@ class MemTracker : AllStatic {
_state >= NMT_bootstrapping_single_thread);
}
static inline enum NMTLevel tracking_level() {
return _tracking_level;
}
// user readable reason for shutting down NMT
static const char* reason() {
switch(_reason) {