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

8295029: runtime/cds/appcds/LotsOfClasses.java fail with jfx #10708

Closed
wants to merge 1 commit into from

Conversation

coleenp
Copy link
Contributor

@coleenp coleenp commented Oct 14, 2022

This removes the can-resize parameter for ClassLoaderData dictionaries. They can all resize now that the shared dictionaries are moved to the CompactHashtable. This also removes an unused/untested development option to disallow resizing.
Tested with tiers1-4 and tested with the failing test case. It can't be added because it requires outside code or simulated because it would be an expensive test to generate all those class files. There's an existing test for resizing.


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-8295029: runtime/cds/appcds/LotsOfClasses.java fail with jfx

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10708

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2022

👋 Welcome back coleenp! 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 14, 2022

@coleenp 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 Oct 14, 2022
@xiangzhai
Copy link
Member

I still have to write a test case.

Yes, the testcase needs to simulate a large number of (about 60189 - 49191) classes just like import javafx modular.

Thanks,
Leslie Zhai

@coleenp coleenp marked this pull request as ready for review October 17, 2022 12:38
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 17, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2022

Webrevs

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

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

LGTM. I agree that if the test is too hard to write (it depends on the exact names of classes being loaded) then we can skip it, because the code change is pretty simple -- it removes a special case for java -Xshare:dump. The effect of the removal will be tested by all the tests that dumps a CDS archive.

@openjdk
Copy link

openjdk bot commented Oct 17, 2022

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

8295029: runtime/cds/appcds/LotsOfClasses.java fail with jfx

Reviewed-by: iklam, ccheung, gziemski

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 101 new commits pushed to the master branch:

  • 0233ba7: 8284614: on macOS "spindump" should be run from failure_handler as root
  • 2a799e5: 8285306: Fix typos in java.desktop
  • d1f7945: 6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
  • 5dbd495: 8295457: Make the signatures of write barrier methods consistent
  • 7b2e83b: 8295469: S390X: Optimized builds are broken
  • 63867c4: 8295433: EpsilonHeap doesn't need to override post_initialize()
  • e7375f9: 8295468: RISC-V: Minimal builds are broken
  • bd41428: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction
  • 78fed9d: 7175397: The divider color is not changed to green when dragging for Nimbus LaF.
  • 8c40b7d: 8292177: InitialSecurityProperty JFR event
  • ... and 91 more: https://git.openjdk.org/jdk/compare/3a980b972f72b5bbfd7bb63b433ae562890dbcf2...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 Oct 17, 2022
Copy link
Member

@calvinccheung calvinccheung left a comment

Choose a reason for hiding this comment

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

LGTM.

@gerard-ziemski
Copy link

gerard-ziemski commented Oct 18, 2022

So the only one type of dictionary that gains the super powers of resizing is the DelegatingClassLoader dictionary, but based on comments it's always size 1, so it never will need to be resized?

Related question, but not part of this fix - can we simplify things and not have to bother with 1 element dictionary for DelegatingClassLoader somehow?

Copy link

@gerard-ziemski gerard-ziemski left a comment

Choose a reason for hiding this comment

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

LGTM

@coleenp
Copy link
Contributor Author

coleenp commented Oct 18, 2022

Thanks for the reviews, Ioi, Calvin and Gerard.
To answer your question about the DelegatingClassLoader - it's always a 1 element hashtable so would never need to be resized. Seems efficient to specify a very small hashtable. We may be able to eventually remove it because of JEP 416: JDK-8271820.
Thanks.
/integrate

@openjdk
Copy link

openjdk bot commented Oct 18, 2022

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

  • 0233ba7: 8284614: on macOS "spindump" should be run from failure_handler as root
  • 2a799e5: 8285306: Fix typos in java.desktop
  • d1f7945: 6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
  • 5dbd495: 8295457: Make the signatures of write barrier methods consistent
  • 7b2e83b: 8295469: S390X: Optimized builds are broken
  • 63867c4: 8295433: EpsilonHeap doesn't need to override post_initialize()
  • e7375f9: 8295468: RISC-V: Minimal builds are broken
  • bd41428: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction
  • 78fed9d: 7175397: The divider color is not changed to green when dragging for Nimbus LaF.
  • 8c40b7d: 8292177: InitialSecurityProperty JFR event
  • ... and 91 more: https://git.openjdk.org/jdk/compare/3a980b972f72b5bbfd7bb63b433ae562890dbcf2...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 18, 2022
@openjdk openjdk bot closed this Oct 18, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 18, 2022
@coleenp coleenp deleted the dictionary branch October 18, 2022 20:26
@openjdk
Copy link

openjdk bot commented Oct 18, 2022

@coleenp Pushed as commit 37f93b6.

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

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
5 participants