jdk
jdk copied to clipboard
8328275: CodeCache::print_internals should not be called in PRODUCT code
Please review this trivial patch that fixes the compilation on Windows with --enable-jvm-feature-link-time-opt
.
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8328275: CodeCache::print_internals should not be called in PRODUCT code (Bug - P3)
Reviewers
- Magnus Ihse Bursie (@magicus - Reviewer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18330/head:pull/18330
$ git checkout pull/18330
Update a local copy of the PR:
$ git checkout pull/18330
$ git pull https://git.openjdk.org/jdk.git pull/18330/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18330
View PR using the GUI difftool:
$ git pr show -t 18330
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18330.diff
Webrev
:wave: Welcome back djelinski! A progress list of the required criteria for merging this PR into master
will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@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:
8328275: CodeCache::print_internals should not be called in PRODUCT code
Reviewed-by: ihse, jwaters, dholmes
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 71 new commits pushed to the master
branch:
- c342188fd978dd94e7788fb0fb0345fd8c0eaa9a: 8328074: Add jcheck whitespace checking for assembly files
- 3c70f26b2f3fa9bc143e2506af30f9b1daf20022: 8328112: Remove CardTable::_guard_region
- 48717d63cc58f693f0917e61eafd672cd6af02ed: 8326333: jshell <TAB> completion on arrays is incomplete
- ece4124f25f676da9bf2d1b7fd8e4394dd7d31af: 8328247: Remove redundant dir for tests converted from applet to main
- d32ce65781c1d7815a69ceac720cdf3ae39caa9e: 8327651: Rename DictionaryEntry members related to protection domain
- 07194195cefc568048fa639b6f8534ce3718c8d2: 8328236: module_entry in CDS map file has stale value
- 0204aacb0305e94a7d6d5299a5ae835f3f71b030: 8328115: Convert java/awt/font/TextLayout/TestJustification.html applet test to main
- 9bc1b065db238b7c9d0562f9bd55d2f338c6ff3d: 8328242: Add a log area to the PassFailJFrame
- 65a84c2642822862fa186f290f8d6e83537bea06: 8328006: refactor large anonymous inner class in HtmlDocletWriter
- 044f4ed55dfce7f1aed9e10accf459b4af9b975e: 8326979: (jdeps) improve the error message for FindException caused by InvalidModuleDescriptorException
- ... and 61 more: https://git.openjdk.org/jdk/compare/8f9899b23ee46ad986bc719d3e2eec722d8d6bf8...master
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 master
branch, type /integrate in a new comment.
@djelinski The following label will be automatically applied to this pull request:
-
hotspot-runtime
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.
Without this patch, the build fails with:
java.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CodeCache::print_internals(void)" (?print_internals@CodeCache@@SAXXZ)
The method is defined in codeCache.cpp, but only when PRODUCT
is not defined.
PrintCodeCache2
is a develop
flag; when PRODUCT
is defined, PrintCodeCache
is declared as:
const bool PrintCodeCache = false;
When compiling with the default optimization level (O2), the call to print_internals
is optimized away. However, when compiling with whole program optimization (GL), the optimization doesn't happen, and the linker complains about missing symbol.
When compiling with the default optimization level (O2), the call to print_internals is optimized away. However, when compiling with whole program optimization (GL), the optimization doesn't happen
Which, incidentally, also says something about the quality of the optimizations of /GL...
When compiling with the default optimization level (O2), the call to print_internals is optimized away. However, when compiling with whole program optimization (GL), the optimization doesn't happen
Which, incidentally, also says something about the quality of the optimizations of /GL...
I believe when -GL is passed the optimizations are saved for later at link time, which is why the optimization doesn't happen within the object file at compile time, and hence why the linker catches it later on when Link Time Optimization is on
Thanks for the reviews!
/integrate
Going to push as commit c0fc9563a707cb01db4baf3aebede5f6b3ea08d1.
Since your change was applied there have been 89 commits pushed to the master
branch:
- 4ef591f71f62ee6ea8a603ed7a3e568b348b2c16: 8326964: Remove Eclipse Shared Workspaces
- ac5b6cb2d42bdb8fb1a110ad33411b50cff4ea61: 8327757: Convert javax/swing/JSlider/6524424/bug6524424.java applet to main
- 652fb3aa48fdfe09e827c2a06f76b3a69c711b74: 8328154: Convert sun/java2d/loops/CopyAreaSpeed.java applet test to main
- 9059727df135dc90311bd476124f090b5766092b: 8327182: Move serverAlias into the loop
- 2dd5fba3bd37c577b8442b67a67dbcb22b9a530e: 8319889: Vector API tests trigger VM crashes with -XX:+StressIncrementalInlining
- 3f2e849c54c2a9c55e3b5c9f5a6d3478b83144e3: 8280392: java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java failed with "RuntimeException: Test failed."
- c901da48e30d53cb8e4e3c1f0584c5f2d3d095f1: 8327098: GTest needs larger combination limit
- 9e32db266e4c3cc9be273fa6b77112832a43ba4a: 8328309: Remove malformed masked shift instruction selection patterns
- fc0472baf9bad298e853bf2ca3d10dc9415272cd: 8328000: Convert /java/awt/im/8154816/bug8154816.java applet test to main
- 85fc47c81af81a595dc88e61454d8ba2d860f301: 8327180: Failed: java/io/ObjectStreamClass/ObjectStreamClassCaching.java#G1
- ... and 79 more: https://git.openjdk.org/jdk/compare/8f9899b23ee46ad986bc719d3e2eec722d8d6bf8...master
Your commit was automatically rebased without conflicts.
@djelinski Pushed as commit c0fc9563a707cb01db4baf3aebede5f6b3ea08d1.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.