PRE-RFR: 8177154: Default configuration should disallow loading agents
forax at univ-mlv.fr
Fri Mar 24 09:34:39 UTC 2017
can we have a discussion on the merit of not of allowing loadAgent by default before discussing about how to implement that.
There is only one interesting method in VirtualMachine, loadAgent, and if this method do not work by default,
there is no point to have the whole API. If you have to specify a command line flag at load time, why not deploy the agent at load time.
So like David Holmes said in the comments of the bug, i don't understand how this will not disrupt every codes that using an agent at runtime.
One of strong feature that makes choosing Java on server is that you can attach, at runtime, a monitoring/troubleshooting tool when an event occurs,
please do not send us back to the pre Java 6 world !
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "serguei spitsyn" <serguei.spitsyn at oracle.com>, "serviceability-dev" <serviceability-dev at openjdk.java.net>,
> hotspot-runtime-dev at openjdk.java.net
> Envoyé: Vendredi 24 Mars 2017 09:59:09
> Objet: Re: PRE-RFR: 8177154: Default configuration should disallow loading agents
> On 24/03/2017 08:45, serguei.spitsyn at oracle.com wrote:
>> Please, pre-review the JDK 9 fix for:
>> JDK webrev:
>> Hotspot webrev:
> A few initial comment:
> I don't think the jdk side should be dependent on the message in the
> reply, it might be simpler to do:
> throw new AgentLoadException("Failed to load agent library: " + message)
> As you are changing RunnerUtil then it would be good to trim down the
> line that sets myArgs as it is way too long now for side-by-side reviews.
> On the hotspot side then the flag name looks okay to me. In the message
> then "Use flag -XX:..." should be reduced to "Use -XX:..." to term the
> term "flag" out of the message.
More information about the hotspot-runtime-dev