-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8311064: Windows builds fail without precompiled headers after JDK-8310728 #14701
Conversation
👋 Welcome back djelinski! A progress list of the required criteria for merging this PR into |
@djelinski The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
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 couldn't you include os_windows.inline.hpp
where the missing decl was needed?
Mostly because the same destructor is not inline in os_posix.cpp. |
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.
Okay. The changes seem harmless in that regard. We should have more consistency with the os specific inline definitions.
Thanks.
@djelinski 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 23 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 |
/integrate |
Going to push as commit af319d9.
Your commit was automatically rebased without conflicts. |
@djelinski Pushed as commit af319d9. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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.
@djelinski @dholmes-ora It's not obvious to me that this was the right fix for ZGC. Could you explain where in zPhysicalMemory.cpp we uses a ZListNode? If it is not and it is instead used in one of the included files the added include line should go there instead.
I also wonder where in ZVirtualMemory_windows.cpp we use zVirtualMemory.inline.hpp? The error message states that we miss ZMemory::end
etc. So, it seems like the appropriate fix would have been to include zMemory.inline.hpp instead.
@djelinski hotspot changes require two reviews before integration. @stefank I took it on faith that the ZGC changes were appropriate, or that a ZGC reviewer would report otherwise. If a hpp file is trying to use an inline function that is a problem in itself! |
This error:
certainly suggests to me that zPhysicalMemory.cpp needs the ZListNode header file. |
I didn't say that it was used in an hpp file. I said "included files" and implicitly meant an .inline.hpp file. |
How do you know that it isn't one of the include .inline.hpp files that needs the ZListNode destructor? |
Apologies for integrating this early, I wanted to get the CI off my back as quickly as possible, and the changes seemed innocuous enough. The compiler/linker output does not make it easy to figure out where the offending ZListNode destructor was called. I would guess that it could be called from the implicit ZMemory destructor, will try to confirm that. Good point about including zMemory instead of zVirtualMemory, I'll look into that. On a side note, I assume that the split into |
Understood. Thanks. We will take care of updating the ZGC code.
That's exactly what happens. There is an implicit usage of the inline function from our hpp files. This propagates from ZList -> ZMemory -> ZMemoryManager -> ZPhysicalMemoryManager. This is problematic and we will think about what we think about a solution that fits the ZGC code.
I tested it and it works.
The compile times are one reason. Another is to minimize issues with circular dependencies. |
Thanks. In case that helps, I verified that creating explicit inline destructors for ZMemory and ZMemoryManager in zMemory.inline.hpp also fixes the zPhysicalMemory linking problem. |
I don't know for certain but in the context of reviewing these changes the code change was not obviously incorrect in relation to the error message. |
Right, the change works, but it adds an include in a file that doesn't explicitly use that included functions. That shows that there is an issues somewhere else that we will likely show up to be a problem in the future. We've now identified that the issues is that zMemory.hpp has a dependency against the destructor in zList.inline.hpp. We'll deal with that a new RFE. |
Please review this change to fix Windows build without precompiled headers.
After JDK-8310728:
When precompiled headers are used, more headers are automatically included, which allowed the build to pass without this change.
This PR adds 2 includes and un-inlines
PlatformMutex
destructor, which was needed by 3 files and not easily exposed.Windows build passes with this change, both with and without precompiled headers. Full tier1-5 build in progress.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14701/head:pull/14701
$ git checkout pull/14701
Update a local copy of the PR:
$ git checkout pull/14701
$ git pull https://git.openjdk.org/jdk.git pull/14701/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14701
View PR using the GUI difftool:
$ git pr show -t 14701
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14701.diff
Webrev
Link to Webrev Comment