comparison src/share/vm/services/memTracker.hpp @ 6599:4acebbe310e1

7185614: NMT ON: "check by caller" assertion failed on nsk ThreadMXBean test 7187429: NMT ON: Merge failure should cause NMT to shutdown Summary: Fixed NMT assertion failures Reviewed-by: acorn, kvn
author zgu
date Wed, 01 Aug 2012 17:19:30 -0400
parents d5bc62fcfac7
children 33143ee07800
comparison
equal deleted inserted replaced
6242:fe94b4e7212b 6599:4acebbe310e1
182 static void start(); 182 static void start();
183 183
184 // record a 'malloc' call 184 // record a 'malloc' call
185 static inline void record_malloc(address addr, size_t size, MEMFLAGS flags, 185 static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
186 address pc = 0, Thread* thread = NULL) { 186 address pc = 0, Thread* thread = NULL) {
187 assert(is_on(), "check by caller");
188 if (NMT_CAN_TRACK(flags)) { 187 if (NMT_CAN_TRACK(flags)) {
189 create_memory_record(addr, (flags|MemPointerRecord::malloc_tag()), size, pc, thread); 188 create_memory_record(addr, (flags|MemPointerRecord::malloc_tag()), size, pc, thread);
190 } 189 }
191 } 190 }
192 // record a 'free' call 191 // record a 'free' call
283 // called when a thread is about to exit 282 // called when a thread is about to exit
284 static void thread_exiting(JavaThread* thread); 283 static void thread_exiting(JavaThread* thread);
285 284
286 // retrieve global snapshot 285 // retrieve global snapshot
287 static MemSnapshot* get_snapshot() { 286 static MemSnapshot* get_snapshot() {
288 assert(is_on(), "native memory tracking is off");
289 if (shutdown_in_progress()) { 287 if (shutdown_in_progress()) {
290 return NULL; 288 return NULL;
291 } 289 }
292 return _snapshot; 290 return _snapshot;
293 } 291 }