RFR: 8312150: Remove -Xnoagent option

David Holmes dholmes at openjdk.org
Mon Dec 11 04:37:12 UTC 2023


On Fri, 8 Dec 2023 08:31:55 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which proposes to remove the `-Xnoagent` option of the `java` command? This addresses https://bugs.openjdk.org/browse/JDK-8312150.
> 
> In Java 22, we already deprecated this option for removal through https://bugs.openjdk.org/browse/JDK-8312073. As noted in that CSR, this option has been a no-op for several releases now and has been ignored by the `java` command. The option isn't part of any documented options either. In Java 22, the usage of this option will print a warning.
> 
> In Java 23 and above, with the current proposed change in this PR, the usage of this option will no longer be supported and it will start throwing an error just like any other unsupported option:
> 
> 
> java -Xnoagent -version
> Unrecognized option: -Xnoagent
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> 
> Having looked at some available data at hand, there are projects/builds which have been using this option (mostly due to copy/paste) and they will be impacted by this. So it will be good to do this change early during the 23 release cycle to allow the impacted projects to notice this change and update their launch scripts accordingly.
> 
> tier1, tier2 and tier3 tests continue to pass with this change. I'll create a CSR shortly.

Changes look good.

I don't think a CSR request is necessary for the actual removal, given it was approved to be removed at some point after deprecation. With hotspot flags we cover deprecation, obsoletion and removal with a single CSR request at deprecation time.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17032#pullrequestreview-1774268421


More information about the hotspot-runtime-dev mailing list