Question about the expected behavior if JVMCI compiler is used on the jvm variant with C2 disabled

Xiaohong Gong Xiaohong.Gong at arm.com
Mon Jun 1 09:25:13 UTC 2020


Hi,

Ping again! Does anyone have idea about it please? Many thanks for any help!

Thanks,
Xiaohong Gong

From: Xiaohong Gong
Sent: Friday, May 29, 2020 2:26 PM
To: hotspot-compiler-dev at openjdk.java.net; hotspot-runtime-dev at openjdk.java.net
Cc: nd <nd at arm.com>
Subject: RE: Question about the expected behavior if JVMCI compiler is used on the jvm variant with C2 disabled

Add hotspot-runtime-dev at openjdk.java.net<mailto:hotspot-runtime-dev at openjdk.java.net> channel. Thanks!

From: Xiaohong Gong
Sent: Wednesday, May 27, 2020 5:19 PM
To: hotspot-compiler-dev at openjdk.java.net<mailto:hotspot-compiler-dev at openjdk.java.net>
Cc: nd <nd at arm.com<mailto:nd at arm.com>>
Subject: Question about the expected behavior if JVMCI compiler is used on the jvm variant with C2 disabled

Hi,

Recently we found an issue that the JVM can crash in debug mode when the JVMCI compiler is used on
the jvm variant that C2 is disabled (Add "-with-jvm-features=-compiler2" for configuration).
The JVM crashes with the assertion fails:

Internal Error (jdk/src/hotspot/share/compiler/compileBroker.cpp:891), pid=10824, tid=10825
#  assert(_c2_count > 0 || _c1_count > 0) failed: No compilers?

It is obvious that the jvm cannot find a compiler since both the "_c2_count" and "_c1_count" is zero
due to some internal issues. Since "TieredCompilation" is closed when C2 is disabled, the compile mode
should be "interpreter+C1" by default, and it works well as expected. However,  I'm confused about the
expected behavior if the JVMCI compiler is specified to use.

For one side, I thought it should use "interpreter+JVMCI" as the compile mode.  If so we have to fix the
issues.  For another side, I noticed that there is a VM warning when using JVMCI compiler and disabling
tiered compilation with normal configuration: "Disabling tiered compilation with non-native JVMCI compiler
is not recommended". So considering that "TieredCompilation" is also closed when C2 is disabled, I thought
it would be better to just invalid the JVMCI compiler for it.

So my question is which should be the expected behavior, choose "interpreter+JVMCI" as the compile
mode or make it invalid to use JVMCI compiler when C2 is disabled?

It's very appreciative if I can get any opinion!

Thanks,
Xiaohong





More information about the hotspot-runtime-dev mailing list