Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-06-01 Thread Serguei Spitsyn
On Wed, 31 May 2023 22:08:43 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> minor renaming in new test TestJcmdNoAgentLoad.java > > test/jdk/sun/tools/jcmd/TestJcmdNoAgentLoad.java line 68:

Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-06-01 Thread Chris Plummer
On Wed, 31 May 2023 10:30:22 GMT, Serguei Spitsyn wrote: >> The VM option EnableDynamicAgentLoading was added in JDK 9, default true, to >> allow deployment to choose whether to allow agents to be loaded/started in >> the VM. The VM option does the right thing for tools using the Attach API

Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-05-31 Thread Serguei Spitsyn
On Wed, 31 May 2023 11:07:02 GMT, Alan Bateman wrote: > Yes, maybe JvmtiAgentList::load_agent, JvmtiAgent::load, or > invoke_Agent_OnAttach. As part of the change to emit a warning when agent > code is loaded into a running VM, invoke_Agent_OnAttach needs to check if >

Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-05-31 Thread Alan Bateman
On Wed, 31 May 2023 10:34:56 GMT, Serguei Spitsyn wrote: > I was also thinking if this check has to be done in one place. Yes, maybe JvmtiAgentList::load_agent, JvmtiAgent::load, or invoke_Agent_OnAttach. As part of the change to emit a warning when agent code is loaded into a running VM,

Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-05-31 Thread Serguei Spitsyn
On Wed, 31 May 2023 10:30:22 GMT, Serguei Spitsyn wrote: >> The VM option EnableDynamicAgentLoading was added in JDK 9, default true, to >> allow deployment to choose whether to allow agents to be loaded/started in >> the VM. The VM option does the right thing for tools using the Attach API

Re: RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v2]

2023-05-31 Thread Serguei Spitsyn
> The VM option EnableDynamicAgentLoading was added in JDK 9, default true, to > allow deployment to choose whether to allow agents to be loaded/started in > the VM. The VM option does the right thing for tools using the Attach API but > jcmd JVMTI.agent_load was missed. This should be fixed to