selective inlining of MH.invokeExact() callsites

Rémi Forax forax at univ-mlv.fr
Wed May 9 11:15:24 PDT 2012


On 05/09/2012 08:02 PM, Christian Thalinger wrote:
> On May 8, 2012, at 2:11 AM, Garcia Gutierrez Miguel Alfredo wrote:
>
>> What's the behavior of @ForceInlining , in particular for MethodHandle.invokeExact() ?
> We introduced that annotation as an experiment for inlining exact invokers for LambdaForms (note:  LambdaForm is not directly related to Project Lambda).  The generated bytecode versions of these LFs are usually just argument shuffling or binding and calling the target.  We know that this code compiles down to almost nothing in native machine code and that's why we force them to inline.
>
> The ForceInline annotation is a powerful tool which may produce bad results in the hands of costumers.  Currently we don't hide it completely from users but that might happen in the future.

and Christian correctly if I'm wrong but it only forces inlining when 
the JIT is triggered.
So using the annotation on something which is not called enough will do 
nothing.

As I said in an earlier mail, the golden hammer is the annotation
PleaseJITThisCodeWithAPrivateMetaDataObjectNowAndReJITLaterWhenTheMethodOrTheLoopIsHot 


>
> -- Chris

Rémi



More information about the mlvm-dev mailing list