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

src/share/vm/services/memTracker.hpp

Print this page




 285     }
 286   }
 287 
 288   // record a virtual memory 'commit' call
 289   static inline void record_virtual_memory_commit(address addr, size_t size,
 290                             address pc, Thread* thread = NULL) {
 291     if (is_on()) {
 292       Tracker tkr(Tracker::Commit, thread);
 293       tkr.record(addr, size, mtNone, pc);
 294     }
 295   }
 296 
 297   static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
 298     MEMFLAGS flags, address pc, Thread* thread = NULL) {
 299     if (is_on()) {
 300       Tracker tkr(Tracker::ReserveAndCommit, thread);
 301       tkr.record(addr, size, flags, pc);
 302     }
 303   }
 304 







 305 
 306   // record memory type on virtual memory base address
 307   static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
 308                             Thread* thread = NULL) {
 309     if (is_on()) {
 310       Tracker tkr(Tracker::Type);
 311       tkr.record(base, 0, flags);
 312     }
 313   }
 314 
 315   // Get memory trackers for memory operations that can result race conditions.
 316   // The memory tracker has to be obtained before realloc, virtual memory uncommit
 317   // and virtual memory release, and call tracker.record() method if operation
 318   // succeeded, or tracker.discard() to abort the tracking.
 319   static inline Tracker get_realloc_tracker() {
 320     return Tracker(Tracker::Realloc);
 321   }
 322 
 323   static inline Tracker get_virtual_memory_uncommit_tracker() {
 324     return Tracker(Tracker::Uncommit);




 285     }
 286   }
 287 
 288   // record a virtual memory 'commit' call
 289   static inline void record_virtual_memory_commit(address addr, size_t size,
 290                             address pc, Thread* thread = NULL) {
 291     if (is_on()) {
 292       Tracker tkr(Tracker::Commit, thread);
 293       tkr.record(addr, size, mtNone, pc);
 294     }
 295   }
 296 
 297   static inline void record_virtual_memory_reserve_and_commit(address addr, size_t size,
 298     MEMFLAGS flags, address pc, Thread* thread = NULL) {
 299     if (is_on()) {
 300       Tracker tkr(Tracker::ReserveAndCommit, thread);
 301       tkr.record(addr, size, flags, pc);
 302     }
 303   }
 304 
 305   static inline void record_virtual_memory_release(address addr, size_t size,
 306       Thread* thread = NULL) {
 307     if (is_on()) {
 308       Tracker tkr(Tracker::Release, thread);
 309       tkr.record(addr, size);
 310     }
 311   }
 312 
 313   // record memory type on virtual memory base address
 314   static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
 315                             Thread* thread = NULL) {
 316     if (is_on()) {
 317       Tracker tkr(Tracker::Type);
 318       tkr.record(base, 0, flags);
 319     }
 320   }
 321 
 322   // Get memory trackers for memory operations that can result race conditions.
 323   // The memory tracker has to be obtained before realloc, virtual memory uncommit
 324   // and virtual memory release, and call tracker.record() method if operation
 325   // succeeded, or tracker.discard() to abort the tracking.
 326   static inline Tracker get_realloc_tracker() {
 327     return Tracker(Tracker::Realloc);
 328   }
 329 
 330   static inline Tracker get_virtual_memory_uncommit_tracker() {
 331     return Tracker(Tracker::Uncommit);


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