diff --git a/runtime/gc_modron_startup/mminit.cpp b/runtime/gc_modron_startup/mminit.cpp index b8d53b06017..25be592fb75 100644 --- a/runtime/gc_modron_startup/mminit.cpp +++ b/runtime/gc_modron_startup/mminit.cpp @@ -634,8 +634,8 @@ void j9gc_jvmPhaseChange(J9VMThread *currentThread, UDATA phase) } /* Gradually learn, by averaging new values with old values - it may take a few restarts before hint converge to stable values */ - hintDefault = (uintptr_t)MM_Math::weightedAverage((float)hintDefaultOld, (float)hintDefault, (1.0f - extensions->heapSizeStatupHintWeightNewValue)); - hintTenure = (uintptr_t)MM_Math::weightedAverage((float)hintTenureOld, (float)hintTenure, (1.0f - extensions->heapSizeStatupHintWeightNewValue)); + hintDefault = (uintptr_t)MM_Math::weightedAverage((float)hintDefaultOld, (float)hintDefault, (1.0f - extensions->heapSizeStartupHintWeightNewValue)); + hintTenure = (uintptr_t)MM_Math::weightedAverage((float)hintTenureOld, (float)hintTenure, (1.0f - extensions->heapSizeStartupHintWeightNewValue)); vm->sharedClassConfig->storeGCHints(currentThread, hintDefault, hintTenure, true); /* Nothing to do if store fails, storeGCHints already issues a trace point */ @@ -673,16 +673,16 @@ gcExpandHeapOnStartup(J9JavaVM *javaVM) * We deal with Tenure only if only not equal to Default (which implies it's generational) * We are a bit conservative and aim for slightly lower values that historically recorded by hints. */ - uintptr_t hintDefaultAdjusted = (uintptr_t)(hintDefault * extensions->heapSizeStatupHintConservativeFactor); + uintptr_t hintDefaultAdjusted = (uintptr_t)(hintDefault * extensions->heapSizeStartupHintConservativeFactor); uintptr_t defaultCurrent = defaultMemorySubSpace->getActiveMemorySize(MEMORY_TYPE_OLD | MEMORY_TYPE_NEW); + if (hintDefaultAdjusted > defaultCurrent) { extensions->heap->getResizeStats()->setLastExpandReason(HINT_PREVIOUS_RUNS); defaultMemorySubSpace->expand(&env, hintDefaultAdjusted - defaultCurrent); } - if (defaultMemorySubSpace != tenureMemorySubspace) { - uintptr_t hintTenureAdjusted = (uintptr_t)(hintTenure * extensions->heapSizeStatupHintConservativeFactor); + uintptr_t hintTenureAdjusted = (uintptr_t)(hintTenure * extensions->heapSizeStartupHintConservativeFactor); uintptr_t tenureCurrent = tenureMemorySubspace->getActiveMemorySize(); if (hintTenureAdjusted > tenureCurrent) { diff --git a/runtime/gc_modron_startup/mmparseXXgc.cpp b/runtime/gc_modron_startup/mmparseXXgc.cpp index 53ebae658a4..191d7e80511 100644 --- a/runtime/gc_modron_startup/mmparseXXgc.cpp +++ b/runtime/gc_modron_startup/mmparseXXgc.cpp @@ -937,9 +937,9 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg) continue; } - if (try_scan(&scan_start, "heapSizeStatupHintConservativeFactor=")) { + if (try_scan(&scan_start, "heapSizeStartupHintConservativeFactor=")) { UDATA percentage = 0; - if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStatupHintConservativeFactor=")) { + if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStartupHintConservativeFactor=")) { returnValue = JNI_EINVAL; break; } @@ -947,13 +947,13 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg) returnValue = JNI_EINVAL; break; } - extensions->heapSizeStatupHintConservativeFactor = ((float)percentage) / 100.0f; + extensions->heapSizeStartupHintConservativeFactor = ((float)percentage) / 100.0f; continue ; } - if (try_scan(&scan_start, "heapSizeStatupHintWeightNewValue=")) { + if (try_scan(&scan_start, "heapSizeStartupHintWeightNewValue=")) { UDATA percentage = 0; - if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStatupHintWeightNewValue=")) { + if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStartupHintWeightNewValue=")) { returnValue = JNI_EINVAL; break; } @@ -961,7 +961,7 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg) returnValue = JNI_EINVAL; break; } - extensions->heapSizeStatupHintWeightNewValue = ((float)percentage) / 100.0f; + extensions->heapSizeStartupHintWeightNewValue = ((float)percentage) / 100.0f; continue ; }