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

8264957: Cleanup unused array Type::dual_type #3410

Closed
wants to merge 2 commits into from

Conversation

XiaohongGong
Copy link

@XiaohongGong XiaohongGong commented Apr 9, 2021

This is a bug fix for [1] which adds a new vector mask type. The new added TYPE "VectorMask" is inserted into enum TYPES, while the array "Type::dual_type" is not updated. This makes the array elements are not aligned with TYPES.

I met the following crash due to this issue when I was working on the masking feature support on panama-vector:

 Internal Error (/home/xiagon01/code/panama-vector/src/hotspot/share/opto/type.hpp:1727), pid=104432, tid=104449
 # assert(_base >= AnyPtr && _base <= KlassPtr) failed: Not a pointer

Adding a value like other vector types for the "VectorMask" in the array "dual_type" can fix it.

[1] https://bugs.openjdk.java.net/browse/JDK-8262355

Tested with tier1 and jdk:tier3


Progress

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

Issue

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3410

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 9, 2021

👋 Welcome back xgong! 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 openjdk bot added the rfr Pull request is ready for review label Apr 9, 2021
@openjdk
Copy link

openjdk bot commented Apr 9, 2021

@XiaohongGong The following label will be automatically applied to this pull request:

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Apr 9, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 9, 2021

Webrevs

Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

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

This sounds reasonable to me.
Thanks.

Copy link

@neliasso neliasso left a comment

Choose a reason for hiding this comment

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

Could you please add an assert so that we don't make this mistake again.

@XiaohongGong
Copy link
Author

Thanks for your review @DamonFool @neliasso ! It seems the array Type::dual_type is not used anywhere currently. The same definition for dual_type is defined in https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/type.hpp#L140 and used in type.cpp, which uses Type::dual_type before. So I think the whole definition can be totally removed. The issue I met might not be related to it. I will have a test and remove it if everything works well. Thanks!

@XiaohongGong
Copy link
Author

Hi, the array Type:;dual_type is totally removed. Tested hotspot:hotspot_all_no_apps, langtools:tier1, jdk:jdk_core and jdk:tier3 internally. Would you mind having a look at it again @DamonFool @neliasso ? Thanks so much!

@DamonFool
Copy link
Member

I didn't find the usage of that array either.
So the change looks fine to me.

I'm afraid the JBS needs to be updated as a cleanup issue.
Thanks.

@XiaohongGong
Copy link
Author

I didn't find the usage of that array either.
So the change looks fine to me.

I'm afraid the JBS needs to be updated as a cleanup issue.
Thanks.

Seems reasonable. I will update the JBS and the PR title. Thanks!

@XiaohongGong XiaohongGong changed the title 8264957: Type::dual_type array is not aligned with enum TYPES 8264957: Cleanup unused array Type::dual_type Apr 13, 2021
Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

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

Thanks for your update.

Copy link
Member

@TobiHartmann TobiHartmann 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
Copy link

openjdk bot commented Apr 13, 2021

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

8264957: Cleanup unused array Type::dual_type

Reviewed-by: jiefu, neliasso, thartmann

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

  • 954b9a1: 8264795: IGV: Upgrade NetBeans platform
  • f2f7aa3: 8262291: Refactor reserve_memory_special_huge_tlbfs
  • 008fc75: 8264224: Add macosx-aarch64 to Oracle build configurations
  • f4e6395: 8264190: Harden TLS interop tests
  • 18bec9c: 8265084: [BACKOUT] 8264954: unified handling for VectorMask object re-materialization during de-optimization
  • 9dd9625: 8263763: Synthetic constructor parameters of enum are not considered for annotation indices
  • 1ee80e0: 8261355: No data buffering in SunPKCS11 Cipher encryption when the underlying mechanism has no padding
  • d84a7e5: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records
  • 714ae54: 8258788: incorrect response to change in window insets [lanai]
  • f479437: 8265082: test/hotspot/jtreg/gc/g1/TestG1SkipCompaction.java fails validate-source
  • ... and 35 more: https://git.openjdk.java.net/jdk/compare/951f277a71bfa5bd3a3934a8ccd66dfc25bae004...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 (@DamonFool, @neliasso, @TobiHartmann) 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 Apr 13, 2021
@XiaohongGong
Copy link
Author

Thanks for the review @DamonFool @TobiHartmann !

@XiaohongGong
Copy link
Author

Thanks for the review @neliasso !

@XiaohongGong
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 13, 2021
@openjdk
Copy link

openjdk bot commented Apr 13, 2021

@XiaohongGong
Your change (at version 28df804) is now ready to be sponsored by a Committer.

@nsjian
Copy link

nsjian commented Apr 13, 2021

/sponsor

@openjdk openjdk bot closed this Apr 13, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 13, 2021
@openjdk
Copy link

openjdk bot commented Apr 13, 2021

@nsjian @XiaohongGong Since your change was applied there have been 45 commits pushed to the master branch:

  • 954b9a1: 8264795: IGV: Upgrade NetBeans platform
  • f2f7aa3: 8262291: Refactor reserve_memory_special_huge_tlbfs
  • 008fc75: 8264224: Add macosx-aarch64 to Oracle build configurations
  • f4e6395: 8264190: Harden TLS interop tests
  • 18bec9c: 8265084: [BACKOUT] 8264954: unified handling for VectorMask object re-materialization during de-optimization
  • 9dd9625: 8263763: Synthetic constructor parameters of enum are not considered for annotation indices
  • 1ee80e0: 8261355: No data buffering in SunPKCS11 Cipher encryption when the underlying mechanism has no padding
  • d84a7e5: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records
  • 714ae54: 8258788: incorrect response to change in window insets [lanai]
  • f479437: 8265082: test/hotspot/jtreg/gc/g1/TestG1SkipCompaction.java fails validate-source
  • ... and 35 more: https://git.openjdk.java.net/jdk/compare/951f277a71bfa5bd3a3934a8ccd66dfc25bae004...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1935655.

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

@XiaohongGong XiaohongGong deleted the JDK-8264957 branch September 16, 2022 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
5 participants