RFR: 8312072: Deprecate for removal the -Xnoagent option

Alan Bateman alanb at openjdk.org
Fri Jul 14 08:23:25 UTC 2023


On Fri, 14 Jul 2023 07:34:03 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which proposes to deprecate `-Xnoagent` option of the `java` command? This addresses https://bugs.openjdk.org/browse/JDK-8312072.
> 
> As noted in the JBS issue, this option currently is a no-op and provides no functionality. The commit in this PR logs a deprecation warning if this option is used when launching `java`.
> 
> Additionally, this PR also cleans up one such usage that I found in the JDK code.
> 
> `tier1`, `tier2` and `tier3` tests passed with this change. A CSR has been proposed for this deprecation https://bugs.openjdk.org/browse/JDK-8312073.

The debugger agent in Classic VM was sun.tools.agent.Agent, pre-dates JPDA. I think -Xnoagent was the option to turn it off, like the equivalent of -Xdebugport=-1. Ancient history now, hasn't been needed in 20+ years. I suppose it is baked in some old scripts so printing a warning before its removal is good. We should be able to remove it from our tests too, looks like there are some left overs in test/hotspot/jtreg/vmTestbase/nsk/jdi.

The changes makes me wonder if we should do the same for -Xdebug.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14882#issuecomment-1635486207



More information about the build-dev mailing list