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

8267089: Use typedef KVHashtable for ID2KlassTable #4007

Closed
wants to merge 2 commits into from

Conversation

@kelthuzadx
Copy link
Member

@kelthuzadx kelthuzadx commented May 13, 2021

While backporting some stuff to jdk11, I noticed main functionalities of ID2KlassTable have been removed afterJDK-8213587, it seems that we can use a simple typedef KVHashtable instead.


Progress

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

Issue

  • JDK-8267089: Use typedef KVHashtable for ID2KlassTable

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4007

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 13, 2021

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

Loading

@openjdk openjdk bot added the rfr label May 13, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 13, 2021

@kelthuzadx To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • 2d
  • awt
  • beans
  • build
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah
  • sound
  • swing

Loading

@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented May 13, 2021

/label add hotspot-runtime

Loading

@openjdk
Copy link

@openjdk openjdk bot commented May 13, 2021

@kelthuzadx
The hotspot-runtime label was successfully added.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented May 13, 2021

Webrevs

Loading

@navyxliu
Copy link
Contributor

@navyxliu navyxliu commented May 14, 2021

This is nice! It's not "seems" , we can use typedef.

Another nit you can do along with this PR. move * to its class.

  ID2KlassTable* table() {
    return &_id2klass_table;
  }

Loading

@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented May 17, 2021

This is nice! It's not "seems" , we can use typedef.

Another nit you can do along with this PR. move * to its class.

  ID2KlassTable* table() {
    return &_id2klass_table;
  }

Hi Xin, do you mean typedef KVHashtable<int, InstanceKlass*, mtInternal>* ID2KlassTable? This is not feasible since _id2klass_table is not a type of pointer.

Loading

@navyxliu
Copy link
Contributor

@navyxliu navyxliu commented May 17, 2021

I think you patch looks good. in particular, you tuck away ID2KlassTable in . That increases encapsulation.

I mean you can change the return type of table() to 'ID2KlassTable*[whitespace]'.
In hotspot cod style, pointer '*' is close to its type.

Loading

@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented May 17, 2021

I think you patch looks good. in particular, you tuck away ID2KlassTable in . That increases encapsulation.

I mean you can change the return type of table() to 'ID2KlassTable*[whitespace]'.
In hotspot cod style, pointer '*' is close to its type.

Good catch! Changed.

Loading

iklam
iklam approved these changes May 17, 2021
Copy link
Member

@iklam iklam left a comment

LGTM

Loading

@openjdk
Copy link

@openjdk openjdk bot commented May 17, 2021

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

8267089: Use typedef KVHashtable for ID2KlassTable

Reviewed-by: iklam, coleenp

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

  • ccfcd92: 8180571: Refactor sun/security/pkcs11 shell tests to plain java tests and fix failures
  • 40e4171: 8264800: cleanup Threads_lock comments in JVM/TI function headers
  • b17b11e: 8267562: G1: Missing BOT in Open Archive regions causes long pauses
  • 2b33835: 8265148: StackWatermarkSet being updated during AsyncGetCallTrace
  • 64ba2f0: 8265431: Add -fno-delete-null-pointer-checks to clang builds
  • d4b4cae: 8268023: Improve diagnostic for HandshakeFailureTest
  • 9d8ad2e: 8267990: Revisit some uses of synchronized in the HttpClient API
  • 36dc268: 8268036: ProblemList gtest/AsyncLogGtest.java
  • 74b70a5: 8036580: CHA: improve default method support
  • 20479c3: 8065760: CHA: Improve abstract method support
  • ... and 242 more: https://git.openjdk.java.net/jdk/compare/b50fc5f992c2a1bdcdc8cae4aacf2a16598d5d05...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 (@iklam, @coleenp) 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).

Loading

@openjdk openjdk bot added the ready label May 17, 2021
@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented May 18, 2021

Thank Xin and Ioi for taking time to look at this PR!

/integrate

Loading

@openjdk openjdk bot added the sponsor label May 18, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 18, 2021

@kelthuzadx
Your change (at version dcd4564) is now ready to be sponsored by a Committer.

Loading

coleenp
coleenp approved these changes Jun 1, 2021
Copy link
Contributor

@coleenp coleenp left a comment

This looks good to me.

Loading

@iklam
Copy link
Member

@iklam iklam commented Jun 1, 2021

/sponsor

Loading

@openjdk openjdk bot closed this Jun 1, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 1, 2021

@iklam @kelthuzadx Since your change was applied there have been 252 commits pushed to the master branch:

  • ccfcd92: 8180571: Refactor sun/security/pkcs11 shell tests to plain java tests and fix failures
  • 40e4171: 8264800: cleanup Threads_lock comments in JVM/TI function headers
  • b17b11e: 8267562: G1: Missing BOT in Open Archive regions causes long pauses
  • 2b33835: 8265148: StackWatermarkSet being updated during AsyncGetCallTrace
  • 64ba2f0: 8265431: Add -fno-delete-null-pointer-checks to clang builds
  • d4b4cae: 8268023: Improve diagnostic for HandshakeFailureTest
  • 9d8ad2e: 8267990: Revisit some uses of synchronized in the HttpClient API
  • 36dc268: 8268036: ProblemList gtest/AsyncLogGtest.java
  • 74b70a5: 8036580: CHA: improve default method support
  • 20479c3: 8065760: CHA: Improve abstract method support
  • ... and 242 more: https://git.openjdk.java.net/jdk/compare/b50fc5f992c2a1bdcdc8cae4aacf2a16598d5d05...master

Your commit was automatically rebased without conflicts.

Pushed as commit c2c0208.

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

Loading

@kelthuzadx kelthuzadx deleted the use_kvtable branch Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants