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

8271598: CDS classlist file should support uber JARs #5876

Closed

Conversation

calvinccheung
Copy link
Member

@calvinccheung calvinccheung commented Oct 9, 2021

Currently, for archive classes for custom loaders, CDS supports the following source locations in the classlist:
/some/dir
/some/file.jar

However, some apps packaged in an uber jar load classes using custom loaders from locations such as the following:
jar:file:/some/file.jar!/another/file2.jar!/
jar:file:/some/file.jar!/another/dir!/

This RFE adds support for the above locations in the classlist and load classes from the above locations during
CDS static dump. The implementation of class loading is in the UberJarUtils and related classes. The
UberJarUtils.loadClass() is the static method called by the VM during CDS static dump for loading classes.
Since the UberJarUtils class also handles existing source locations (simple directory and jar), the existing implementation
in the VM could be simplified.

Testing:

  • tiers 1 - 4 (including the new test)

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8271598: CDS classlist file should support uber JARs

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5876/head:pull/5876
$ git checkout pull/5876

Update a local copy of the PR:
$ git checkout pull/5876
$ git pull https://git.openjdk.java.net/jdk pull/5876/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5876

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5876.diff

@calvinccheung
Copy link
Member Author

/label add hotpot-runtime

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 9, 2021

👋 Welcome back ccheung! 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
Copy link

openjdk bot commented Oct 9, 2021

@calvinccheung The label hotpot-runtime is not a valid label. These labels are valid:

  • serviceability
  • hotspot
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • hotspot-runtime
  • jmx
  • build
  • nio
  • client
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr

@openjdk
Copy link

openjdk bot commented Oct 9, 2021

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

  • core-libs
  • hotspot

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 openjdk bot added hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Oct 9, 2021
@calvinccheung
Copy link
Member Author

/label remove hotspot
/label add hotspot-runtime

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Oct 9, 2021
@openjdk
Copy link

openjdk bot commented Oct 9, 2021

@calvinccheung
The hotspot label was successfully removed.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Oct 9, 2021
@openjdk
Copy link

openjdk bot commented Oct 9, 2021

@calvinccheung
The hotspot-runtime label was successfully added.

@calvinccheung
Copy link
Member Author

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Oct 9, 2021
@openjdk
Copy link

openjdk bot commented Oct 9, 2021

@calvinccheung
The core-libs label was successfully removed.

@calvinccheung calvinccheung marked this pull request as ready for review October 9, 2021 00:29
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 9, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 9, 2021

Webrevs

@AlanBateman
Copy link
Contributor

/label add core-libs

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Oct 9, 2021
@openjdk
Copy link

openjdk bot commented Oct 9, 2021

@AlanBateman
The core-libs label was successfully added.

@AlanBateman
Copy link
Contributor

I've added the core-libs label to this issue as this will require wider discussion, detailed review of the classes that are being added to jdk.internal.misc, and a discussion as to whether this is the right place.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 6, 2021

@calvinccheung This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 4, 2021

@calvinccheung This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org rfr Pull request is ready for review
2 participants