New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8265411: Avoid unnecessary Method::init_intrinsic_id calls #3564
8265411: Avoid unnecessary Method::init_intrinsic_id calls #3564
Conversation
|
Webrevs
|
Hi Ioi,
That all appears fine to me.
Is there any startup impact?
Thanks,
David
@iklam This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the
|
Hi David, when CDS is turned off, I can see a small improvement in start-up, due to the reduction in intrinsic ID lookup:
With CDS enabled, the intrinsic ID lookup is done during archive dump time, so this PR makes no difference. Also, the lookup table itself is generated during C++ compilation, so it has no runtime impact:
|
BTW, the the fix works for the problem: adding symbols to vmSymbols.hpp caused debug build failed due to this bug. |
Thanks @dholmes-ora and @yminqi for the review! |
@iklam Since your change was applied there have been 15 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 739769c. |
check_methods_for_intrinsics()
in classFileParser.cpp callsMethod::klass_id_for_intrinsics()
to see if a class has intrinsic methods. However, the latter returns any class whose name is included invmSymbols
. This causes many unnecessary calls toMethod::init_intrinsic_id()
.To fix this, we precompute the classes that are known to have intrinsics using
constexpr
. SeevmIntrinsics::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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3564/head:pull/3564
$ git checkout pull/3564
Update a local copy of the PR:
$ git checkout pull/3564
$ git pull https://git.openjdk.java.net/jdk pull/3564/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3564
View PR using the GUI difftool:
$ git pr show -t 3564
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3564.diff