New type-profiling points in HotSpot, how to use them from Graal?

Garcia Gutierrez Miguel Alfredo miguelalfredo.garcia at epfl.ch
Fri Mar 7 14:37:58 UTC 2014


Roland,

Per-callsite profiling of actual-return-type looks promising to

  (a) achieve one of the benefits of inlining (letting the JIT compiler specialize the usages of an invocation, ie specialize dependent code to the type actually returned)

  (b) without actually inlining

For example, for a monomorphic callsite the dispatched method is (sometimes) an override with a more specific actual return type. In case inlining doesn't inline it, the more precise type information remains unexploited.

I hadn't thought about levering that profiling info for invokedynamic (but will look into it, thanks for the link to the webrev).


Miguel

--
Miguel Garcia
Swiss Federal Institute of Technology
EPFL - IC - LAMP1 - INR 328 - Station 14
CH-1015 Lausanne - Switzerland
http://lamp.epfl.ch/~magarcia/

________________________________________
From: Roland Westrelin [roland.westrelin at oracle.com]
Sent: Friday, March 07, 2014 2:37 PM
To: Garcia Gutierrez Miguel Alfredo
Cc: Christian Thalinger; graal-dev at openjdk.java.net
Subject: Re: New type-profiling points in HotSpot, how to use them from Graal?

Hi Miguel,

>>> It would be great to hear more about that (recently added) functionality in HotSpot.
>
>> What would you like to hear?
>
> Any kind of context on the problem would be of help, e.g. what code needs to be changed in Graal.

We use the new profiling to improve code generation in c2 with dynamic languages that use invokedynamic. The way we use it in c2 is with what we call type speculation. It was pushed with this change:

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/b2ee5dc63353

and a number of fixes and improvements has been following since.

What are you trying to achieve?

Roland.




More information about the graal-dev mailing list