-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8260467: Move well-known classes from systemDictionary.hpp to vmClasses.hpp #2246
8260467: Move well-known classes from systemDictionary.hpp to vmClasses.hpp #2246
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
/label remove serviceability |
@iklam |
Webrevs
|
The name
|
Mailing list message from Coleen Phillimore on hotspot-dev: On 1/26/21 7:04 PM, Ioi Lam wrote:
I agree! |
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,
This first step at refactoring and renaming looks good.
Only one comment below.
Thanks,
David
|
||
#if INCLUDE_CDS | ||
|
||
void vmClasses::resolve_shared_class(InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS) { |
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.
It isn't at all obvious to me why this functionality was relocated. I don't see anything vmClasses related in here. ??
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.
vmClasses::resolve_shared_class()
is a private method and is called from here:
bool vmClasses::resolve(VMClassID id, TRAPS) {
InstanceKlass** klassp = &_klasses[as_int(id)];
...
InstanceKlass* k = *klassp;
resolve_shared_class(k, ....); <---- HERE
}
Maybe the function name is not clear enough. It's meant to "resolve a vmClass from the CDS archive". It used to be the (even more confusingly named) SystemDictionary::quick_resolve()
method.
@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 |
Mailing list message from David Holmes on hotspot-dev: On 27/01/2021 5:52 pm, Ioi Lam wrote:
Thanks for clarifying - the fact it has a single caller was not clear. David |
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.
Why not consolidate vmClassMacros.hpp into vmClassID.hpp ?
ciEnv.hpp uses the VM_CLASSES_DO macro, but does not use anything inside vmClassID.hpp. As a result, vmClassMacros.hpp is included by 468 .o files, but vmClassID.hpp is included only by 318 files. |
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.
Ok!
Thanks @coleenp and @dholmes-ora for the review! |
The "well-known classes" API in systemDictionary.hpp is for accessing a fixed set of classes defined by the bootstrap loader. The rest of systemDictionary.hpp is for finding/defining arbitrary classes in arbitrary class loaders. For modularity, we should separate these two sets of APIs, and make them independent of each other.
The proposed API follows the existing pattern of accessing known symbols/intrinsics in vmSymbols.hpp and vmIntrinsics.hpp:
Note: to help the review process and limit the amount of boiler-place changes, within this RFE, we do not change existing calls like
SystemDictionary::Object_klass()
tovmClasses::Object_klass()
. That will be done in a subtask (JDK-8260471 -- preliminary webrev).Within this RFE, we temporarily subclass
SystemDictionary
fromvmClasses
, soSystemDictionary::Object_klass()
will continue to work.Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2246/head:pull/2246
$ git checkout pull/2246