[11] RFR(XS) 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Jul 12 14:41:46 UTC 2018
Thank you, Doug
I assumed that UseJVMCCompiler is indication that Graal will be used instead of C2 in any case including libgraal. That
is what used when C2 compiler is initialized:
http://hg.openjdk.java.net/jdk/jdk/file/6c449bdee4fa/src/hotspot/share/compiler/compileBroker.cpp#l617
On other hand even if Graal is used through Truffle having additional traps data will only lead to slightly worse
generated code - nothing else as I understand.
Thanks,
Vladimir
On 7/12/18 2:14 AM, Doug Simon wrote:
>
>
>> On 12 Jul 2018, at 03:20, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>
>> http://cr.openjdk.java.net/~kvn/8206953/webrev.00/
>>
>> https://bugs.openjdk.java.net/browse/JDK-8206953
>>
>> Original JVMCI patch changed behavior how exception are recorded in MDO [1] even when JVMCI is not used.
>>
>> Originally when method executed in Interpreter throws ClassCastException it will incremented number of class_cast traps in method's MDO. later when C2 see that it will inline throw code instead of generating uncommon trap to avoid useless deoptimization [2].
>>
>> Test TestTypeProfiling.java was added recently and checks deoptimization events based on behaviour introduced with JVMCI. But when JVMCI is not build (PPC64, s360 and my testing for JDK-8206135) test will fail.
>>
>> The fix restored original behavior when C2 is used by checking if Graal is not used.
>
> The new check only tests whether Graal is being used by the VM as JIT but doesn't take into account whether Graal is being used via its Java API (e.g. Truffle). I think that's ok but maybe Tom and Gilles can confirm.
>
> -Doug
>
More information about the hotspot-compiler-dev
mailing list