RFR: 8328275: CodeCache::print_internals should not be called in PRODUCT code

Julian Waters jwaters at openjdk.org
Sun Mar 17 08:32:28 UTC 2024


On Fri, 15 Mar 2024 16:56:52 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> > 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

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18330#issuecomment-2002361360


More information about the hotspot-runtime-dev mailing list