RFR: 8271911: replay compilations of methods which use JSR292 (easy cases) [v2]

Dean Long dlong at openjdk.java.net
Thu Sep 2 22:43:29 UTC 2021


On Thu, 2 Sep 2021 12:38:42 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> I still miss the connection between `ciInstanceKlass::dump_replay_data()` and `ciEnv::find_dynamic_call_sites()` cases. 
>> 
>> `ciEnv::find_dynamic_call_sites()` dumps all invokedynamic and invokehandle (MH.invoke*()) call sites and MethodHandle CP Constants across the class hierarchy. Any particular benefit compared to just dumping that info on per ciInstanceKlass granularity?
>
> Also, one more question: why do you dump MethodHandle CP constants and invokehandle call sites? Is it to record the connection between MethodHandle instances and hidden classes behind LambdaForms they are implemented with?

> I still miss the connection between `ciInstanceKlass::dump_replay_data()` and `ciEnv::find_dynamic_call_sites()` cases.
> 
> `ciEnv::find_dynamic_call_sites()` dumps all invokedynamic and invokehandle (MH.invoke*()) call sites and MethodHandle CP Constants across the class hierarchy. Any particular benefit compared to just dumping that info on per ciInstanceKlass granularity?

Actually, find_dynamic_call_sites doesn't do the dumping, it just builds a map, so we only dump call sites that for hidden classes that are referenced in the replay data, preserving existing behavior.  The dumping of subclasses in ciInstanceKlass::dump_replay_data confused me too, so I asked Tom Rodriguez about it.  It's a substitute for CHA info in the reply file.  If we load sublcasses of all the ciInstanceKlass's, then hopefully CHA queries will give the same answer at replay time.  Note that not all subclasses have a ciInstanceKlass in the metadata.  Subclasses of java.lang.Object include lots of hidden classes not referenced directly in the ci metadata.

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

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


More information about the hotspot-compiler-dev mailing list