Skip to content

Commit

Permalink
Restore concurrent end trigger
Browse files Browse the repository at this point in the history
The trigger point of the end of final STW increment of concurrent global
GC event was mistakenly removed as part of VGC re-org, believing that
Verbose GC was the only user of. However, global GC scheduling and
compact heuristics indirectly also relied on it.

See: #5688

Signed-off-by: Aleksandar Micic <amicic@ca.ibm.com>
  • Loading branch information
amicic committed Apr 10, 2021
1 parent a7e83c7 commit 39dd3d8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gc/base/standard/ConcurrentGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ MM_ConcurrentGC::reportConcurrentCollectionStart(MM_EnvironmentBase *env)
void
MM_ConcurrentGC::reportConcurrentCollectionEnd(MM_EnvironmentBase *env, uint64_t duration)
{
OMRPORT_ACCESS_FROM_ENVIRONMENT(env);

Trc_MM_ConcurrentCollectionEnd(env->getLanguageVMThread(),
_extensions->heap->getApproximateActiveFreeMemorySize(MEMORY_TYPE_NEW),
_extensions->heap->getActiveMemorySize(MEMORY_TYPE_NEW),
Expand All @@ -393,6 +395,21 @@ MM_ConcurrentGC::reportConcurrentCollectionEnd(MM_EnvironmentBase *env, uint64_t
(_extensions-> largeObjectArea ? _extensions->heap->getApproximateActiveFreeLOAMemorySize(MEMORY_TYPE_OLD) : 0 ),
(_extensions-> largeObjectArea ? _extensions->heap->getActiveLOAMemorySize(MEMORY_TYPE_OLD) : 0 )
);

if (J9_EVENT_IS_HOOKED(_extensions->privateHookInterface, J9HOOK_MM_PRIVATE_CONCURRENT_COLLECTION_END)) {
MM_CommonGCEndData commonData;
_extensions->heap->initializeCommonGCEndData(env, &commonData);

ALWAYS_TRIGGER_J9HOOK_MM_PRIVATE_CONCURRENT_COLLECTION_END(
_extensions->privateHookInterface,
env->getOmrVMThread(),
omrtime_hires_clock(),
J9HOOK_MM_PRIVATE_CONCURRENT_COLLECTION_END,
duration,
env->getExclusiveAccessTime(),
&commonData
);
}
}

void
Expand Down

0 comments on commit 39dd3d8

Please sign in to comment.