Skip to content

Commit

Permalink
Merge pull request eclipse-omr#7353 from LinHu2016/update_jitcodecach…
Browse files Browse the repository at this point in the history
…ereclaimation

Passing unsuccessful state to GC cycle end event
  • Loading branch information
babsingh authored Jun 3, 2024
2 parents 398030f + 43d759d commit a3bc75a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gc/base/standard/Scavenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4435,6 +4435,11 @@ void
MM_Scavenger::reportGCCycleFinalIncrementEnding(MM_EnvironmentStandard *env)
{
OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary());
uintptr_t cycleType = env->_cycleState->_type;
/* set OMR_GC_CYCLE_TYPE_STATE_UNSUCCESSFUL bit in the cycleType of CycleEnd event in scavenge backout case */
if (env->getExtensions()->isScavengerBackOutFlagRaised()) {
cycleType |= OMR_GC_CYCLE_TYPE_STATE_UNSUCCESSFUL;
}

MM_CommonGCData commonData;

Expand All @@ -4444,7 +4449,7 @@ MM_Scavenger::reportGCCycleFinalIncrementEnding(MM_EnvironmentStandard *env)
omrtime_hires_clock(),
J9HOOK_MM_OMR_GC_CYCLE_END,
_extensions->getHeap()->initializeCommonGCData(env, &commonData),
env->_cycleState->_type,
cycleType,
omrgc_condYieldFromGC
);
}
Expand Down
6 changes: 6 additions & 0 deletions include_core/omrgcconsts.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ typedef enum MM_ScavengeScanReason {
#define OMR_GC_CYCLE_TYPE_GLOBAL 1
#define OMR_GC_CYCLE_TYPE_SCAVENGE 2
#define OMR_GC_CYCLE_TYPE_EPSILON 6
/**
* This bit represents the state to abort a cycle. It is only used in the cycleType of CycleEnd event.
* MM_CycleState->_type has uintptr_t type. This code still needs to be supported on 32-bit platforms,
* which will require the bit to fit in a 32 bit word.
*/
#define OMR_GC_CYCLE_TYPE_STATE_UNSUCCESSFUL 0x80000000

/* Core allocation flags defined for OMR are < OMR_GC_ALLOCATE_OBJECT_LANGUAGE_DEFINED_BASE */
#define OMR_GC_ALLOCATE_OBJECT_NON_INSTRUMENTABLE 0x0
Expand Down

0 comments on commit a3bc75a

Please sign in to comment.