RFR: 8265411: Avoid unnecessary Method::init_intrinsic_id calls [v2]
Ioi Lam
iklam at openjdk.java.net
Tue Apr 20 18:15:39 UTC 2021
> `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.
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'master' into 8265411-avoid-unnecessary-method-init-intrinsic-id
- more fixes
- Improve vmIntrinsics with constexpr
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3564/files
- new: https://git.openjdk.java.net/jdk/pull/3564/files/eb8e0bf6..f4857a66
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3564&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3564&range=00-01
Stats: 5993 lines in 210 files changed: 3199 ins; 2216 del; 578 mod
Patch: https://git.openjdk.java.net/jdk/pull/3564.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3564/head:pull/3564
PR: https://git.openjdk.java.net/jdk/pull/3564
More information about the hotspot-dev
mailing list