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

8326521: JFR: CompilerPhase event test fails on windows 32 bit #18379

Closed

Conversation

roberttoyonaga
Copy link
Contributor

@roberttoyonaga roberttoyonaga commented Mar 19, 2024

This test failure is a problem for the Adoptium CI. The reason that this test fails on 32 bit Windows is that Hotspot only uses the C1 compiler in this configuration by design. If the system is Windows and not 64 bit, NeverActAsServerClassMachine will be set. This results in setting the compilation mode to be quick_only, which results in constraining to C1 compilation.

The CompilerPhase JFR events are only emitted from C2 code in hotspot. So although the test succeeds in compiling the method it intends to (with C1), it isn't able to generate the JFR events it expects, and so fails.

----------System.out:(4/182)----------
CompileCommand: compileonly jdk/jfr/event/compiler/TestCompilerPhase.dummyMethod bool compileonly = true
1 compiler directives added
WB error: invalid compilation level 4
----------System.err:(16/1050)----------
java.lang.RuntimeException: No events: expected false, was true
at jdk.test.lib.Asserts.fail(Asserts.java:594)
at jdk.test.lib.Asserts.assertFalse(Asserts.java:461)
at jdk.test.lib.jfr.Events.hasEvents(Events.java:161)
at jdk.jfr.event.compiler.TestCompilerPhase.main(TestCompilerPhase.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:840)

JavaTest Message: Test threw exception: java.lang.RuntimeException: No events: expected false, was true
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: No events: expected false, was true

This PR prevents NeverActAsServerClassMachine from being set during the test, so that it isn't restricted to C1.


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-8326521: JFR: CompilerPhase event test fails on windows 32 bit (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18379

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 19, 2024

👋 Welcome back roberttoyonaga! 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 19, 2024

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

8326521: JFR: CompilerPhase event test fails on windows 32 bit

Reviewed-by: egahlin

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

  • eebcc21: 8328524: [x86] StringRepeat.java failure on linux-x86: Could not reserve enough space for 2097152KB object heap
  • a68f5d7: 8327879: Convert javax/swing/border/Test4760089.java applet test to main
  • 269163d: 8328387: Convert java/awt/Frame/FrameStateTest/FrameStateTest.html applet test to main
  • 7231fd7: 8328350: G1: Remove DO_DISCOVERED_AND_DISCOVERY
  • 4f8f486: 8328012: Convert InputMethod (/java/awt/im) applet tests to main
  • 9ca4ae3: 8328264: AArch64: remove UseNeon condition in CRC32 intrinsic
  • 9214a62: 8328341: Remove deprecated per-thread compiler stats in sun.management
  • 1329216: 8328261: public lookup fails with IllegalAccessException when used while module system is being initialized
  • 3b305d5: 8313306: More sensible memory reservation logging
  • f140eb4: 8297879: javadoc link to preview JEP 1000 has grouping character comma
  • ... and 18 more: https://git.openjdk.org/jdk/compare/9e32db266e4c3cc9be273fa6b77112832a43ba4a...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 (@egahlin) 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
Copy link

openjdk bot commented Mar 19, 2024

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

  • hotspot-jfr

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-jfr hotspot-jfr-dev@openjdk.org label Mar 19, 2024
@roberttoyonaga roberttoyonaga marked this pull request as ready for review March 19, 2024 14:14
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 19, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 19, 2024

Webrevs

Copy link
Member

@egahlin egahlin left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

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

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 20, 2024
@openjdk
Copy link

openjdk bot commented Mar 20, 2024

@roberttoyonaga
Your change (at version 2e284c2) is now ready to be sponsored by a Committer.

@egahlin
Copy link
Member

egahlin commented Mar 20, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 20, 2024

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

  • a112fc8: 8328225: Convert ImageDecoratedDnD.html applet test to main
  • 4e83f4c: 8328185: Convert java/awt/image/MemoryLeakTest/MemoryLeakTest.java applet test to main
  • d3f3011: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream
  • e5e7cd2: 8328386: Convert java/awt/FileDialog/FileNameOverrideTest test to main
  • 1b68c73: 8328377: Convert java/awt/Cursor/MultiResolutionCursorTest test to main
  • e0373e0: 8328378: Convert java/awt/FileDialog/FileDialogForDirectories test to main
  • 03c25b1: 8328367: Convert java/awt/Component/UpdatingBootTime test to main
  • eebcc21: 8328524: [x86] StringRepeat.java failure on linux-x86: Could not reserve enough space for 2097152KB object heap
  • a68f5d7: 8327879: Convert javax/swing/border/Test4760089.java applet test to main
  • 269163d: 8328387: Convert java/awt/Frame/FrameStateTest/FrameStateTest.html applet test to main
  • ... and 25 more: https://git.openjdk.org/jdk/compare/9e32db266e4c3cc9be273fa6b77112832a43ba4a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 20, 2024

@egahlin @roberttoyonaga Pushed as commit 96530bc.

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

Successfully merging this pull request may close these issues.

2 participants