Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/whitebox.cpp @ 20628:80260967f994
8061969: [TESTBUG] MallocSiteHashOverflow.java should be enabled for 32-bit platforms
Reviewed-by: ctornqvi, coleenp
author | gtriantafill |
---|---|
date | Wed, 05 Nov 2014 08:22:17 -0800 |
parents | 3c87c13918fb |
children | 787c9c28311f |
line wrap: on
line diff
--- a/src/share/vm/prims/whitebox.cpp Mon Nov 10 17:14:59 2014 +0100 +++ b/src/share/vm/prims/whitebox.cpp Wed Nov 05 08:22:17 2014 -0800 @@ -344,15 +344,6 @@ return MemTracker::tracking_level() == NMT_detail; WB_END -WB_ENTRY(void, WB_NMTOverflowHashBucket(JNIEnv* env, jobject o, jlong num)) - address pc = (address)1; - for (jlong index = 0; index < num; index ++) { - NativeCallStack stack(&pc, 1); - os::malloc(0, mtTest, stack); - pc += MallocSiteTable::hash_buckets(); - } -WB_END - WB_ENTRY(jboolean, WB_NMTChangeTrackingLevel(JNIEnv* env)) // Test that we can downgrade NMT levels but not upgrade them. if (MemTracker::tracking_level() == NMT_off) { @@ -383,6 +374,12 @@ return MemTracker::tracking_level() == NMT_minimal; } WB_END + +WB_ENTRY(jint, WB_NMTGetHashSize(JNIEnv* env, jobject o)) + int hash_size = MallocSiteTable::hash_buckets(); + assert(hash_size > 0, "NMT hash_size should be > 0"); + return (jint)hash_size; +WB_END #endif // INCLUDE_NMT static jmethodID reflected_method_to_jmid(JavaThread* thread, JNIEnv* env, jobject method) { @@ -981,9 +978,9 @@ {CC"NMTCommitMemory", CC"(JJ)V", (void*)&WB_NMTCommitMemory }, {CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory }, {CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory }, - {CC"NMTOverflowHashBucket", CC"(J)V", (void*)&WB_NMTOverflowHashBucket}, {CC"NMTIsDetailSupported",CC"()Z", (void*)&WB_NMTIsDetailSupported}, {CC"NMTChangeTrackingLevel", CC"()Z", (void*)&WB_NMTChangeTrackingLevel}, + {CC"NMTGetHashSize", CC"()I", (void*)&WB_NMTGetHashSize }, #endif // INCLUDE_NMT {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, {CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Executable;Z)I",