Integrated: 8265411: Avoid unnecessary Method::init_intrinsic_id calls
Ioi Lam
iklam at openjdk.java.net
Wed Apr 21 01:46:10 UTC 2021
On Mon, 19 Apr 2021 05:52:02 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> `check_methods_for_intrinsics()` in classFileParser.cpp calls `Method::klass_id_for_intrinsics()` to see if a class has intrinsic methods. However, the latter returns any class whose name is included in `vmSymbols`. This causes many unnecessary calls to `Method::init_intrinsic_id()`.
>
> To fix this, we precompute the classes that are known to have intrinsics using `constexpr`. See `vmIntrinsics::class_has_intrinsics`.
>
> After the fix, when running `java -Xshare:off -version`, the number of classes initialized for intrinsics is reduced from 130 to 30.
>
> Testing: mach5 tiers 1~4 passed.
This pull request has now been integrated.
Changeset: 739769c8
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/739769c8
Stats: 54 lines in 5 files changed: 47 ins; 0 del; 7 mod
8265411: Avoid unnecessary Method::init_intrinsic_id calls
Reviewed-by: dholmes, minqi
-------------
PR: https://git.openjdk.java.net/jdk/pull/3564
More information about the hotspot-dev
mailing list