Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
20627:e7b3d177adda | 20628:80260967f994 |
---|---|
342 | 342 |
343 WB_ENTRY(jboolean, WB_NMTIsDetailSupported(JNIEnv* env)) | 343 WB_ENTRY(jboolean, WB_NMTIsDetailSupported(JNIEnv* env)) |
344 return MemTracker::tracking_level() == NMT_detail; | 344 return MemTracker::tracking_level() == NMT_detail; |
345 WB_END | 345 WB_END |
346 | 346 |
347 WB_ENTRY(void, WB_NMTOverflowHashBucket(JNIEnv* env, jobject o, jlong num)) | |
348 address pc = (address)1; | |
349 for (jlong index = 0; index < num; index ++) { | |
350 NativeCallStack stack(&pc, 1); | |
351 os::malloc(0, mtTest, stack); | |
352 pc += MallocSiteTable::hash_buckets(); | |
353 } | |
354 WB_END | |
355 | |
356 WB_ENTRY(jboolean, WB_NMTChangeTrackingLevel(JNIEnv* env)) | 347 WB_ENTRY(jboolean, WB_NMTChangeTrackingLevel(JNIEnv* env)) |
357 // Test that we can downgrade NMT levels but not upgrade them. | 348 // Test that we can downgrade NMT levels but not upgrade them. |
358 if (MemTracker::tracking_level() == NMT_off) { | 349 if (MemTracker::tracking_level() == NMT_off) { |
359 MemTracker::transition_to(NMT_off); | 350 MemTracker::transition_to(NMT_off); |
360 return MemTracker::tracking_level() == NMT_off; | 351 return MemTracker::tracking_level() == NMT_off; |
380 // Really can never go up to detail, verify that the code would never do this. | 371 // Really can never go up to detail, verify that the code would never do this. |
381 MemTracker::transition_to(NMT_detail); | 372 MemTracker::transition_to(NMT_detail); |
382 assert(MemTracker::tracking_level() == NMT_minimal, "Should still be minimal now"); | 373 assert(MemTracker::tracking_level() == NMT_minimal, "Should still be minimal now"); |
383 return MemTracker::tracking_level() == NMT_minimal; | 374 return MemTracker::tracking_level() == NMT_minimal; |
384 } | 375 } |
376 WB_END | |
377 | |
378 WB_ENTRY(jint, WB_NMTGetHashSize(JNIEnv* env, jobject o)) | |
379 int hash_size = MallocSiteTable::hash_buckets(); | |
380 assert(hash_size > 0, "NMT hash_size should be > 0"); | |
381 return (jint)hash_size; | |
385 WB_END | 382 WB_END |
386 #endif // INCLUDE_NMT | 383 #endif // INCLUDE_NMT |
387 | 384 |
388 static jmethodID reflected_method_to_jmid(JavaThread* thread, JNIEnv* env, jobject method) { | 385 static jmethodID reflected_method_to_jmid(JavaThread* thread, JNIEnv* env, jobject method) { |
389 assert(method != NULL, "method should not be null"); | 386 assert(method != NULL, "method should not be null"); |
979 {CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree }, | 976 {CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree }, |
980 {CC"NMTReserveMemory", CC"(J)J", (void*)&WB_NMTReserveMemory }, | 977 {CC"NMTReserveMemory", CC"(J)J", (void*)&WB_NMTReserveMemory }, |
981 {CC"NMTCommitMemory", CC"(JJ)V", (void*)&WB_NMTCommitMemory }, | 978 {CC"NMTCommitMemory", CC"(JJ)V", (void*)&WB_NMTCommitMemory }, |
982 {CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory }, | 979 {CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory }, |
983 {CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory }, | 980 {CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory }, |
984 {CC"NMTOverflowHashBucket", CC"(J)V", (void*)&WB_NMTOverflowHashBucket}, | |
985 {CC"NMTIsDetailSupported",CC"()Z", (void*)&WB_NMTIsDetailSupported}, | 981 {CC"NMTIsDetailSupported",CC"()Z", (void*)&WB_NMTIsDetailSupported}, |
986 {CC"NMTChangeTrackingLevel", CC"()Z", (void*)&WB_NMTChangeTrackingLevel}, | 982 {CC"NMTChangeTrackingLevel", CC"()Z", (void*)&WB_NMTChangeTrackingLevel}, |
983 {CC"NMTGetHashSize", CC"()I", (void*)&WB_NMTGetHashSize }, | |
987 #endif // INCLUDE_NMT | 984 #endif // INCLUDE_NMT |
988 {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, | 985 {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, |
989 {CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Executable;Z)I", | 986 {CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Executable;Z)I", |
990 (void*)&WB_DeoptimizeMethod }, | 987 (void*)&WB_DeoptimizeMethod }, |
991 {CC"isMethodCompiled", CC"(Ljava/lang/reflect/Executable;Z)Z", | 988 {CC"isMethodCompiled", CC"(Ljava/lang/reflect/Executable;Z)Z", |