src/share/vm/services/memTracker.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-rt.8007074 Sdiff src/share/vm/services

src/share/vm/services/memTracker.hpp

Print this page




  70   public:
  71    static inline void init_tracking_options(const char* option_line) { }
  72    static inline bool is_on()   { return false; }
  73    static const char* reason()  { return "Native memory tracking is not implemented"; }
  74    static inline bool can_walk_stack() { return false; }
  75 
  76    static inline void bootstrap_single_thread() { }
  77    static inline void bootstrap_multi_thread() { }
  78    static inline void start() { }
  79 
  80    static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
  81         address pc = 0, Thread* thread = NULL) { }
  82    static inline void record_free(address addr, MEMFLAGS flags, Thread* thread = NULL) { }
  83    static inline void record_arena_size(address addr, size_t size) { }
  84    static inline void record_virtual_memory_reserve(address addr, size_t size,
  85         MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
  86    static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
  87         MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
  88    static inline void record_virtual_memory_commit(address addr, size_t size,
  89         address pc = 0, Thread* thread = NULL) { }


  90    static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
  91         Thread* thread = NULL) { }
  92    static inline Tracker get_realloc_tracker() { return _tkr; }
  93    static inline Tracker get_virtual_memory_uncommit_tracker() { return _tkr; }
  94    static inline Tracker get_virtual_memory_release_tracker()  { return _tkr; }
  95    static inline bool baseline() { return false; }
  96    static inline bool has_baseline() { return false; }
  97 
  98    static inline void set_autoShutdown(bool value) { }
  99    static void shutdown(ShutdownReason reason) { }
 100    static inline bool shutdown_in_progress() { return false; }
 101    static bool print_memory_usage(BaselineOutputer& out, size_t unit,
 102             bool summary_only = true) { return false; }
 103    static bool compare_memory_usage(BaselineOutputer& out, size_t unit,
 104             bool summary_only = true) { return false; }
 105 
 106    static bool wbtest_wait_for_data_merge() { return false; }
 107 
 108    static inline void sync() { }
 109    static inline void thread_exiting(JavaThread* thread) { }


 355   }
 356 
 357   static inline void release_thread_stack(address addr, size_t size, Thread* thr) {
 358     Tracker tkr(Tracker::StackRelease, thr);
 359     tkr.record(addr, size, mtThreadStack, DEBUG_CALLER_PC);
 360   }
 361 
 362   // record a virtual memory 'commit' call
 363   static inline void record_virtual_memory_commit(address addr, size_t size,
 364                             address pc, Thread* thread = NULL) {
 365     Tracker tkr(Tracker::Commit, thread);
 366     tkr.record(addr, size, mtNone, pc);
 367   }
 368 
 369   static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
 370     MEMFLAGS flags, address pc, Thread* thread = NULL) {
 371     Tracker tkr(Tracker::ReserveAndCommit, thread);
 372     tkr.record(addr, size, flags, pc);
 373   }
 374 







 375 
 376   // record memory type on virtual memory base address
 377   static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
 378                             Thread* thread = NULL) {
 379     Tracker tkr(Tracker::Type);
 380     tkr.record(base, 0, flags);
 381   }
 382 
 383   // Get memory trackers for memory operations that can result race conditions.
 384   // The memory tracker has to be obtained before realloc, virtual memory uncommit
 385   // and virtual memory release, and call tracker.record() method if operation
 386   // succeeded, or tracker.discard() to abort the tracking.
 387   static inline Tracker get_realloc_tracker() {
 388     return Tracker(Tracker::Realloc);
 389   }
 390 
 391   static inline Tracker get_virtual_memory_uncommit_tracker() {
 392     return Tracker(Tracker::Uncommit);
 393   }
 394 




  70   public:
  71    static inline void init_tracking_options(const char* option_line) { }
  72    static inline bool is_on()   { return false; }
  73    static const char* reason()  { return "Native memory tracking is not implemented"; }
  74    static inline bool can_walk_stack() { return false; }
  75 
  76    static inline void bootstrap_single_thread() { }
  77    static inline void bootstrap_multi_thread() { }
  78    static inline void start() { }
  79 
  80    static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
  81         address pc = 0, Thread* thread = NULL) { }
  82    static inline void record_free(address addr, MEMFLAGS flags, Thread* thread = NULL) { }
  83    static inline void record_arena_size(address addr, size_t size) { }
  84    static inline void record_virtual_memory_reserve(address addr, size_t size,
  85         MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
  86    static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
  87         MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
  88    static inline void record_virtual_memory_commit(address addr, size_t size,
  89         address pc = 0, Thread* thread = NULL) { }
  90    static inline void record_virtual_memory_release(address addr, size_t size,
  91         Thread* thread = NULL) { }
  92    static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
  93         Thread* thread = NULL) { }
  94    static inline Tracker get_realloc_tracker() { return _tkr; }
  95    static inline Tracker get_virtual_memory_uncommit_tracker() { return _tkr; }
  96    static inline Tracker get_virtual_memory_release_tracker()  { return _tkr; }
  97    static inline bool baseline() { return false; }
  98    static inline bool has_baseline() { return false; }
  99 
 100    static inline void set_autoShutdown(bool value) { }
 101    static void shutdown(ShutdownReason reason) { }
 102    static inline bool shutdown_in_progress() { return false; }
 103    static bool print_memory_usage(BaselineOutputer& out, size_t unit,
 104             bool summary_only = true) { return false; }
 105    static bool compare_memory_usage(BaselineOutputer& out, size_t unit,
 106             bool summary_only = true) { return false; }
 107 
 108    static bool wbtest_wait_for_data_merge() { return false; }
 109 
 110    static inline void sync() { }
 111    static inline void thread_exiting(JavaThread* thread) { }


 357   }
 358 
 359   static inline void release_thread_stack(address addr, size_t size, Thread* thr) {
 360     Tracker tkr(Tracker::StackRelease, thr);
 361     tkr.record(addr, size, mtThreadStack, DEBUG_CALLER_PC);
 362   }
 363 
 364   // record a virtual memory 'commit' call
 365   static inline void record_virtual_memory_commit(address addr, size_t size,
 366                             address pc, Thread* thread = NULL) {
 367     Tracker tkr(Tracker::Commit, thread);
 368     tkr.record(addr, size, mtNone, pc);
 369   }
 370 
 371   static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
 372     MEMFLAGS flags, address pc, Thread* thread = NULL) {
 373     Tracker tkr(Tracker::ReserveAndCommit, thread);
 374     tkr.record(addr, size, flags, pc);
 375   }
 376 
 377   static inline void record_virtual_memory_release(address addr, size_t size,
 378       Thread* thread = NULL) {
 379     if (is_on()) {
 380       Tracker tkr(Tracker::Release, thread);
 381       tkr.record(addr, size);
 382     }
 383   }
 384 
 385   // record memory type on virtual memory base address
 386   static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
 387                             Thread* thread = NULL) {
 388     Tracker tkr(Tracker::Type);
 389     tkr.record(base, 0, flags);
 390   }
 391 
 392   // Get memory trackers for memory operations that can result race conditions.
 393   // The memory tracker has to be obtained before realloc, virtual memory uncommit
 394   // and virtual memory release, and call tracker.record() method if operation
 395   // succeeded, or tracker.discard() to abort the tracking.
 396   static inline Tracker get_realloc_tracker() {
 397     return Tracker(Tracker::Realloc);
 398   }
 399 
 400   static inline Tracker get_virtual_memory_uncommit_tracker() {
 401     return Tracker(Tracker::Uncommit);
 402   }
 403 


src/share/vm/services/memTracker.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File