-
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 #1174
Documentation for -XX:[+|-]EnableDynamicAgentLoading #1174
Conversation
Jenkins doc stage |
1 similar comment
Jenkins doc stage |
@JasonFengJ9 - I have updated the documents. Please check and confirm. Thanks! |
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.
@Sreekala-Gopakumar I made a few clarifications, please let me know if you have further questions.
@@ -0,0 +1,60 @@ | |||
<!-- | |||
* Copyright (c) 2017, 2023 IBM Corp. and others |
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.
* Copyright (c) 2017, 2023 IBM Corp. and others | |
* Copyright (c) 2023, 2023 IBM Corp. and others |
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.
As per the Contribution guidelines, copyright dates are not changed, even for a new topic; the dates refer to the complete documentation set, not to individual files and so should be the same in all topics.
https://github.com/eclipse-openj9/openj9-docs/blob/master/CONTRIBUTING.md#style-guidelines
docs/xxenabledynamicagentloading.md
Outdated
|
||
You can disable the dynamic loading of the agents into a VM after startup with the `-XX:-EnableDynamicAgentLoading` option. | ||
|
||
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option and the same agents were not loaded at startup by using the [command-line options](interface_jvmti.md#overview): |
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.
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option and the same agents were not loaded at startup by using the [command-line options](interface_jvmti.md#overview): | |
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option and the same agents were not loaded before at startup by using the [command-line options](interface_jvmti.md#overview) or an earlier dynamical loading, i.e., the warnings are only issued once even if it is dynamically loaded multiple times: |
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.
@JasonFengJ9 - If the agents are loaded dynamically into a running VM after startup after specifying the -XX:+EnableDynamicAgentLoading
option, but the same agents were loaded before, the warnings will be issued?
the warnings are only issued once even if it is dynamically loaded multiple times:
I am not clear about this. if an agent is loaded without the XX:+EnableDynamicAgentLoading
option multiple times. then won't the warnings be issued each time that agent is loaded?
Also, if the agent was loaded at startup with the command-line option or through dynamic loading (with the XX:+EnableDynamicAgentLoading
option), then if that same agent is dynamically loaded again but without the XX:+EnableDynamicAgentLoading
option, then the warning will be issued, right?
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.
If the agents are loaded dynamically into a running VM after startup after specifying the -XX:+EnableDynamicAgentLoading option, but the same agents were loaded before, the warnings will be issued?
If -XX:+EnableDynamicAgentLoading
is specified which is only possible at the VM startup command line options, there will be NO warnings always.
the warnings are only issued once even if it is dynamically loaded multiple times:
I am not clear about this. if an agent is loaded without the XX:+EnableDynamicAgentLoading option multiple times. then won't the warnings be issued each time that agent is loaded?
The warnings only appear once for the same agent when -XX:+EnableDynamicAgentLoading
is not specified.
Also, if the agent was loaded at startup with the command-line option or through dynamic loading (with the XX:+EnableDynamicAgentLoading option), then if that same agent is dynamically loaded again but without the XX:+EnableDynamicAgentLoading option, then the warning will be issued, right?
Note that -XX:+EnableDynamicAgentLoading
is a JVM startup command line option and affects all agent loading afterwards, i.e., if it is set at startup, all agents dynamically loaded regardless of their names/paths are considered approved by the application owner, and no warnings will be issued.
docs/xxenabledynamicagentloading.md
Outdated
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 | ||
``` | ||
AIX® systems cannot detect whether an agent library was previously loaded at startup or not. Therefore, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the agent was loaded through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) |
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.
AIX® systems cannot detect whether an agent library was previously loaded at startup or not. Therefore, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the agent was loaded through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) | |
AIX® systems cannot detect whether an agent library was previously loaded or not if the library was loaded through a different name and path. Therefore, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the agent was loaded through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. If a library is loaded with the same name or absolute path multiple times, OpenJ9 JVM can detect that and only issue one warning message which is not AIX-specific capability. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) |
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.
@JasonFengJ9 - What do you mean by "only issue one warning message which is not AIX-specific capability"?
...the warnings are issued when an agent is loaded dynamically through the Attach API (
VirtualMachine.loadAgentLibrary(agent)
) even if the agent was loaded through the command-line option (-agentpath:/Absolute/Path/to/agentLibrary
) at startup.
Here, you mean " when an agent is loaded dynamically with the -XX:+EnableDynamicAgentLoading
option"?
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.
What do you mean by "only issue one warning message which is not AIX-specific capability"?
If an agent is loaded dynamically with the same name or absolute path, OpenJ9 VM is able to compare it with previously loaded libraries and determine if it was already loaded, in case the agent library was loaded before, no more warnings are issued.
However, if the same library is loaded differently, for example, one with a platform-independent name such as VirtualMachine.loadAgentLibrary(agent)
, and the other with an absolute file path -agentpath:/Absolute/Path/to/agentLibrary
, this use case requires the OS API to determine if the same library was loaded, AIX doesn't have such APIs like other platforms supported by OpenJ9, hence another warnings will be issued.
5824eb1
to
80bfe9a
Compare
Jenkins doc stage |
@JasonFengJ9 - I have incorporated the changes. Please check and confirm. Thanks! |
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 few more minor comments, please incorporate them.
docs/xxenabledynamicagentloading.md
Outdated
|
||
You can disable the dynamic loading of the agents into a VM after startup with the `-XX:-EnableDynamicAgentLoading` option. | ||
|
||
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option. These warnings are not issued if the same agents were loaded before at startup either by using the [command-line options](interface_jvmti.md#overview) or an earlier dynamic loading. |
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.
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option. These warnings are not issued if the same agents were loaded before at startup either by using the [command-line options](interface_jvmti.md#overview) or an earlier dynamic loading. | |
![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) 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 `-XX:+EnableDynamicAgentLoading` option. These warnings are not issued if the same agents were loaded before either by using the [command-line options](interface_jvmti.md#overview) at startup or an earlier dynamic loading. |
Note: an agent dynamic loading always occurs after VM startup.
docs/xxenabledynamicagentloading.md
Outdated
|
||
These warnings are issued only once for the same agent when the `-XX:+EnableDynamicAgentLoading` option is not specified. | ||
|
||
If the `-XX:+EnableDynamicAgentLoading` option is set at startup, all agents that are dynamically loaded are considered as approved by the application owner, and therefore, no warnings are issued. |
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.
Also, note here that a command line option can only be specified at VM startup, not sure if "at startup" here is required.
docs/xxenabledynamicagentloading.md
Outdated
|
||
If the `-XX:+EnableDynamicAgentLoading` option is set at startup, all agents that are dynamically loaded are considered as approved by the application owner, and therefore, no warnings are issued. | ||
|
||
Eclipse OpenJ9™ supported operating systems other than AIX® have APIs to determine whether the same agent was loaded before or not, even if an agent is loaded with the same or different name and absolute path. |
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.
Eclipse OpenJ9™ supported operating systems other than AIX® have APIs to determine whether the same agent was loaded before or not, even if an agent is loaded with the same or different name and absolute path. | |
Eclipse OpenJ9™ supported operating systems other than AIX® have APIs to determine whether the same agent was loaded before or not, even if an agent is loaded with a platform-independent name or an absolute path to the platform-dependent library. |
docs/xxenabledynamicagentloading.md
Outdated
|
||
Eclipse OpenJ9™ supported operating systems other than AIX® have APIs to determine whether the same agent was loaded before or not, even if an agent is loaded with the same or different name and absolute path. | ||
|
||
AIX systems cannot detect whether an agent was previously loaded or not if the agent was loaded through a different name or path. Therefore, on AIX systems, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the same agent was loaded before through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) |
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.
AIX systems cannot detect whether an agent was previously loaded or not if the agent was loaded through a different name or path. Therefore, on AIX systems, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the same agent was loaded before through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) | |
AIX systems cannot detect whether an agent was previously loaded or not if the agent was loaded through a platform-independent name or an absolute path to the platform-dependent library. Therefore, on AIX systems, the warnings are issued when an agent is loaded dynamically through the Attach API (`VirtualMachine.loadAgentLibrary(agent)`) even if the same agent was loaded before through the command-line option (`-agentpath:/Absolute/Path/to/agentLibrary`) at startup. ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png) |
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>
80bfe9a
to
b30629c
Compare
Jenkins doc stage |
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.
LGTM
Thanks @Sreekala-Gopakumar
@JasonFengJ9 - I have updated the documents. Please check and confirm. Thanks! |
Jenkins doc stage |
#1140
Created a new topic for the -XX:[+|-]EnableDynamicAgentLoading option Updated the related topics.
Closes #1140
Signed-off-by: Sreekala Gopakumar sreekala.gopakumar@ibm.com