--- old/src/hotspot/share/prims/whitebox.cpp 2018-02-20 23:17:55.577125815 +0100 +++ new/src/hotspot/share/prims/whitebox.cpp 2018-02-20 23:17:55.357118294 +0100 @@ -177,11 +177,14 @@ WB_END WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) { +#if 0 CollectorPolicy * p = Universe::heap()->collector_policy(); + CollectedHeap* c = Universe::heap(); tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap " SIZE_FORMAT " Maximum heap " SIZE_FORMAT " Space alignment " SIZE_FORMAT " Heap alignment " SIZE_FORMAT, p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(), - p->space_alignment(), p->heap_alignment()); + c->space_alignment(), c->heap_alignment()); +#endif } WB_END @@ -359,12 +362,12 @@ WB_END WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o)) - size_t alignment = Universe::heap()->collector_policy()->space_alignment(); + size_t alignment = Universe::heap()->space_alignment(); return (jlong)alignment; WB_END WB_ENTRY(jlong, WB_GetHeapAlignment(JNIEnv* env, jobject o)) - size_t alignment = Universe::heap()->collector_policy()->heap_alignment(); + size_t alignment = Universe::heap()->heap_alignment(); return (jlong)alignment; WB_END @@ -491,7 +494,7 @@ WB_ENTRY(jlong, WB_PSHeapGenerationAlignment(JNIEnv* env, jobject o)) #if INCLUDE_ALL_GCS if (UseParallelGC) { - return ParallelScavengeHeap::heap()->generation_alignment(); + return ParallelScavengeHeap::heap()->gen_alignment(); } #endif // INCLUDE_ALL_GCS THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_PSHeapGenerationAlignment: Parallel GC is not enabled"); @@ -1212,12 +1215,12 @@ WB_END WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o)) - Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(true); + Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(true); Universe::heap()->collect(GCCause::_wb_full_gc); #if INCLUDE_ALL_GCS if (UseG1GC) { // Needs to be cleared explicitly for G1 - Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(false); + Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(false); } #endif // INCLUDE_ALL_GCS WB_END