RFR: 8266252: Streamline AbstractInterpreter::method_kind
Ioi Lam
iklam at openjdk.java.net
Tue May 4 01:48:52 UTC 2021
On Thu, 29 Apr 2021 16:04:54 GMT, Claes Redestad <redestad 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.
Looks good to me. Just a minor nit about asserts.
For other reviewers, you can get better diffs by adding `?w=1` to ignore whitespace changes. I.e., `https://github.com/openjdk/jdk/pull/3798/files?w=1`
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?
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3798
More information about the hotspot-runtime-dev
mailing list