Skip to content

8304069: ClassFileParser has ad-hoc hashtables #13141

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

Closed
wants to merge 6 commits into from

Conversation

matias9927
Copy link
Contributor

@matias9927 matias9927 commented Mar 22, 2023

The ClassFileParser has ad-hoc hash tables for checking for duplicate names for fields, methods and interfaces. ResourceHashtable will now be used instead. Verified with tier1-4 tests.


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13141

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 22, 2023

👋 Welcome back matsaave! 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 Mar 22, 2023

@matias9927 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 Mar 22, 2023
@matias9927 matias9927 marked this pull request as ready for review March 22, 2023 16:29
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 22, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 22, 2023

Webrevs

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

I have some suggestions for improving this.

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

This looks great.

@openjdk
Copy link

openjdk bot commented Mar 22, 2023

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

8304069: ClassFileParser has ad-hoc hashtables

Reviewed-by: coleenp, dholmes

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

  • 9a8a60f: 8304833: (fc) Remove dead code in sun.nio.ch.FileChannelImpl::implCloseChannel
  • f96aee7: 8291154: Create a non static nested class without enclosing class throws VerifyError
  • 4ec720d: 8297977: vmTestbase/nsk/stress/except/except012.java fails with unexpected Exception
  • 13dd19a: 8304802: After JDK-8297639 the flag G1UsePreventiveGC needs to be added to the obsoletion table
  • d61de14: 8303508: Vector.lane() gets wrong value on x86
  • 941a7ac: 8304301: Remove the global option SuperWordMaxVectorSize
  • ac6af6a: 7176515: ExceptionInInitializerError for an enum with multiple switch statements
  • dd23ee9: 8303917: Update ISO 639 language codes table
  • 6f67abd: 8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out
  • 568dd57: 8304716: Clean up G1Policy::calc_max_old_cset_length()
  • ... and 51 more: https://git.openjdk.org/jdk/compare/c396f1ed8b91b799fdd6a9a849d7407e606227d5...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@coleenp, @dholmes-ora) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 22, 2023
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.

This conversion looks good but I was confused by the way the original code was doing things. Once we have this conversion I think we could clean things up further:

  1. Interfaces don't need NameSigHash, all we need is a map of names, so we should be able to directly have a RHT of Symbol* for the interface_name_table.
  2. NameSigHash is the wrong terminology - we are checking names and descriptors [JVMS 4.3], not names and signatures [JVMS4.7.9.1]! (And a Java Language "signature" is something different again [JLS 8.4.2]!

Unfortunately I think we misuse "signature" throughout the VM, so maybe fixing it here will serve little purpose.

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

Every cleanup suggests more cleanups.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 23, 2023
Copy link
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.

Looks good to me!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 23, 2023
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.

Looks good! Thanks for the additional cleanups/simplifications.

@matias9927
Copy link
Contributor Author

Thank you for the reviews @coleenp and @dholmes-ora!
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 24, 2023
@openjdk
Copy link

openjdk bot commented Mar 24, 2023

@matias9927
Your change (at version 2c89b16) is now ready to be sponsored by a Committer.

@coleenp
Copy link
Contributor

coleenp commented Mar 24, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 24, 2023

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

  • 9a8a60f: 8304833: (fc) Remove dead code in sun.nio.ch.FileChannelImpl::implCloseChannel
  • f96aee7: 8291154: Create a non static nested class without enclosing class throws VerifyError
  • 4ec720d: 8297977: vmTestbase/nsk/stress/except/except012.java fails with unexpected Exception
  • 13dd19a: 8304802: After JDK-8297639 the flag G1UsePreventiveGC needs to be added to the obsoletion table
  • d61de14: 8303508: Vector.lane() gets wrong value on x86
  • 941a7ac: 8304301: Remove the global option SuperWordMaxVectorSize
  • ac6af6a: 7176515: ExceptionInInitializerError for an enum with multiple switch statements
  • dd23ee9: 8303917: Update ISO 639 language codes table
  • 6f67abd: 8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out
  • 568dd57: 8304716: Clean up G1Policy::calc_max_old_cset_length()
  • ... and 51 more: https://git.openjdk.org/jdk/compare/c396f1ed8b91b799fdd6a9a849d7407e606227d5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 24, 2023

@coleenp @matias9927 Pushed as commit d8ba227.

💡 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
Development

Successfully merging this pull request may close these issues.

3 participants