The issue was noticed by JDK-8353938. There are related context on both JDK-8353938 and https://github.com/openjdk/jdk/pull/24497 comments.
From jcmd man page:
```
JVMTI.agent_load [arguments]
Loads JVMTI native agent.
Impact: Low
arguments:
library path: Absolute path of the JVMTI agent to load. (STRING, no default value)
agent option: (Optional) Option string to pass the agent. (STRING, no default value)
```
With static JDK support, when an agent library is statically linked (built-in) with the launcher executable, the underlying JDK/VM is able to find/load the built-in native agent even though there is no lib<agent>.so available, if one specifies the command as below:
JVMTI.agent_load lib<agent>.so
In the above example, the native agent is specified without providing the absolute path.
With the static support, when the agent is statically linked, specifying a native agent as a shared library for the `JVMTI.agent_load` command may trigger questions. It might be helpful to clarify the command argument for such usage and describe that the built-in agent library would be found and loaded in such a case. An alternative suggestion from [~alanb] is to provide a different command or argument so one could specify the native agent name instead of in path format.
From jcmd man page:
```
JVMTI.agent_load [arguments]
Loads JVMTI native agent.
Impact: Low
arguments:
library path: Absolute path of the JVMTI agent to load. (STRING, no default value)
agent option: (Optional) Option string to pass the agent. (STRING, no default value)
```
With static JDK support, when an agent library is statically linked (built-in) with the launcher executable, the underlying JDK/VM is able to find/load the built-in native agent even though there is no lib<agent>.so available, if one specifies the command as below:
JVMTI.agent_load lib<agent>.so
In the above example, the native agent is specified without providing the absolute path.
With the static support, when the agent is statically linked, specifying a native agent as a shared library for the `JVMTI.agent_load` command may trigger questions. It might be helpful to clarify the command argument for such usage and describe that the built-in agent library would be found and loaded in such a case. An alternative suggestion from [~alanb] is to provide a different command or argument so one could specify the native agent name instead of in path format.
- relates to
-
JDK-8353938 hotspot/jtreg/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java fails on static JDK
-
- Resolved
-