Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/whitebox.cpp @ 23031:e5406a79ae90
8061715: gc/g1/TestShrinkAuxiliaryData15.java fails with java.lang.RuntimeException: heap decommit failed - after > before
Summary: added WhiteBox methods to count regions and exact aux data sizes
Reviewed-by: jwilhelm, brutisso
author | azakharov |
---|---|
date | Tue, 19 May 2015 15:49:27 +0200 |
parents | e9a7f132cec3 |
children | dd9cc155639c 047a642c9729 |
comparison
equal
deleted
inserted
replaced
23030:399885e13e90 | 23031:e5406a79ae90 |
---|---|
307 oop result = JNIHandles::resolve(obj); | 307 oop result = JNIHandles::resolve(obj); |
308 const HeapRegion* hr = g1->heap_region_containing(result); | 308 const HeapRegion* hr = g1->heap_region_containing(result); |
309 return hr->isHumongous(); | 309 return hr->isHumongous(); |
310 WB_END | 310 WB_END |
311 | 311 |
312 WB_ENTRY(jlong, WB_G1NumMaxRegions(JNIEnv* env, jobject o)) | |
313 G1CollectedHeap* g1 = G1CollectedHeap::heap(); | |
314 size_t nr = g1->max_regions(); | |
315 return (jlong)nr; | |
316 WB_END | |
317 | |
312 WB_ENTRY(jlong, WB_G1NumFreeRegions(JNIEnv* env, jobject o)) | 318 WB_ENTRY(jlong, WB_G1NumFreeRegions(JNIEnv* env, jobject o)) |
313 G1CollectedHeap* g1 = G1CollectedHeap::heap(); | 319 G1CollectedHeap* g1 = G1CollectedHeap::heap(); |
314 size_t nr = g1->num_free_regions(); | 320 size_t nr = g1->num_free_regions(); |
315 return (jlong)nr; | 321 return (jlong)nr; |
316 WB_END | 322 WB_END |
321 return cm->concurrent_marking_in_progress(); | 327 return cm->concurrent_marking_in_progress(); |
322 WB_END | 328 WB_END |
323 | 329 |
324 WB_ENTRY(jint, WB_G1RegionSize(JNIEnv* env, jobject o)) | 330 WB_ENTRY(jint, WB_G1RegionSize(JNIEnv* env, jobject o)) |
325 return (jint)HeapRegion::GrainBytes; | 331 return (jint)HeapRegion::GrainBytes; |
332 WB_END | |
333 | |
334 WB_ENTRY(jobject, WB_G1AuxiliaryMemoryUsage(JNIEnv* env)) | |
335 ResourceMark rm(THREAD); | |
336 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | |
337 MemoryUsage usage = g1h->get_auxiliary_data_memory_usage(); | |
338 Handle h = MemoryService::create_MemoryUsage_obj(usage, CHECK_NULL); | |
339 return JNIHandles::make_local(env, h()); | |
326 WB_END | 340 WB_END |
327 #endif // INCLUDE_ALL_GCS | 341 #endif // INCLUDE_ALL_GCS |
328 | 342 |
329 #if INCLUDE_NMT | 343 #if INCLUDE_NMT |
330 // Alloc memory using the test memory type so that we can use that to see if | 344 // Alloc memory using the test memory type so that we can use that to see if |
1012 {CC"readFromNoaccessArea",CC"()V", (void*)&WB_ReadFromNoaccessArea}, | 1026 {CC"readFromNoaccessArea",CC"()V", (void*)&WB_ReadFromNoaccessArea}, |
1013 {CC"stressVirtualSpaceResize",CC"(JJJ)I", (void*)&WB_StressVirtualSpaceResize}, | 1027 {CC"stressVirtualSpaceResize",CC"(JJJ)I", (void*)&WB_StressVirtualSpaceResize}, |
1014 #if INCLUDE_ALL_GCS | 1028 #if INCLUDE_ALL_GCS |
1015 {CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark}, | 1029 {CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark}, |
1016 {CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous }, | 1030 {CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous }, |
1031 {CC"g1NumMaxRegions", CC"()J", (void*)&WB_G1NumMaxRegions }, | |
1017 {CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions }, | 1032 {CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions }, |
1018 {CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize }, | 1033 {CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize }, |
1034 {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;", | |
1035 (void*)&WB_G1AuxiliaryMemoryUsage }, | |
1019 #endif // INCLUDE_ALL_GCS | 1036 #endif // INCLUDE_ALL_GCS |
1020 #if INCLUDE_NMT | 1037 #if INCLUDE_NMT |
1021 {CC"NMTMalloc", CC"(J)J", (void*)&WB_NMTMalloc }, | 1038 {CC"NMTMalloc", CC"(J)J", (void*)&WB_NMTMalloc }, |
1022 {CC"NMTMallocWithPseudoStack", CC"(JI)J", (void*)&WB_NMTMallocWithPseudoStack}, | 1039 {CC"NMTMallocWithPseudoStack", CC"(JI)J", (void*)&WB_NMTMallocWithPseudoStack}, |
1023 {CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree }, | 1040 {CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree }, |