-
Notifications
You must be signed in to change notification settings - Fork 728
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
Add support for -XX:[+/-]EnableDynamicAgentLoading flag #17215
Conversation
vm->extendedRuntimeFlags &= ~(UDATA)(J9_EXTENDED_RUNTIME_OSR_SAFE_POINT | (UDATA) J9_EXTENDED_RUNTIME_ENABLE_HCR); | ||
} else { | ||
vm->extendedRuntimeFlags |= (J9_EXTENDED_RUNTIME_OSR_SAFE_POINT | (UDATA)J9_EXTENDED_RUNTIME_ENABLE_HCR); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments:
-XX:[+|-]EnableDynamicAgentLoading
is a new option introduced since Java 9, and should not be applied to Java 8;- Is
-XX:[+|-]EnableDynamicAgentLoading
going to take precedence over-XX:[+|-]EnableHCR
or-XX:[+|-]OSRSafePoint
? if so, this code block needs to be after processing ofVMOPT_XXENABLEOSRSAFEPOINT
andVMOPT_XXENABLEHCR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider if it can apply to Java 8. As long as it doesn't change the default behaviour I don't see why it can't apply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-XX:[+|-]EnableHCR
and -XX:[+|-]OSRSafePoint
are Java 8 compatible, if there is a need to disable such capabilities for Java 8, existing flags can be applied.
If a new flag is introduced, we can apply it to Java 8 if required w/o changing default behaviours.
I've updated the wording in the issue, #17085. This PR is a good starting point. Additionally, we need to add the OSR/HCR flags whenever an agentlib is attached. We should also add a vm->extendedRuntimeFlag to toggles whether dynamic enablement of agents is possible or not. |
Is this change ready for merge? #17508 will need to use this option to determine if skipping jvmti notify can be skipped |
I guess this PR can be cherry-pick by |
Should be ready now. |
a023106
to
e724073
Compare
Issues should be fixed |
@JasonFengJ9 do you have any further concerns? |
d6bcdfd
to
591c814
Compare
@keithc-ca Any more concerns with this PR? |
@dnakamura can you address Keiths comment
|
@tajila should be fixed |
@keithc-ca any further concerns? |
@keithc-ca fixed |
The description and the commit summary could be improved; the option is for enabling or disabling dynamic agents. The reference to the issue helps, but people reviewing the commit history shouldn't need to consult the internet. |
Flag controls runtime loading of dynamic agents - When EnableDynamicAgentLoading is enabled, OSR/HCR flags are enabled and dynamic agent loading is also enabled. - When EnableDynamicAgentLoading is disabled, OSR/HCR flags default to off, and are enabled if/when agents are attached at startup. Dynamic loading of agents is disabled. Issue eclipse-openj9#17085 Signed-off-by: Devin Nakamura <[email protected]>
jenkins test sanity xlinux jdk20 |
jenkins compile win jdk11 |
Pls create a doc issue for the new option at https://github.com/eclipse-openj9/openj9-docs/issues/ |
Flag controls runtime loading of dynamic agents
Issue #17085