Skip to content

Commit

Permalink
Merge pull request #4240 from amicic/fixspelling
Browse files Browse the repository at this point in the history
Fix spelling
  • Loading branch information
pshipton committed Jan 15, 2019
2 parents 375a092 + 03bf485 commit c0196f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions runtime/gc_modron_startup/mminit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions runtime/gc_modron_startup/mmparseXXgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,31 +937,31 @@ 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;
}
if(percentage > 100) {
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;
}
if(percentage > 100) {
returnValue = JNI_EINVAL;
break;
}
extensions->heapSizeStatupHintWeightNewValue = ((float)percentage) / 100.0f;
extensions->heapSizeStartupHintWeightNewValue = ((float)percentage) / 100.0f;
continue ;
}

Expand Down

0 comments on commit c0196f5

Please sign in to comment.