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

JDK-8276046: codestrings.validate_vm gtest fails on ppc64, s390 #6133

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Oct 27, 2021

Trivial patch to switch off the associated gtest on these platforms. PPC64 and s390 compilers don't use code strings.


Progress

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

Issue

  • JDK-8276046: codestrings.validate_vm gtest fails on ppc64, s390

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6133

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 27, 2021

👋 Welcome back stuefe! 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 openjdk bot commented Oct 27, 2021

@tstuefe 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 label Oct 27, 2021
@tstuefe tstuefe force-pushed the JDK-8276046-codestrings-validate-fails-on-ppc-s390 branch from 9bc100b to 0f3e2cf Compare Oct 27, 2021
@tstuefe tstuefe marked this pull request as ready for review Oct 27, 2021
@openjdk openjdk bot added the rfr label Oct 27, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 27, 2021

Webrevs

Copy link
Contributor

@shipilev shipilev left a comment

It looks okay to me, but do you want to join the family of #ifdefs at the beginning of the file?

@openjdk
Copy link

@openjdk openjdk bot commented Oct 27, 2021

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

8276046: codestrings.validate_vm gtest fails on ppc64, s390

Reviewed-by: shade, mdoerr

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

  • 93be099: 4718400: Many quantities are held as signed that should be unsigned
  • 168081e: 8270490: Charset.forName() taking fallback default value
  • a292733: 8275975: Remove dead code in ciInstanceKlass
  • 4060602: 8275800: Redefinition leaks MethodData::_extra_data_lock
  • 485d658: 8275851: Deproblemlist open/test/jdk/javax/swing/JComponent/6683775/bug6683775.java
  • b3f45f8: 8275689: [TESTBUG] Use color tolerance only for XRender in BlitRotateClippedArea test
  • 6c05cc9: 8275863: Use encodeASCII for ASCII-compatible DoubleByte encodings
  • 2f979ec: 8213120: java/awt/TextArea/AutoScrollOnSelectAndAppend/AutoScrollOnSelectAndAppend.java fails on mac10.13
  • 9e831bc: 8275886: G1: remove obsolete comment in HeapRegion::setup_heap_region_size

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 label Oct 27, 2021
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Thanks for fixing the issue! Looks ok to me, too. Aleksey's suggestion to have the platform preprocessor stuff at the beginning sounds good. Even though I don't know how this should be done. In addition, wouldn't it be better to use positive instead of negative tests for platforms which do use code strings?

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented Oct 27, 2021

Okay, I followed Alekseys' advice. I rather keep the negatives explicit though. The "DISABLED_" prefix seems to be the standard way to disable gtests, but I really don't care.

Thanks, Thomas

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented Oct 27, 2021

@TheRealMDoerr Martin, are you okay with this?

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

I'm ok with it, but I'd prefer less ifndefs. ZERO, PPC and S390 could be covered by one Iine. Or even better something like #if defined(X86) || defined(ARM).

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented Oct 27, 2021

I'm ok with it, but I'd prefer less ifndefs. ZERO, PPC and S390 could be covered by one Iine. Or even better something like #if defined(X86) || defined(ARM).

ZERO cannot be following the same logic since it is orthogonal to the CPU architecture. E.g. zero on x86 builds with -DAMD64 -DZERO, and AMD64 causes X86 to be defined:

#if defined(IA32) || defined(AMD64)
#define X86
#define X86_ONLY(code) code
#define NOT_X86(code)
#else
#undef X86
#define X86_ONLY(code)
#define NOT_X86(code) code
#endif

so you need to exclude ZERO independently from handling CPU architectures.

ARM is only 32bit arm:

// Note: There are two ARM ports. They set the following in the makefiles:
// 1. 32-bit port: -DARM -DARM32 -DTARGET_ARCH_arm
// 2. 64-bit port: -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64

So it would have to be at least #if defined(X86) || defined(ARM) || defined(AARCH64). And downstream porters of different platforms (mips, riscv, sparc) would then have to opt in and extend that construct with their own macros. Which nobody would do probably since you would need to know it exists. So I prefer to keep the negative here. Also makes more sense to have explicit exclusions, since there are concrete reasons for exclusions vs having concrete reasons for doing this test.

So, are we good with:

#ifndef PRODUCT
#ifndef ZERO
// Neither ppc nor s390 compilers use code strings.
#if !defined(PPC) && !defined(S390)

?

@TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Oct 27, 2021

#if !defined(ZERO) && !defined(PPC) && !defined(S390) would be equivalent, but your version is fine, too.

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented Oct 27, 2021

Thank you!

/integrate

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Thanks for the update!

@openjdk
Copy link

@openjdk openjdk bot commented Oct 27, 2021

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

  • 93be099: 4718400: Many quantities are held as signed that should be unsigned
  • 168081e: 8270490: Charset.forName() taking fallback default value
  • a292733: 8275975: Remove dead code in ciInstanceKlass
  • 4060602: 8275800: Redefinition leaks MethodData::_extra_data_lock
  • 485d658: 8275851: Deproblemlist open/test/jdk/javax/swing/JComponent/6683775/bug6683775.java
  • b3f45f8: 8275689: [TESTBUG] Use color tolerance only for XRender in BlitRotateClippedArea test
  • 6c05cc9: 8275863: Use encodeASCII for ASCII-compatible DoubleByte encodings
  • 2f979ec: 8213120: java/awt/TextArea/AutoScrollOnSelectAndAppend/AutoScrollOnSelectAndAppend.java fails on mac10.13
  • 9e831bc: 8275886: G1: remove obsolete comment in HeapRegion::setup_heap_region_size

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 27, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 27, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 27, 2021

@tstuefe Pushed as commit 809488b.

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

@tstuefe tstuefe deleted the JDK-8276046-codestrings-validate-fails-on-ppc-s390 branch Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler integrated
3 participants