Skip to content

Commit

Permalink
Disable sample based recompilation pre-checkpoint under -XX:+DebugOnR…
Browse files Browse the repository at this point in the history
…estore

Disable sample based recompilation pre-checkpoint when
-XX:+DebugOnRestore is specified as it does not provide any benefit and
can complicate the infrastructure.

Signed-off-by: Irwin D'Souza <[email protected]>
  • Loading branch information
dsouzai committed Apr 11, 2024
1 parent 69956f0 commit f0d24de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/compiler/control/HookedByTheJit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,11 @@ static void jitMethodSampleInterrupt(J9VMThread* vmThread, IDATA handlerKey, voi
* optimization that statistically should be useful.
*/
&& !compInfo->getCRRuntime()->shouldSuspendThreadsForCheckpoint()
#endif

/* Don't sample methods for recompilation pre-checkpoint if Debug On Restore is enabled */
&& (!jitConfig->javaVM->internalVMFunctions->isCheckpointAllowed(vmThread)
|| !jitConfig->javaVM->internalVMFunctions->isDebugOnRestoreEnabled(vmThread))
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
&& !compInfo->getPersistentInfo()->getDisableFurtherCompilation())
{
static char *enableDebugDLT = feGetEnv("TR_DebugDLT");
Expand Down Expand Up @@ -1424,6 +1428,10 @@ static void jitMethodSampleInterrupt(J9VMThread* vmThread, IDATA handlerKey, voi
* optimization that statistically should be useful.
*/
&& !compInfo->getCRRuntime()->shouldSuspendThreadsForCheckpoint()

/* Don't sample methods for recompilation pre-checkpoint if Debug On Restore is enabled */
&& (!jitConfig->javaVM->internalVMFunctions->isCheckpointAllowed(vmThread)
|| !jitConfig->javaVM->internalVMFunctions->isDebugOnRestoreEnabled(vmThread))
#endif
&& !compInfo->getPersistentInfo()->getDisableFurtherCompilation())
{
Expand Down

0 comments on commit f0d24de

Please sign in to comment.