comparison src/share/vm/services/memTracker.hpp @ 6770:9a86ddfc6c8f

7188594: Print statistic collected by NMT with VM flag Summary: Print out statistics of collected NMT data if it is on at VM exits Reviewed-by: kvn, coleenp, twisti
author zgu
date Mon, 17 Sep 2012 16:37:26 -0400
parents 716e6ef4482a
children fb19af007ffc
comparison
equal deleted inserted replaced
6768:716e6ef4482a 6770:9a86ddfc6c8f
83 NMT_shutdown_pending, // shutdown pending 83 NMT_shutdown_pending, // shutdown pending
84 NMT_final_shutdown, // in final phase of shutdown 84 NMT_final_shutdown, // in final phase of shutdown
85 NMT_shutdown // shutdown 85 NMT_shutdown // shutdown
86 }; 86 };
87 87
88 88 public:
89 // native memory tracking level 89 // native memory tracking level
90 enum NMTLevel { 90 enum NMTLevel {
91 NMT_off, // native memory tracking is off 91 NMT_off, // native memory tracking is off
92 NMT_summary, // don't track callsite 92 NMT_summary, // don't track callsite
93 NMT_detail // track callsite also 93 NMT_detail // track callsite also
94 }; 94 };
95 95
96 public:
97 enum ShutdownReason { 96 enum ShutdownReason {
98 NMT_shutdown_none, // no shutdown requested 97 NMT_shutdown_none, // no shutdown requested
99 NMT_shutdown_user, // user requested shutdown 98 NMT_shutdown_user, // user requested shutdown
100 NMT_normal, // normal shutdown, process exit 99 NMT_normal, // normal shutdown, process exit
101 NMT_out_of_memory, // shutdown due to out of memory 100 NMT_out_of_memory, // shutdown due to out of memory
113 112
114 // if NMT is enabled to record memory activities 113 // if NMT is enabled to record memory activities
115 static inline bool is_on() { 114 static inline bool is_on() {
116 return (_tracking_level >= NMT_summary && 115 return (_tracking_level >= NMT_summary &&
117 _state >= NMT_bootstrapping_single_thread); 116 _state >= NMT_bootstrapping_single_thread);
117 }
118
119 static inline enum NMTLevel tracking_level() {
120 return _tracking_level;
118 } 121 }
119 122
120 // user readable reason for shutting down NMT 123 // user readable reason for shutting down NMT
121 static const char* reason() { 124 static const char* reason() {
122 switch(_reason) { 125 switch(_reason) {