HotSpotResolvedJavaMethod#setNotInlineable() in JVMCI

Doug Simon doug.simon at oracle.com
Wed May 17 11:52:37 UTC 2017


> On 17 May 2017, at 00:50, Christian Thalinger <cthalinger at twitter.com> wrote:
> 
> 
>> On May 15, 2017, at 8:27 PM, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
>> 
>> Hi all,
>> 
>> I've tried to use JVMCI implementation.
>> 
>> HotSpotResolvedJavaMethod#setNotInlineable() is explained that "Manually adds a DontInline annotation to this method" in the comment, however this method seems to disable C1/C2 compile in CompilerToVM [1][2].
>> 
>> Is this behavior correct?
>> Should we fix the comment or method name (and / or function name) or behavior in jvmciCompilerToVM.cpp ?
> 
> Yes, that’s a bit confusing.  I think HotSpotResolvedJavaMethodImpl.setNotInlineable should be renamed and the documentation updated.

I agree. I've can confirm that the expectation of the single user of this API[1] is for the method to never be inlined or compiled by HotSpot. The method name should be changed to setNotInlineableOrCompileable. As part of this change, the documentation for CompilerToVM.doNotInlineOrCompile[2] should also be fixed to reflect that it is a setter, not a getter. 

-Doug

[1] https://github.com/graalvm/graal/blob/ddebb13523f54112c552f38ff87e23c6034ff725/compiler/src/org.graalvm.compiler.truffle.hotspot/src/org/graalvm/compiler/truffle/hotspot/HotSpotTruffleRuntime.java#L228
[2] http://hg.openjdk.java.net/jdk9/dev/hotspot/file/507f8a7678b4/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java#l462


> 
>> 
>> 
>> I will file it to JBS if it is a bug.
>> 
>> 
>> Thanks,
>> 
>> Yasumasa (ysuenaga)
>> 
>> 
>> [1] http://hg.openjdk.java.net/jdk9/dev/hotspot/file/d6d7e5caf497/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java#l320
>> [2] http://hg.openjdk.java.net/jdk9/dev/hotspot/file/d6d7e5caf497/src/share/vm/jvmci/jvmciCompilerToVM.cpp#l1004
> 



More information about the hotspot-compiler-dev mailing list