-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8267191: Avoid repeated SystemDictionaryShared::should_be_excluded calls #4070
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
8267191: Avoid repeated SystemDictionaryShared::should_be_excluded calls #4070
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
Mailing list message from Ioi Lam on hotspot-runtime-dev: Correcting the title of the PR: JDK-8267191: Avoid repeated SystemDictionaryShared::should_be_excluded calls On 5/17/21 10:55 AM, Ioi Lam wrote: |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ioi,
These changes seem fine.
A couple of nits below.
Thanks,
David
| if (k->is_hidden() && !is_registered_lambda_proxy_class(k)) { | ||
| ResourceMark rm; | ||
| log_warning(cds)("Skipping %s: super class %s is excluded", k->name()->as_C_string(), super->name()->as_C_string()); | ||
| log_debug(cds)("Skipping %s: %s", k->name()->as_C_string(), "Hidden class"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to feed "Hidden class" to a %s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
| if (super != NULL && check_for_exclusion(super, NULL)) { | ||
| ResourceMark rm; | ||
| log_debug(cds)("Skipping %s: %s", k->name()->as_C_string(), "Hidden class"); | ||
| log_warning(cds)("Skipping %s: super class %s is excluded @%p", k->name()->as_C_string(), super->name()->as_C_string(), super); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure we still don't/can't use %p in shared code, but should be INTPTR_FORMAT and use p2i(super)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted back to the original code and removed the %p. I added %p for temporary debugging only.
| if (should_be_excluded(intf)) { | ||
| log_warning(cds)("Skipping %s: interface %s is excluded", k->name()->as_C_string(), intf->name()->as_C_string()); | ||
| if (check_for_exclusion(intf, NULL)) { | ||
| log_warning(cds)("Skipping %s: interface %s is excluded @%p", k->name()->as_C_string(), intf->name()->as_C_string(), intf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto on %p
|
@iklam This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. 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 ➡️ To integrate this PR with the above commit message to the |
coleenp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
Thanks @coleenp and @dholmes-ora for the review! |
|
@iklam Since your change was applied there have been 26 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit b961f25. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
SystemDictionaryShared::should_be_excludedis called during CDS dump time to see if a class should be excluded from the archive. This function calls itself to check super types. As a result, some classes many be checked more than once.The repeated calls slows down dumping. Also, If a class is excluded, we will see multiple warning messages like this, which is too verbose and confusing.
BTW, to make the code a little easier to read, I also changed
to
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4070/head:pull/4070$ git checkout pull/4070Update a local copy of the PR:
$ git checkout pull/4070$ git pull https://git.openjdk.java.net/jdk pull/4070/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4070View PR using the GUI difftool:
$ git pr show -t 4070Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4070.diff