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 #2222

Closed

Conversation

roberttoyonaga
Copy link
Contributor

@roberttoyonaga roberttoyonaga commented Feb 22, 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
hello!
----------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
  • JDK-8326521 needs maintainer approval
  • Commit message must refer to an issue

Issue

  • JDK-8326521: JFR: CompilerPhase event test fails on windows 32 bit (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2222/head:pull/2222
$ git checkout pull/2222

Update a local copy of the PR:
$ git checkout pull/2222
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2222/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2222

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2222.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 22, 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.

@roberttoyonaga roberttoyonaga marked this pull request as ready for review February 22, 2024 20:23
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 22, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 22, 2024

Webrevs

@roberttoyonaga
Copy link
Contributor Author

Closing because I think it makes more sense to change this upstream in jdk then backport here since the test code is basically unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant