-
Notifications
You must be signed in to change notification settings - Fork 121
8366440: [lworld] Two tests broken with JDK-8364483 #1544
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
Conversation
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
@coleenp 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 226 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
// Just poking the system dictionary to see if the class has already be loaded | ||
// Just poking the system dictionary to see if the class has already be loaded. Looking for migrated classes | ||
// used when --enable-preview when jdk isn't compiled with --enable-preview so doesn't include LoadableDescriptors. | ||
// This is temporary. |
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 was talking to Simms earlier and we think we should have a classfile check (i.e. ensure we are running whatever major + preview we are on at the moment), and then disable the whole loadabledescriptor functionality if the version doesn't match up. When we do this, we should probably consider that here as well. What do you think?
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.
Just to clarify, this PR is fine as-is but do you agree that we should include this part of code if that classfile checking manifests itself?
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's under EnablePreview, like a lot of the code. I'm hoping EnablePreview might check for classfile version? Although it's a good question, maybe we do this speculative lookup only if classfile version is not preview.
This code unconditionally loads a bunch of classes in the bootclass loader, but doesn't add them to other class loaders as initiated classes unless EnablePreview is on. I was thinking about how to load them only for EnablePreview as a separate change.
oop loader = loader_data()->class_loader(); | ||
InstanceKlass* klass = SystemDictionary::find_instance_klass(THREAD, name, Handle(THREAD, loader)); | ||
if (klass != nullptr && klass->is_inline_klass()) { | ||
_inline_layout_info_array->adr_at(fieldinfo.index())->set_klass(InlineKlass::cast(klass)); | ||
log_info(class, preload)("Preloading of class %s during loading of class %s " | ||
"(cause: field type not in LoadableDescriptors attribute) succeeded", |
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.
"field type not in LoadableDescriptors" yet "succeeded" seems contradictory. Correct me if I'm wrong, but I think successful preloading implies that this class was (potentially transitively) in a LoadableDescriptors attribute of some class being loaded.
I'm not sure I follow why we suddenly introduce a log message here which is never checked in the tests. Could you elaborate?
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 couldn't figure out how to write this test (even though we do reach this code), or rather I didn't want to delay this change while figuring out how to write a test because it was breaking the CI.
Even though this doesn't technically preload the class, I wanted the log message to look like the other preloading messages, so kept "Preloading". And I wanted to keep "field type". How about:
Preloading of class %s during loading of class $s (cause: field type where LoadableDescriptors attribute is missing) succeeded
Although that's really long. Suggestions welcome!
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 reworded the logging message so hopefully it makes more sense.
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 don't see the new logging message but since we discussed this extensively in the meeting I'm very happy to approve nonetheless. Let me know if you would like me to look at anything else, otherwise thank you for fixing these tests!!
Thanks Paul. The path with the log message needs a test, but I want to integrate this to fix the noise in the testing. Thank you for reviewing and your comments. |
Going to push as commit 4b93af7.
Your commit was automatically rebased without conflicts. |
I added some logging and fixed the tests so that one doesn't rely on a migrated class in java.base to throw a VerifyError (will make a parallel fix to this test in mainline). The other, I changed the logging message that it is looking for. More tests in this area will be added.
Tested locally.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1544/head:pull/1544
$ git checkout pull/1544
Update a local copy of the PR:
$ git checkout pull/1544
$ git pull https://git.openjdk.org/valhalla.git pull/1544/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1544
View PR using the GUI difftool:
$ git pr show -t 1544
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1544.diff
Using Webrev
Link to Webrev Comment