Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8312150: Remove -Xnoagent option #17032

Closed
wants to merge 1 commit into from
Closed

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Dec 8, 2023

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8312150: Remove -Xnoagent option (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17032/head:pull/17032
$ git checkout pull/17032

Update a local copy of the PR:
$ git checkout pull/17032
$ git pull https://git.openjdk.org/jdk.git pull/17032/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17032

View PR using the GUI difftool:
$ git pr show -t 17032

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17032.diff

Webrev

Link to Webrev Comment

@jaikiran
Copy link
Member Author

jaikiran commented Dec 8, 2023

/csr needed

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 8, 2023

👋 Welcome back jpai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added rfr Pull request is ready for review csr Pull request needs approved CSR before integration labels Dec 8, 2023
@openjdk
Copy link

openjdk bot commented Dec 8, 2023

@jaikiran has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@jaikiran please create a CSR request for issue JDK-8312150 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@openjdk
Copy link

openjdk bot commented Dec 8, 2023

@jaikiran The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Dec 8, 2023
@mlbridge
Copy link

mlbridge bot commented Dec 8, 2023

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option has been useless for 20+ years but wouldn't surprise me if there are still scripts using it. I see you have the release-note=yes label as a reminder to add a release note, good.

@jaikiran
Copy link
Member Author

/csr unneeded

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Dec 14, 2023
@openjdk
Copy link

openjdk bot commented Dec 14, 2023

@jaikiran determined that a CSR request is not needed for this pull request.

@openjdk
Copy link

openjdk bot commented Dec 14, 2023

@jaikiran This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8312150: Remove -Xnoagent option

Reviewed-by: dholmes, alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 50 new commits pushed to the master branch:

  • cf94854: 8321565: [REDO] Heap dump does not contain virtual Thread stack references
  • 7ece9e9: 8321400: java/foreign/TestStubAllocFailure.java fails with code cache exhaustion
  • 9320ef9: 8321973: Parallel: Remove unused methods in AdaptiveSizePolicy
  • 2a565ff: 8321808: G1: Use unsigned type for non-negative G1 flags
  • 493b5bd: 8293622: Cleanup use of G1ConcRefinementThreads
  • f573f6d: 8321515: ARM32: Move method resolution information out of the cpCache properly
  • 8a0a6f8: 8321279: Implement hashCode() in Heap-X-Buffer.java.template
  • 3d9d353: 8321825: Remove runtime/CompressedOops/CompressedClassPointers.java from the ProblemList
  • 1b621f5: 8321474: TestAutoCreateSharedArchiveUpgrade.java should be updated with JDK 21
  • 5463c9c: 8321557: Move SOURCE line verification for OracleJDK out of OpenJDK
  • ... and 40 more: https://git.openjdk.org/jdk/compare/cb7e3d263a6ed65257b316ffcbbd5e19142eb8d1...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 14, 2023
@jaikiran
Copy link
Member Author

Thank you David and Alan for the reviews.

I've removed the CSR label from this PR based on David's input (I checked with Joe too).

This option has been useless for 20+ years but wouldn't surprise me if there are still scripts using it.

Right - we have had several projects where this has been either copy/pasted or auto-generated in build.xml files. The EA release for 23, along with the release note, should help projects remove this usage.

I will go ahead and integrate this later in the day today.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 14, 2023

Going to push as commit d2ba3b1.
Since your change was applied there have been 53 commits pushed to the master branch:

  • d632d74: 8321820: TestLoadNIdeal fails on 32-bit because -XX:+UseCompressedOops is not recognized
  • ddbbd36: 8320279: Link issues in java.xml module-info.java
  • c8ad7b7: 8321974: Crash in ciKlass::is_subtype_of because TypeAryPtr::_klass is not initialized
  • cf94854: 8321565: [REDO] Heap dump does not contain virtual Thread stack references
  • 7ece9e9: 8321400: java/foreign/TestStubAllocFailure.java fails with code cache exhaustion
  • 9320ef9: 8321973: Parallel: Remove unused methods in AdaptiveSizePolicy
  • 2a565ff: 8321808: G1: Use unsigned type for non-negative G1 flags
  • 493b5bd: 8293622: Cleanup use of G1ConcRefinementThreads
  • f573f6d: 8321515: ARM32: Move method resolution information out of the cpCache properly
  • 8a0a6f8: 8321279: Implement hashCode() in Heap-X-Buffer.java.template
  • ... and 43 more: https://git.openjdk.org/jdk/compare/cb7e3d263a6ed65257b316ffcbbd5e19142eb8d1...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 14, 2023
@openjdk openjdk bot closed this Dec 14, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 14, 2023
@openjdk
Copy link

openjdk bot commented Dec 14, 2023

@jaikiran Pushed as commit d2ba3b1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jaikiran jaikiran deleted the 8312150 branch December 14, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants