Skip to content

Commit

Permalink
Merge pull request #7251 from amicic/resetTLH_firstIncrement
Browse files Browse the repository at this point in the history
Reset TLH sizing at first increment for CS
  • Loading branch information
babsingh committed Feb 7, 2024
2 parents 2fb53dc + 9d43516 commit f010ed6
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions gc/base/standard/Scavenger.cpp
Expand Up @@ -4248,6 +4248,14 @@ MM_Scavenger::mainThreadGarbageCollect(MM_EnvironmentBase *envBase, MM_AllocateD
reportGCCycleStart(env);
_cycleTimes.cycleStart = omrtime_hires_clock();
mainSetupForGC(env);

/* Restart the allocation caches associated to all threads */
GC_OMRVMThreadListIterator threadListIterator(_omrVM);
OMR_VMThread *walkThread = NULL;
while ((walkThread = threadListIterator.nextOMRVMThread()) != NULL) {
MM_EnvironmentBase *walkEnv = MM_EnvironmentBase::getEnvironment(walkThread);
walkEnv->_objectAllocationInterface->restartCache(env);
}
}
clearIncrementGCStats(env, firstIncrement);
reportGCStart(env);
Expand Down Expand Up @@ -4330,16 +4338,6 @@ MM_Scavenger::mainThreadGarbageCollect(MM_EnvironmentBase *envBase, MM_AllocateD
_evacuateMemorySubSpace = _activeSubSpace->getMemorySubSpaceSurvivor();
_activeSubSpace->cacheRanges(_evacuateMemorySubSpace, &_evacuateSpaceBase, &_evacuateSpaceTop);
#endif
/* Restart the allocation caches associated to all threads */
{
GC_OMRVMThreadListIterator threadListIterator(_omrVM);
OMR_VMThread *walkThread;
while((walkThread = threadListIterator.nextOMRVMThread()) != NULL) {
MM_EnvironmentBase *walkEnv = MM_EnvironmentBase::getEnvironment(walkThread);
walkEnv->_objectAllocationInterface->restartCache(env);
}
}

_extensions->heap->resetHeapStatistics(false);

/* If there was a failed tenure of a size greater than the threshold, set the flag. */
Expand Down

0 comments on commit f010ed6

Please sign in to comment.