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

Robert Toyonaga duke at openjdk.org
Wed Mar 20 19:45:25 UTC 2024


On Tue, 19 Mar 2024 13:50:52 GMT, Robert Toyonaga <duke at openjdk.org> wrote:

> 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](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L569) will be set. This results in setting the compilation mode to be [quick_only](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L191), which results in [constraining to C1 compilation](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.inline.hpp#L53).
> 
> 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.

This pull request has now been integrated.

Changeset: 96530bcc
Author:    Robert Toyonaga <rtoyonag at redhat.com>
Committer: Erik Gahlin <egahlin at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/96530bcc07514c3eda40fd6ffa74f197fe541dea
Stats:     1 line in 1 file changed: 1 ins; 0 del; 0 mod

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

Reviewed-by: egahlin

-------------

PR: https://git.openjdk.org/jdk/pull/18379


More information about the hotspot-jfr-dev mailing list