comparison src/share/vm/services/memTracker.hpp @ 8883:b9a918201d47

Merge with hsx25
author Gilles Duboscq <duboscq@ssw.jku.at>
date Sat, 06 Apr 2013 20:04:06 +0200
parents b5bae74160b7
children 35f8765422b9
comparison
equal deleted inserted replaced
8660:d47b52b0ff68 8883:b9a918201d47
82 static inline void record_virtual_memory_type(address base, MEMFLAGS flags, 82 static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
83 Thread* thread = NULL) { } 83 Thread* thread = NULL) { }
84 static inline bool baseline() { return false; } 84 static inline bool baseline() { return false; }
85 static inline bool has_baseline() { return false; } 85 static inline bool has_baseline() { return false; }
86 86
87 static inline void set_autoShutdown(bool value) { }
87 static void shutdown(ShutdownReason reason) { } 88 static void shutdown(ShutdownReason reason) { }
88 static inline bool shutdown_in_progress() { } 89 static inline bool shutdown_in_progress() { return false; }
89 static bool print_memory_usage(BaselineOutputer& out, size_t unit, 90 static bool print_memory_usage(BaselineOutputer& out, size_t unit,
90 bool summary_only = true) { } 91 bool summary_only = true) { return false; }
91 static bool compare_memory_usage(BaselineOutputer& out, size_t unit, 92 static bool compare_memory_usage(BaselineOutputer& out, size_t unit,
92 bool summary_only = true) { } 93 bool summary_only = true) { return false; }
93 94
94 static bool wbtest_wait_for_data_merge() { } 95 static bool wbtest_wait_for_data_merge() { return false; }
95 96
96 static inline void sync() { } 97 static inline void sync() { }
97 static inline void thread_exiting(JavaThread* thread) { } 98 static inline void thread_exiting(JavaThread* thread) { }
98 }; 99 };
99 100
236 } 237 }
237 238
238 // if native memory tracking tracks callsite 239 // if native memory tracking tracks callsite
239 static inline bool track_callsite() { return _tracking_level == NMT_detail; } 240 static inline bool track_callsite() { return _tracking_level == NMT_detail; }
240 241
242 // NMT automatically shuts itself down under extreme situation by default.
243 // When the value is set to false, NMT will try its best to stay alive,
244 // even it has to slow down VM.
245 static inline void set_autoShutdown(bool value) {
246 AutoShutdownNMT = value;
247 if (AutoShutdownNMT && _slowdown_calling_thread) {
248 _slowdown_calling_thread = false;
249 }
250 }
251
241 // shutdown native memory tracking capability. Native memory tracking 252 // shutdown native memory tracking capability. Native memory tracking
242 // can be shutdown by VM when it encounters low memory scenarios. 253 // can be shutdown by VM when it encounters low memory scenarios.
243 // Memory tracker should gracefully shutdown itself, and preserve the 254 // Memory tracker should gracefully shutdown itself, and preserve the
244 // latest memory statistics for post morten diagnosis. 255 // latest memory statistics for post morten diagnosis.
245 static void shutdown(ShutdownReason reason); 256 static void shutdown(ShutdownReason reason);
505 // the generation that NMT is processing 516 // the generation that NMT is processing
506 static volatile unsigned long _processing_generation; 517 static volatile unsigned long _processing_generation;
507 // although NMT is still procesing current generation, but 518 // although NMT is still procesing current generation, but
508 // there is not more recorder to process, set idle state 519 // there is not more recorder to process, set idle state
509 static volatile bool _worker_thread_idle; 520 static volatile bool _worker_thread_idle;
521
522 // if NMT should slow down calling thread to allow
523 // worker thread to catch up
524 static volatile bool _slowdown_calling_thread;
510 }; 525 };
511 526
512 #endif // !INCLUDE_NMT 527 #endif // !INCLUDE_NMT
513 528
514 #endif // SHARE_VM_SERVICES_MEM_TRACKER_HPP 529 #endif // SHARE_VM_SERVICES_MEM_TRACKER_HPP