Skip to content

Commit

Permalink
Merge pull request #3936 from LinHu2016/mergeFreeEntryStatsAfterCompact
Browse files Browse the repository at this point in the history
Merge FreeEntryAllocateStats after compaction
  • Loading branch information
charliegracie authored Jun 3, 2019
2 parents f9804bb + 53f0ad2 commit 5358dd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gc/base/standard/ParallelGlobalGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ MM_ParallelGlobalGC::masterThreadGarbageCollect(MM_EnvironmentBase *env, MM_Allo

masterThreadCompact(env, allocDescription, rebuildMarkBits);
_collectionStatistics._tenureFragmentation = NO_FRAGMENTATION;
if (_extensions->processLargeAllocateStats) {
processLargeAllocateStatsAfterCompact(env);
}
} else {
/* If a compaction was prevented, report the reason */
CompactPreventedReason compactPreventedReason = (CompactPreventedReason)(_extensions->globalGCStats.compactStats._compactPreventedReason);
Expand Down Expand Up @@ -1115,6 +1118,13 @@ MM_ParallelGlobalGC::processLargeAllocateStatsBeforeGC(MM_EnvironmentBase *env)
}
}

void
MM_ParallelGlobalGC::processLargeAllocateStatsAfterCompact(MM_EnvironmentBase *env)
{
processLargeAllocateStatsAfterSweep(env);
}


void
MM_ParallelGlobalGC::processLargeAllocateStatsAfterSweep(MM_EnvironmentBase *env)
{
Expand Down
6 changes: 6 additions & 0 deletions gc/base/standard/ParallelGlobalGC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ class MM_ParallelGlobalGC : public MM_GlobalCollector
*/
virtual void processLargeAllocateStatsAfterSweep(MM_EnvironmentBase *env);

/**
* compaction would change freeEntries stats, merge FreeEntryAllocateStats after compaction.
* currently processLargeAllocateStatsAfterCompact() is same as processLargeAllocateStatsAfterSweep()
*/
void processLargeAllocateStatsAfterCompact(MM_EnvironmentBase *env);

virtual void postMark(MM_EnvironmentBase *env);

MM_ParallelSweepScheme*
Expand Down

0 comments on commit 5358dd3

Please sign in to comment.