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

Richard Reingruber rrich at openjdk.java.net
Fri Dec 4 10:48:11 UTC 2020


On Tue, 1 Dec 2020 17:38:17 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> 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.

I just asked myself how this is thread safe then. Well it is not. The scratch emit ist executed at most once /per thread/ ;)

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

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


More information about the hotspot-dev mailing list