RFR: 8257423: [PPC64] Support -XX:-UseInlineCaches

Thomas Stuefe stuefe at openjdk.java.net
Tue Dec 1 17:13:57 UTC 2020


On Mon, 30 Nov 2020 15:37:34 GMT, Martin Doerr <mdoerr 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

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 3166:

> 3164:       // Determine by scratch emit.
> 3165:       ResourceMark rm;
> 3166:       int code_size = 8 * BytesPerInstWord;

Is this enough? Can CodeBuffers expand?

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.

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

Marked as reviewed by stuefe (Reviewer).

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


More information about the hotspot-dev mailing list