Skip to content

8382582: Remove the experimental JVMCI feature#30834

Open
mhaessig wants to merge 63 commits into
openjdk:masterfrom
mhaessig:remove-jvmci
Open

8382582: Remove the experimental JVMCI feature#30834
mhaessig wants to merge 63 commits into
openjdk:masterfrom
mhaessig:remove-jvmci

Conversation

@mhaessig
Copy link
Copy Markdown
Contributor

@mhaessig mhaessig commented Apr 21, 2026

This PR removes the experimental JVMCI feature and all usages and references of it, including references to Graal. For more details on the rationale, please see the issue description.

This change was constructed in several steps:

  1. Remove all folders directly related to JVMCI.
  2. Go through one folder at a time and remove code relating to matches for the regex ([Jj][Vv][Mm][Cc][Ii])|([Gg]raal)|vm\.ci|[Gg]alahad and immediately obvious dead code.
  3. Filter the git blame for each file for JVMCI related commits and check if that code is now dead.

Note to Reviewers

Each commit is limited to a subfolder or a change spanning further so you can take look at a piece of the codebase you are familiar with. I recommend you look at individual commits and select "Ignore Whitespace" in the Github UI.

Testing

  • Github Actions
  • tier1-6 linux-x64, linux-aarch64, windows-x64, macosx-aarch64, macosx-x64
  • build linux-zero, linux-arm, linux-riscv, linux-ppc (LE & BE) fastdebug with features C1+C2, C2 only, C1 only


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8385105 to be approved
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

  • JDK-8382582: Remove the experimental JVMCI feature (Enhancement - P4)
  • JDK-8385105: Remove the experimental JVMCI feature (CSR)

Reviewers

Contributors

  • Tobias Hartmann <thartmann@openjdk.org>
  • Mikael Vidstedt <mikael@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30834

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Apr 21, 2026

👋 Welcome back mhaessig! 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.

@mhaessig
Copy link
Copy Markdown
Contributor Author

/contributor add @TobiHartmann
/contributor add @vidmik

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

@mhaessig 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:

8382582: Remove the experimental JVMCI feature

Co-authored-by: Tobias Hartmann <thartmann@openjdk.org>
Co-authored-by: Mikael Vidstedt <mikael@openjdk.org>
Reviewed-by: liach, kvn, stefank, coleenp, erikj, vlivanov, cjplummer, 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 6 new commits pushed to the master branch:

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
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

@mhaessig
Contributor Tobias Hartmann <thartmann@openjdk.org> successfully added.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

@mhaessig
Contributor Mikael Vidstedt <mikael@openjdk.org> successfully added.

@openjdk openjdk Bot added javadoc javadoc-dev@openjdk.org serviceability serviceability-dev@openjdk.org security security-dev@openjdk.org hotspot hotspot-dev@openjdk.org build build-dev@openjdk.org nio nio-dev@openjdk.org ide-support ide-support-dev@openjdk.org core-libs core-libs-dev@openjdk.org net net-dev@openjdk.org compiler compiler-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Apr 21, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

@mhaessig The following labels will be automatically applied to this pull request:

  • build
  • compiler
  • core-libs
  • hotspot
  • ide-support
  • javadoc
  • net
  • nio
  • security
  • serviceability
  • shenandoah

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

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

Comment thread src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java
Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Core library changes look fine.

Comment thread src/java.base/share/classes/jdk/internal/vm/VMSupport.java
@wangweij
Copy link
Copy Markdown
Contributor

/label remove security

@openjdk openjdk Bot removed the security security-dev@openjdk.org label Apr 23, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 23, 2026

@wangweij
The security label was successfully removed.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 23, 2026

@mhaessig this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout remove-jvmci
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk Bot added the merge-conflict Pull request has merge conflict with target branch label Apr 23, 2026
@openjdk openjdk Bot added security security-dev@openjdk.org and removed merge-conflict Pull request has merge conflict with target branch labels Apr 24, 2026
Copy link
Copy Markdown
Contributor Author

@mhaessig mhaessig left a comment

Choose a reason for hiding this comment

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

Thank you all for reviewing. I addressed all of your comments in the new commits and I merged master.

Comment thread src/java.base/share/man/java.md
Comment thread test/jdk/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java Outdated
Comment thread src/hotspot/share/compiler/compiler_globals.hpp
Comment thread src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Comment thread src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
Comment thread src/hotspot/share/code/nmethod.cpp Outdated
Comment thread src/hotspot/share/compiler/compileBroker.cpp Outdated
@@ -1771,28 +1765,18 @@ class vector_VectorPayload : AllStatic {
};

class java_lang_Integer : AllStatic {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in cf16786. I think those are the ones you meant?

Comment thread src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompilerThread.java Outdated
@openjdk openjdk Bot removed the ready Pull request is ready to be integrated label May 18, 2026
Copy link
Copy Markdown
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

SA changes look good.

Copy link
Copy Markdown
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.

All good, I don't have any other questions/comments.

Copy link
Copy Markdown
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 18, 2026
Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Core libs and javadoc changes look trivially fine.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't know if we want to remove this file or do the jdk.jsobject-style removal in the symbols - it might be okay for us to nuke these internal modules this way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm.

I think removing the files for JDK releases from "M" (i.e. 22) through "R" (i.e. 27) i needs some more consideration, Removing the files in the current release is much less problematic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/csr needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I somehow missed this. Normally, I would say the historical data (i.e. src/jdk.compiler/share/data/symbols) should not be touched when removing something. But, in this case, these files seem more like an accident than real history. They are not used (not used in symbols), and so are not part of ct.sym, and so do not affect --release. It is possible the script malfunctioned when producing the historical record for JDK 22, as there are a few more files like this for JDK 22 (jdk.internal.ed-M.sym.txt, jdk.internal.jvmstat-M.sym.txt, jdk.internal.le-M.sym.txt, jdk.internal.opt-M.sym.txt).

So, I am fine with removing JVMCI-related files. Separately, we might look at cleaning up the other stray JDK 22 files and/or investigating what happened.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the analysis @lahodaj .

Copy link
Copy Markdown
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

The classfile code looks good. Thanks for the extra cleanup.

@jddarcy
Copy link
Copy Markdown
Member

jddarcy commented May 19, 2026

/csr needed

@openjdk openjdk Bot added the csr Pull request needs approved CSR before integration label May 19, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 19, 2026

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

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

@openjdk openjdk Bot removed the ready Pull request is ready to be integrated label May 19, 2026
@vnkozlov
Copy link
Copy Markdown
Contributor

I don't know if we want to remove this file or do the jdk.jsobject-style removal in the symbols - it might be okay for us to nuke these internal modules this way.

I think removing the files for JDK releases from "M" (i.e. 22) through "R" (i.e. 27) i needs some more consideration, Removing the files in the current release is much less problematic.

Note, JVMCI was always JDK internal experimental feature. javac --release applies to public Java API

I am not sure what the goal of CSR will be here.

@vnkozlov
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Removal of the javac symbol files should be fine. javac's --add-modules already does not work with --release for these removed modules.

@openjdk openjdk Bot removed the csr Pull request needs approved CSR before integration label May 22, 2026
Copy link
Copy Markdown
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 22, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Copyright year not updated here (other files were bumped to 2026).

Suggested change
* Copyright (c) 2007, 2026, Oracle and/or its affiliates. All rights reserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org ide-support ide-support-dev@openjdk.org javadoc javadoc-dev@openjdk.org net net-dev@openjdk.org nio nio-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.