RFR: 8257423: [PPC64] Support -XX:-UseInlineCaches
Martin Doerr
mdoerr at openjdk.java.net
Tue Dec 1 17:42:57 UTC 2020
On Tue, 1 Dec 2020 17:10:52 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> The JVM currently runs into Unimplemented() when using -XX:-UseInlineCaches in C2 code (postalloc_expand_java_dynamic_call_sched).
>> I'd like to enable the existing code in postalloc_expand_java_dynamic_call_sched and fix MachCallDynamicJavaNode::ret_addr_offset() and MacroAssembler::instr_size_for_decode_klass_not_null().
>> I suggest to use scratch emit to determine the size, because there are too many cases and emitting it once is fast.
>
> Hi Martin,
>
> this looks good to my non-compiler-eyes.
>
> Cheers, Thomas
Thanks for reviewing it!
> src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 3168:
>
>> 3166: int code_size = 8 * BytesPerInstWord;
>> 3167: CodeBuffer cb("decode_klass_not_null scratch buffer", code_size, 0);
>> 3168: MacroAssembler* a = new MacroAssembler(&cb);
>
> Idle thought: if this is done frequently, maybe MacroAssembler could have a "dry run" mode with no attached CodeBuffer, just counting instructions.
The scratch emit is only executed during the first call. Afterwards, the computed_size is just returned and we don't call the CodeBuffer constructor any more.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1521
More information about the hotspot-dev
mailing list