-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRIU DebugOnRestore mode is disabled when debug events are hooked #20891
Conversation
3d718c4
to
aafa2b2
Compare
Marking this as WIP until a proper way determining the debug on restore mode is found. |
aafa2b2
to
2d0e38e
Compare
2d0e38e
to
a048979
Compare
jenkins test sanity alinux jdk21 |
jenkins test sanity,extended.functional xlinux jdk17 |
Looking into it. |
isDebugOnRestoreEnabled() returns false if some debug-specific flags/events are enabled/hooked, this matches J9::Options::isFSDNeeded() in compiler/control/J9Options.cpp; DebugOnRestore mode is enabled when CRIU is enabled, -XX:+DebugOnRestore is specified, JDWP is not enabled, and no debug-specific flags/events are enabled/hooked; When DebugOnRestore mode is enabled, debug related events and hooks can't be enabled or hooked pre-checkpoint, isDebugAgentDisabled() returns TRUE in this case, otherwise FALSE; Moved the agent load/start into criuRestoreInitializeLib() triggered by TRIGGER_J9HOOK_VM_PREPARING_FOR_RESTORE; Avoid AddCapabilities() for can_generate_single_step_events/can_generate_frame_pop_events/can_generate_field_modification_events/can_generate_field_access_events such that JIT won't enter FSD post-restore if there is no JDWP agent specified within the restore option file; Renamed jvmtiHookVMRestoreCRIUInit() to jvmtiHookVMPreparingForRestore(), and jvmtiHookVMRestoreStartAgent() to jvmtiHookVMCRIURestore(). Signed-off-by: Jason Feng <[email protected]>
a048979
to
ab9186f
Compare
Moved the agent load/start into This still allows JDWP agents to be enabled post-retore. @tajila This is ready for another look. |
jenkins test sanity,extended.functional xlinux jdk17 |
CRIU
DebugOnRestore
mode is disabled when debug events are hookedisDebugOnRestoreEnabled()
returnsfalse
if some debug-specific flags/events are enabled/hooked, this matchesJ9::Options::isFSDNeeded()
incompiler/control/J9Options.cpp
;DebugOnRestore
mode is enabled when CRIU is enabled,-XX:+DebugOnRestore
is specified, JDWP is not enabled, and no debug-specific flags/events are enabled/hooked;DebugOnRestore
mode is enabled, debug-related events and hooks can't be enabled or hooked pre-checkpoint,isDebugAgentDisabled()
returnsTRUE
in this case, otherwiseFALSE
;criuRestoreInitializeLib()
triggered byTRIGGER_J9HOOK_VM_PREPARING_FOR_RESTORE
;AddCapabilities()
forcan_generate_single_step_events
/can_generate_frame_pop_events
/can_generate_field_modification_events
/can_generate_field_access_events
such that JIT won't enterFSD
post-restore if there is noJDWP
agent specified within the restore option file;jvmtiHookVMRestoreCRIUInit()
tojvmtiHookVMPreparingForRestore()
, andjvmtiHookVMRestoreStartAgent()
tojvmtiHookVMCRIURestore()
to match the hook trigger events.Signed-off-by: Jason Feng [email protected]