Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/whitebox.cpp @ 20630:787c9c28311f
8058251: assert(_count > 0) failed: Negative counter when running runtime/NMT/MallocTrackingVerify.java
Summary: Fixed an issue when overflowing the MallocSite hash table bucket
Reviewed-by: coleenp, gtriantafill
author | ctornqvi |
---|---|
date | Tue, 11 Nov 2014 10:48:06 -0800 |
parents | 80260967f994 |
children | 887a7cedb892 |
comparison
equal
deleted
inserted
replaced
20629:09259e52a610 | 20630:787c9c28311f |
---|---|
298 #if INCLUDE_NMT | 298 #if INCLUDE_NMT |
299 // Alloc memory using the test memory type so that we can use that to see if | 299 // Alloc memory using the test memory type so that we can use that to see if |
300 // NMT picks it up correctly | 300 // NMT picks it up correctly |
301 WB_ENTRY(jlong, WB_NMTMalloc(JNIEnv* env, jobject o, jlong size)) | 301 WB_ENTRY(jlong, WB_NMTMalloc(JNIEnv* env, jobject o, jlong size)) |
302 jlong addr = 0; | 302 jlong addr = 0; |
303 addr = (jlong)(uintptr_t)os::malloc(size, mtTest); | 303 addr = (jlong)(uintptr_t)os::malloc(size, mtTest); |
304 return addr; | 304 return addr; |
305 WB_END | 305 WB_END |
306 | 306 |
307 // Alloc memory with pseudo call stack. The test can create psudo malloc | 307 // Alloc memory with pseudo call stack. The test can create psudo malloc |
308 // allocation site to stress the malloc tracking. | 308 // allocation site to stress the malloc tracking. |
309 WB_ENTRY(jlong, WB_NMTMallocWithPseudoStack(JNIEnv* env, jobject o, jlong size, jint pseudo_stack)) | 309 WB_ENTRY(jlong, WB_NMTMallocWithPseudoStack(JNIEnv* env, jobject o, jlong size, jint pseudo_stack)) |
310 address pc = (address)(size_t)pseudo_stack; | 310 address pc = (address)(size_t)pseudo_stack; |
311 NativeCallStack stack(&pc, 1); | 311 NativeCallStack stack(&pc, 1); |
312 return (jlong)os::malloc(size, mtTest, stack); | 312 return (jlong)(uintptr_t)os::malloc(size, mtTest, stack); |
313 WB_END | 313 WB_END |
314 | 314 |
315 // Free the memory allocated by NMTAllocTest | 315 // Free the memory allocated by NMTAllocTest |
316 WB_ENTRY(void, WB_NMTFree(JNIEnv* env, jobject o, jlong mem)) | 316 WB_ENTRY(void, WB_NMTFree(JNIEnv* env, jobject o, jlong mem)) |
317 os::free((void*)(uintptr_t)mem, mtTest); | 317 os::free((void*)(uintptr_t)mem, mtTest); |