Skip to content

Conversation

@chhagedorn
Copy link
Member

@chhagedorn chhagedorn commented Apr 2, 2025

TestPhaseIRMatching was recently updated with JDK-8352595 which changed some matching on opto assembly from IRNode.ALLOC (now matching on ideal phases) to IRNode.FIELD_ACCESS (still matching on opto assembly). However, the updated code matches differently on PPC for some method invocation on a parameter which let the test fail on PPC:

public Object defaultOnOptoAssembly(Helper h) {
    return h.getString(); // emits one "Field: " string on most platforms but none on PPC
}

When I've revisited the test to analyze the failure, it was not evidently clear what I had in mind back there with defaultOnX(). My guess is that I've tried to have one method failing on ideal phases, one on mach phases and one on both while all the methods use IRNode entries that have default compile phases on ideal and mach phases. But that is not the case today. I've therefore rewritten the tests to adhere to my guess. I also removed the ambiguity among platforms to have the same number of field accesses on them.

How to read the @ExpectedFailure annotation:

  @IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP, IRNode.STORE_I},
      counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2", IRNode.OOPMAP_WITH, "asdf", "2"})
  // Expect rule with id 5 (the one directly above) to fail:
  // - We fail when matching PRINT_IDEAL with the:
  //   - failOn attribute: The failing constraints are constraint 1 and 4 (while 2 and 3 pass)
  //   - counts attribute: The failing constraints are constraint 2 and 4 (while 1 and 3 pass).
  @ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_IDEAL, failOn = {1, 4}, counts = {1, 3})

Thanks to @TheRealMDoerr for testing the patch on PPC!

Thanks,
Christian


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-8353058: [PPC64] Some IR framework tests are failing after JDK-8352595 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24373

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 2, 2025

👋 Welcome back chagedorn! 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 Apr 2, 2025

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

8353058: [PPC64] Some IR framework tests are failing after JDK-8352595

Reviewed-by: mchevalier, 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 47 new commits pushed to the master branch:

  • d358f5f: 8347449: C2: UseLoopPredicate off should also turn UseProfiledLoopPredicate off
  • f301663: 8352893: C2: OrL/INode::add_ring optimize (x | -1) to -1
  • 15d36ee: 8353330: Test runtime/cds/appcds/SignedJar.java fails in CDSHeapVerifier
  • e6fe249: 8323100: com/sun/tools/attach/StartManagementAgent.java failed with "WaitForSingleObject failed"
  • 096e70d: 8352437: Support --add-exports with -XX:+AOTClassLinking
  • 6970cf6: 8352775: JVM crashes with -XX:AOTMode=create -XX:+UseZGC
  • afcad8c: 5043343: FileImageInputStream and FileImageOutputStream do not properly track streamPos for RandomAccessFile
  • 6891490: 8353324: Clean up of comments and import after 8319192
  • 07fd666: 8342984: Bump minimum boot jdk to JDK 24
  • 6a46d55: 8353129: CDS ArchiveRelocation tests fail after JDK-8325132
  • ... and 37 more: https://git.openjdk.org/jdk/compare/25925138b0a7d781d9293e52a8c9520329a85219...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.

➡️ 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 Apr 2, 2025
Comment on lines +177 to +178
i = 34;
l = 34;
Copy link
Member Author

Choose a reason for hiding this comment

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

Always using this body which reliably emits two "Field: " strings in the opto assembly on all platforms. Thus removed the Helper class again.

Comment on lines -227 to -228
defaultOnOptoAssembly(new Helper("a", 1));
defaultOnBoth(new Helper("a", 1));
Copy link
Member Author

Choose a reason for hiding this comment

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

No longer needed because we do not need to pass anything into the methods.

@openjdk
Copy link

openjdk bot commented Apr 2, 2025

@chhagedorn 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 2, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 2, 2025

Webrevs

@marc-chevalier
Copy link
Member

Looks good to me. I've also used FIELD_ACCESS in TestCompilePhaseCollector.java, but I think it's harmless there since we are not matching, but just using it for its default phase. But I still mention, just in case...

@chhagedorn
Copy link
Member Author

Looks good to me. I've also used FIELD_ACCESS in TestCompilePhaseCollector.java, but I think it's harmless there since we are not matching, but just using it for its default phase. But I still mention, just in case...

Thanks for your review Marc! Yes, there we do not perform the actual IR matching, so it's not a problem for platform specific differences.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 2, 2025
@TheRealMDoerr
Copy link
Contributor

Thanks for the fix!

@chhagedorn
Copy link
Member Author

Thanks Tobias and Martin for your reviews!

@chhagedorn
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 3, 2025

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

  • b01026a: 8353325: Rewrite appcds/methodHandles test cases to use CDSAppTester
  • e2e1598: 8353584: [BACKOUT] DaCapo xalan performance with -XX:+UseObjectMonitorTable
  • 814730e: 8352645: Add tool support to check order of includes
  • d435362: 8353479: jcmd with streaming output breaks intendation
  • 130b0cd: 8353217: Build libsleef on macos-aarch64
  • 209e72d: 8353234: Refactor XMLSecurityPropertyManager
  • cc870d4: 8352088: Call of com.sun.jdi.ThreadReference.threadGroups() can lock up target VM
  • d979bd8: 8344671: Few JFR streaming tests fail with application not alive error on MacOS 15
  • 49cb7aa: 8339114: DaCapo xalan performance with -XX:+UseObjectMonitorTable
  • d32ff13: 8353117: Crash: assert(id >= ThreadIdentifier::initial() && id < ThreadIdentifier::current()) failed: must be reasonable)
  • ... and 56 more: https://git.openjdk.org/jdk/compare/25925138b0a7d781d9293e52a8c9520329a85219...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 3, 2025

@chhagedorn Pushed as commit 8d3d1d4.

💡 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-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants