hotspot/src/share/vm/services/memTracker.hpp
changeset 13861 619cff4bfb8b
parent 13859 7fe4578493fc
child 13975 2f7431485cfa
equal deleted inserted replaced
13859:7fe4578493fc 13861:619cff4bfb8b
    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) {