-
Notifications
You must be signed in to change notification settings - Fork 733
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: Remove CRIU debug interpreter #19835
Comments
It seems like the next step is to complete the steps for removing the CRIU interpreter with the implementation that was started at singh264@b35f2b7. |
@tajila Just to clarify, in addition to the steps mentioned in the issue description, I am assuming the higher-level goal is to also remove all code associated with |
We have a Currently, My question is: what is the relationship now between i.e. for the new guard condition, do we have an An Or no relationship: |
@ThanHenderson For 0.48, this issue will need to be resolved by the end of this week. What's the current state of this issue? Based on this issue's impact, do we need it to be fixed in 0.48 or can it be pushed to 0.49? |
Based on my current understanding of the issue, I have a patch ready. Just waiting on some input on my comments above (#19835 (comment) and #19835 (comment)) to clarify some things. |
|
EDIT: DebugOnRestore doesnt cause us to transition to debug interpreter, but it is a require capability that enables us to transition under the presence of jit frames. |
Depending on the timing of when #19754 is merged either you or @JasonFengJ9 will need to request that |
Isn't that counter to the condition currently guarding the transition?: openj9/runtime/vm/CRIUHelpers.cpp Lines 1500 to 1501 in 0985ff3
At this point, we have, effectively:
There is a comment there that states that there is some missing JIT support which would change this to something like:
But from your explanation, it sounds like what we'd want instead is:
|
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Set transition flag if -XDump or -XTrace is specified Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
Yes, now I remember. The initial goal (in #17642) was to have the ability to force a transition to the debug interpreter immediately. If the JIT is disabled then we can perform the transition instantly with DebugOnRestore enables the ability for the JIT to support debugging capabilities, which allows for quicker transitions to the interpreter when debugging agents are enabled. But in its current state, it doesn't let us transition unconditionally. To achieve the initial goals (force immediate transition to the interpreter unconditionally) we need the ability to set an async event to transition to the interpreter (which is what Now back to this issue. The goal of this issue is to remove the criu interpreter so we only need to address the current cases where we rely on the criu interpreter and instead perform a transition to the debug interpreter. Previously the only case were we would need the transition was when So it makes sense to decouple the places that request a transition (-Xtrace, etc.) and the place we check and transition ( In the case of -Xtrace and -Xdump the JIT will just invalidate the code cache and generate new methods that support these capabilities so we dont need to worry about what JIT frames will do, we just need to make sure the interpreter is in the correct mode. In the case of java debugging (-Xrunjdwp...) its not enough to simply transition to the debug interpreter, we need the JVM to be in debugonrestore mode. However, this check can be done by the hook that will detect JDWP instead of checking in In the case -XX+DebugInterpreter, we can transition instantly under -Xint, however, if there are JIT'ed frames the transition is delayed or may never occur. Given that this is for diagnostic purpose Im okay with attempting the transition of the interpreter side anyways (we can improve on this in the future once we have the ability to decompile all java stacks). Note: this will be a change in behaviour. Given the above, what this means is that
|
That is what I was thinking. Thanks for the detailed explanation. It clarifies a lot.
This makes a lot of sense.
Sounds good. |
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Set transition flag if -XDump or -XTrace is specified - checkTransitionToDebugInterpreter becomes infallible - Remove unncessesary nls messages - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Set transition flag if -XDump or -XTrace is specified - checkTransitionToDebugInterpreter becomes infallible - Remove unnecessary nls messages - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Add criuRestoreCheckForDebugInterpreterRequest hook - Add criuRestoreCheckForJdwp hook - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
Closing via #20177 |
Issue Number: 19835 |
This is in the 0.48 milestone, are we planning to double deliver the update there? |
@pshipton I was going to open a PR for 0.48 shortly for this. It isn't pressing that it gets in, but if we are still delaying, we can deliver there too. |
#20191 Needs to merge into 0.48 first since my commit depends on the API changes there. |
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
We'll just keep this open until the PR for 0.48 is either delivered, or we decide not to. |
PR for 0.48 port: #20275 |
Issue Number: 19835 |
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
- Remove CRIUBytcodeInterpreterCompressed - Remove CRIUBytcodeInterpreterFull - Add J9VM_CRIU_TRANSITION_TO_DEBUG_INTERPRETER flag - Set transition flag if -Xdump, -Xtrace, or JDWP is specified - checkTransitionToDebugInterpreter becomes infallible - Call checkTransitionToDebugInterpreter after restore hooks Issues: eclipse-openj9#19835 Signed-off-by: Nathan Henderson <[email protected]>
The CRIU interpreter was added here, #17245, to do
Now that we have the ability to transition to the debug interpreter on restore, we no longer need the criu interpreter. Instead we can start with the standard interpreter, and transition to the debug interpreter if needed.
Steps
J9CRIUCheckpointState
called debugInterpreterRequestedcriuRestoreInitializeTrace
andcriuRestoreInitializeDump
set thedebugInterpreterRequested
to truecheckTransitionToDebugInterpreter
check if debugInterpreterRequested is set then attempt to transition to the debug interpreter.checkTransitionToDebugInterpreter
that looks for theVMOPT_XXDEBUGINTERPRETER
and move it to that function. It should set thedebugInterpreterRequested
if debug interpreter is there.checkTransitionToDebugInterpreter
to afterrunInternalJVMRestoreHooks
The text was updated successfully, but these errors were encountered: