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

8328592: hprof tests fail with -XX:-CompactStrings #18394

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Mar 20, 2024

See the bug for symptoms. The tests are failing because hprof test library is confused about non-compact strings.

Additional testing:

  • serviceability/HeapDump lib-test:all with -XX:-CompactStrings now pass
  • serviceability/HeapDump lib-test:all with -XX:+CompactStrings still pass

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

  • JDK-8328592: hprof tests fail with -XX:-CompactStrings (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18394

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 20, 2024

👋 Welcome back shade! 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 20, 2024

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

8328592: hprof tests fail with -XX:-CompactStrings

Reviewed-by: phh, lmesnik, amenkov

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

  • 93d1700: 8328589: unify os::breakpoint among posix platforms
  • a5a2eca: 8327683: Crash with primitive type pattern and generic expression in instanceof
  • 65d9f11: 8328328: Convert javax/swing/JTabbedPane/4666224/bug4666224.java applet test to main
  • 481473e: 8328035: Convert javax/swing/text/html/TableView/7030332/bug7030332.java applet test to main
  • dea94f4: 8328300: Convert PrintDialogsTest.java from Applet to main program
  • d32746e: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs
  • 000f4d8: 8319251: [REDO] Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
  • fbeac98: 8328379: Convert URLDragTest.html applet test to main
  • 96530bc: 8326521: JFR: CompilerPhase event test fails on windows 32 bit
  • a112fc8: 8328225: Convert ImageDecoratedDnD.html applet test to main

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 rfr Pull request is ready for review label Mar 20, 2024
@openjdk
Copy link

openjdk bot commented Mar 20, 2024

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot-runtime
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org labels Mar 20, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 20, 2024

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Are we guaranteed that non-compact string char component bytes are stored in little-endian order?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 20, 2024
@shipilev
Copy link
Member Author

Are we guaranteed that non-compact string char component bytes are stored in little-endian order?

No, I don't think we are guaranteed any particular endianness, argh. The new patch follows what StringUTF16 does:

private static final int HI_BYTE_SHIFT;
private static final int LO_BYTE_SHIFT;
static {
if (Unsafe.getUnsafe().isBigEndian()) {
HI_BYTE_SHIFT = 8;
LO_BYTE_SHIFT = 0;
} else {
HI_BYTE_SHIFT = 0;
LO_BYTE_SHIFT = 8;
}
}

Copy link

@alexmenkov alexmenkov 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. Please update copyright years before push

@shipilev
Copy link
Member Author

GHA failures look environmental. I am integrating this.

/integrate

@openjdk
Copy link

openjdk bot commented Mar 21, 2024

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

  • ac2f8e5: 8327994: Update code gen in CallGeneratorHelper
  • c434b79: 8327169: serviceability/dcmd/vm/SystemMapTest.java and SystemDumpMapTest.java may fail after JDK-8326586
  • 7006790: 8328628: JDK-8328157 incorrectly sets -MT on all compilers in jdk.jpackage
  • 68170ae: 8328238: Convert few closed manual applet tests to main
  • 9f5ad43: 8320675: PrinterJob/SecurityDialogTest.java hangs
  • 684678f: 8328633: s390x: Improve vectorization of Match.sqrt() on floats
  • 93d1700: 8328589: unify os::breakpoint among posix platforms
  • a5a2eca: 8327683: Crash with primitive type pattern and generic expression in instanceof
  • 65d9f11: 8328328: Convert javax/swing/JTabbedPane/4666224/bug4666224.java applet test to main
  • 481473e: 8328035: Convert javax/swing/text/html/TableView/7030332/bug7030332.java applet test to main
  • ... and 6 more: https://git.openjdk.org/jdk/compare/4e83f4cfc779e39cca0070b5729a508aeaa74654...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 21, 2024

@shipilev Pushed as commit bb3e84b.

💡 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 serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants