Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset TLH sizing at first increment for CS #7251

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions gc/base/standard/Scavenger.cpp
Original file line number Diff line number Diff line change
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
Loading