RFR: 8275086: compiler/c2/irTests/TestPostParseCallDevirtualization.java fails when compiler1 is disabled

SUN Guoyun duke at openjdk.java.net
Tue Oct 12 08:15:57 UTC 2021


On Tue, 12 Oct 2021 07:53:17 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> I found the compilation info with c1 is:
>> <pre><code class="shell">
>>  937    b  3       compiler.c2.irTests.TestPostParseCallDevirtualization::testMethodHandleCallWithCCP (50 bytes)
>>  938    b  1       compiler.c2.irTests.TestPostParseCallDevirtualization::method2 (3 bytes)
>>  939    b  3       java.lang.reflect.Method::getParameterCount (6 bytes)
>>  940    b  3       java.lang.reflect.Method::invoke (65 bytes)          
>>  941    b  3       jdk.internal.reflect.DelegatingMethodAccessorImpl::invoke (10 bytes)
>>  942   !b  3       compiler.lib.ir_framework.test.CustomRunTest::invokeTest (76 bytes)
>>  943    b  3       jdk.test.lib.Asserts::assertEquals (7 bytes)         
>>  944   !b  3       jdk.internal.reflect.GeneratedMethodAccessor1::invoke (62 bytes)
>>  945    b  3       java.lang.invoke.LambdaForm$DMH/0x00000008000e3c00::invokeStatic (20 bytes)
>>  946    b  3       jdk.test.lib.Asserts::assertEquals (42 bytes)        
>>  947    b  4       compiler.c2.irTests.TestPostParseCallDevirtualization::testMethodHandleCallWithCCP (50 bytes)
>> </code></pre>
>> here compile id 945 be called.
>> but the info without c1 is:
>> 
>> <pre><code class="shell">
>> 254     n       java.lang.invoke.MethodHandle::invokeBasic()I (native)   
>> 255    b        java.lang.invoke.MethodHandleImpl::isCompileConstant (2 bytes)
>> 256    b        compiler.c2.irTests.TestPostParseCallDevirtualization::method2 (3 bytes)
>> 257    b        compiler.c2.irTests.TestPostParseCallDevirtualization::testMethodHandleCallWithCCP (50 bytes)
>> </code></pre>
>> the compile id 254 be called
>
>> here compile id 945 be called.
> 
> What do you mean by that?
> 
> IR verification fails because post-parse call devirtualization was not able to replace the `invokeBasic` by an `invokeStatic` in the C2 compiled `testMethodHandleCallWithCCP` method. In theory, that should not be dependent on the availability of C1. So I'm wondering why it fails without C1. Did you check if increasing the number of warmup iterations helps?

@TobiHartmann I don't quite understand the  “post-parse call devirtualization" now. so I just find some info from -XX+PrintIdeal and -XX:+PrintComplation. 

I have try again with -DWarmup=10000, and I set it in fileTestVMProcess.java, I`m not sure it is ok. the result is also FAILD.
<pre><code class="shell">
Command Line:

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

PR: https://git.openjdk.java.net/jdk/pull/5903


More information about the hotspot-compiler-dev mailing list