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
Contributor

@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 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.

Loading

@openjdk openjdk bot added the rfr label Apr 9, 2021
@openjdk
Copy link

@openjdk 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.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 9, 2021

Webrevs

Loading

Copy link
Member

@DamonFool DamonFool left a comment

This sounds reasonable to me.
Thanks.

Loading

Copy link
Contributor

@neliasso neliasso left a comment

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

Loading

@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 12, 2021

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!

Loading

@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 13, 2021

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!

Loading

@DamonFool
Copy link
Member

@DamonFool DamonFool commented Apr 13, 2021

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.

Loading

@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 13, 2021

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!

Loading

@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

Thanks for your update.

Loading

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Looks good to me.

Loading

@openjdk
Copy link

@openjdk 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).

Loading

@openjdk openjdk bot added the ready label Apr 13, 2021
@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 13, 2021

Thanks for the review @DamonFool @TobiHartmann !

Loading

@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 13, 2021

Thanks for the review @neliasso !

Loading

@XiaohongGong
Copy link
Contributor Author

@XiaohongGong XiaohongGong commented Apr 13, 2021

/integrate

Loading

@openjdk openjdk bot added the sponsor label Apr 13, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 13, 2021

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

Loading

@nsjian
Copy link

@nsjian nsjian commented Apr 13, 2021

/sponsor

Loading

@openjdk
Copy link

@openjdk 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.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants