RFR: 8266252: Streamline AbstractInterpreter::method_kind
Claes Redestad
redestad at openjdk.java.net
Wed May 5 09:55:54 UTC 2021
On Tue, 4 May 2021 01:44:08 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> This patch refactors AbstractInterpreter::method_kind to reduce branches on average while better compartmentalizing the exceptional cases.
>>
>> Additionally Method::is_empty_method is trivial enough that making it inlineable helps reduce cost while reducing size of the libjvm.
>>
>> Result is a 40% speed-up, or a reduction of .25% of instructions on Hello World that scales to larger applications.
>
> src/hotspot/share/interpreter/abstractInterpreter.cpp line 143:
>
>> 141: // _dsqrt will be selected for both Math::sqrt and StrictMath::sqrt, but the latter
>> 142: // is native. Keep treating it like a native method in the interpreter
>> 143: case vmIntrinsics::_dsqrt: return m->is_native() ? native : java_lang_math_sqrt;
>
> Maybe we should add an assert that m must be one of the two methods mentioned by the above comment?
Ok. I'll add an assertion that allows for the StrictMath variant to be re-implemented in java
-------------
PR: https://git.openjdk.java.net/jdk/pull/3798
More information about the hotspot-runtime-dev
mailing list