-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365829: Multiple definitions of static 'phase_names' #26851
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back fandreuz! A progress list of the required criteria for merging this PR into |
@fandreuz 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 47 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kimbarrett) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
|
src/hotspot/share/opto/phasetype.hpp
Outdated
class CompilerPhaseTypeHelper { | ||
public: | ||
static const char* phase_descriptions[]; | ||
static const char* phase_names[]; |
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.
Is there a reason for these to be public rather than private?
Also, we "always" prefix data member names with a leading underscore; see Style Guide.
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.
phase_name
is accessed by static CompilerPhaseType find_phase
, should we make it a friend
of the CompilerPhaseTypeHelper
?
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.
Underscore: 90e9c53
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.
Don't make it a friend, make it a static member function, and fix the one
caller (later in this file). (The definition of find_phase could be moved to
the new .cpp file.) I think the caller also has an ODR problem, with calls
from different including TUs getting a different file-scoped find_phase.
It looks like there might be a lot of file-scoped static declarations from
header files in our code. I've made a note to look into this.
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.
Sure: cc7da3a
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.
/integrate |
opto/phasetype.hpp
definesstatic const char* phase_names[]
compiler/compilerEvent.cpp
definesstatic GrowableArray<const char*>* phase_names
This is not a problem when the two files are compiled as different translation units, but it causes a build failure if any of them is pulled in by a precompiled header:
Passes
tier1
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26851/head:pull/26851
$ git checkout pull/26851
Update a local copy of the PR:
$ git checkout pull/26851
$ git pull https://git.openjdk.org/jdk.git pull/26851/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26851
View PR using the GUI difftool:
$ git pr show -t 26851
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26851.diff
Using Webrev
Link to Webrev Comment