-
Notifications
You must be signed in to change notification settings - Fork 73
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
Documentation for -XX:[+|-]EnableDynamicAgentLoading #1140
Comments
We should also mention the new jcmd supported command JVMTI.agent_load, at least in the release notes. |
|
@JasonFengJ9 - What was the reason for introducing this new option? What was going wrong in the absence of this option? What is the default setting for this option? The following line was not clear
The "unless -XX:-EnableDynamicAgentLoading is specified" is confusing. Is "dynamic loading of JVM TI agents" different from specifying |
This is a JEP 451 requirement.
The current default setting is
Correct, |
@JasonFengJ9 - Is the following content correct? "With the Attach API, your application can connect to a running VM and load an agent dynamically into that VM to run tasks. Some libraries misuse the Attach API to dynamically load an agent to run tasks without the approval of the application owner. You can disable the dynamic loading of the agents into a VM after startup with the For Java™ 21 and later, the following warnings are issued when the agents are loaded dynamically into a running VM after startup without specifying the
|
@JasonFengJ9 - I also need a clarification regarding "...or the agent hasn't been loaded" as mentioned in the issue #1140 (comment). Does it mean that warnings are issued even if the |
@Sreekala-Gopakumar I made some modifications according to a later PR
Please match the updated issue description. |
Thanks, Jason! |
eclipse-openj9#1140 Created a new topic for the -XX:[+|-]EnableDynamicAgentLoading option Updated the related topics. Closes eclipse-openj9#1140 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
eclipse-openj9#1140 Created a new topic for the -XX:[+|-]EnableDynamicAgentLoading option Updated the related topics. Incorporated the review feedback. Closes eclipse-openj9#1140 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
eclipse-openj9#1140 Created a new topic for the -XX:[+|-]EnableDynamicAgentLoading option Updated the related topics. Incorporated the review feedback. Closes eclipse-openj9#1140 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
Issue or pull request number:
Overview:
For Java 8 and later, the dynamic loading of JVM TI agents is enabled by default unless
-XX:-EnableDynamicAgentLoading
is specified.For Java 21 and later, the following warnings are issued when an agent is loaded dynamically into a running VM after startup without specifying the -XX:+EnableDynamicAgentLoading option and the same agent wasn't loaded before:
WARNING: A {Java,JVM TI} agent has been loaded dynamically (file:/u/bob/agent.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
For
AIX
platform that can't detect if an agent library was previously loaded, the warnings will be issued when an agent is loaded dynamically through Attach APIVirtualMachine.loadAgentLibrary(agent)
even if the agent was loaded via the command line-agentpath:/Absolute/Path/to/agentLibrary
at startup.Release target:
Eclipse OpenJ9 0.41.0
Applies to the following JDK versions:
-XX:[+|-]EnableDynamicAgentLoading
- 8 and laterIssuing the warning message - 21 and later
Applies to the following platforms:
All platforms
For new command line options:
The text was updated successfully, but these errors were encountered: