Skip to content

Commit

Permalink
Adds FSD check to jitClassRedefineEvent
Browse files Browse the repository at this point in the history
jitClassRedefineEvent is updated to include an explicit check for FSD being
enabled.

The result of this is the code cache is tossed out if either HCR extensions
are enabled or FSD mode is enabled.

Signed-off-by: jimmyk <[email protected]>
  • Loading branch information
IBMJimmyk committed Jul 30, 2024
1 parent d776a4a commit ad9620c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/util/hshelp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4208,12 +4208,12 @@ hshelpUTRegister(J9JavaVM *vm)
*
* @param[in] currentThread
* @param[in] jitEventData event data describing redefined classes
* @param[in] extensionsEnabled specifies if the extensions are enabled, always true if FSD is on
* @param[in] extensionsEnabled specifies if the extensions are enabled
*
* Notify the JIT of the changes. Enabled extensions mean that the JIT has
* been initialized in FSD mode. We need to dump the whole code cache in such a case.
* If the extensions have NOT been enabled we take the smarter code path and ask the
* jit to patch the compiled code to account for the redefined classes.
* Notify the JIT of the changes. If FSD is enabled or there are HCR extensions, we
* need to dump the whole code cache.
* If neither is the case, we take the smarter code path and ask the jit to patch
* the compiled code to account for the redefined classes.
*/
void
jitClassRedefineEvent(J9VMThread * currentThread, J9JVMTIHCRJitEventData * jitEventData, UDATA extensionsEnabled, UDATA extensionsUsed)
Expand All @@ -4223,7 +4223,7 @@ jitClassRedefineEvent(J9VMThread * currentThread, J9JVMTIHCRJitEventData * jitEv

if (NULL != jitConfig) {
jitConfig->jitClassesRedefined(currentThread, jitEventData->classCount, (J9JITRedefinedClass*)jitEventData->data, extensionsUsed);
if (extensionsEnabled) {
if (extensionsEnabled || J9_FSD_ENABLED(vm)) {
/* Toss the whole code cache */
jitConfig->jitHotswapOccurred(currentThread);
}
Expand Down

0 comments on commit ad9620c

Please sign in to comment.