< prev index next >

src/hotspot/share/services/memTracker.hpp

Print this page
rev 55588 : imported patch 8227031-optionally-print-nmt-report-on-oom


 254     if (addr != NULL) {
 255       ThreadStackTracker::delete_thread_stack((address)addr, size);
 256     }
 257   }
 258 
 259   // Query lock is used to synchronize the access to tracking data.
 260   // So far, it is only used by JCmd query, but it may be used by
 261   // other tools.
 262   static inline Mutex* query_lock() {
 263     assert(NMTQuery_lock != NULL, "not initialized!");
 264     return NMTQuery_lock;
 265   }
 266 
 267   // Make a final report or report for hs_err file.
 268   static void error_report(outputStream* output) {
 269     if (tracking_level() >= NMT_summary) {
 270       report(true, output);  // just print summary for error case.
 271     }
 272    }
 273 
 274   static void final_report(outputStream* output) {
 275     NMT_TrackingLevel level = tracking_level();
 276     if (level >= NMT_summary) {
 277       report(level == NMT_summary, output);
 278     }
 279   }
 280 
 281 
 282   // Stored baseline
 283   static inline MemBaseline& get_baseline() {
 284     return _baseline;
 285   }
 286 
 287   static NMT_TrackingLevel cmdline_tracking_level() {
 288     return _cmdline_tracking_level;
 289   }
 290 
 291   static void tuning_statistics(outputStream* out);
 292 
 293  private:
 294   static NMT_TrackingLevel init_tracking_level();
 295   static void report(bool summary_only, outputStream* output);
 296 
 297  private:
 298   // Tracking level
 299   static volatile NMT_TrackingLevel   _tracking_level;
 300   // If NMT option value passed by launcher through environment


 254     if (addr != NULL) {
 255       ThreadStackTracker::delete_thread_stack((address)addr, size);
 256     }
 257   }
 258 
 259   // Query lock is used to synchronize the access to tracking data.
 260   // So far, it is only used by JCmd query, but it may be used by
 261   // other tools.
 262   static inline Mutex* query_lock() {
 263     assert(NMTQuery_lock != NULL, "not initialized!");
 264     return NMTQuery_lock;
 265   }
 266 
 267   // Make a final report or report for hs_err file.
 268   static void error_report(outputStream* output) {
 269     if (tracking_level() >= NMT_summary) {
 270       report(true, output);  // just print summary for error case.
 271     }
 272    }
 273 
 274   static void final_report(outputStream* output);






 275 
 276   // Stored baseline
 277   static inline MemBaseline& get_baseline() {
 278     return _baseline;
 279   }
 280 
 281   static NMT_TrackingLevel cmdline_tracking_level() {
 282     return _cmdline_tracking_level;
 283   }
 284 
 285   static void tuning_statistics(outputStream* out);
 286 
 287  private:
 288   static NMT_TrackingLevel init_tracking_level();
 289   static void report(bool summary_only, outputStream* output);
 290 
 291  private:
 292   // Tracking level
 293   static volatile NMT_TrackingLevel   _tracking_level;
 294   // If NMT option value passed by launcher through environment
< prev index next >