RFR: JDK-8278329: some TraceDeoptimization code not included in PRODUCT build

Doug Simon dnsimon at openjdk.java.net
Wed Dec 15 14:19:04 UTC 2021


On Tue, 7 Dec 2021 14:46:05 GMT, Tobias Holenstein <duke at openjdk.java.net> wrote:

> After "JDK-8154011: Make `TraceDeoptimization` a diagnostic flag" some code was not included in the PRODUCT build. 
> 
> Removed all the #ifndef PRODUCT guards around `TraceDeoptimization` checks and made sure to be consistent. 
> 
> The DEOPT PACKING messages were controlled by `PrintDeoptimizationDetails` (develop flag), but DEOPT UNPACKING is controlled by `TraceDeoptimization` (product flag),. Therefore changed DEOPT PACKING messages to be controlled by `TraceDeoptimization` as well. 
> 
> Checked that tests are not affected. Checked on Aurora that performance is not affected.

Marked as reviewed by dnsimon (Committer).

src/hotspot/share/runtime/deoptimization.cpp line 246:

> 244:     if (TraceDeoptimization) {
> 245:       tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, p2i(result), p2i(thread));
> 246:       tty->cr();

Is this `tty->cr()` necessary given the `print_cr` call above?

src/hotspot/share/runtime/deoptimization.cpp line 734:

> 732:     tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d",
> 733:                   p2i(thread), p2i(array), exec_mode);
> 734:     tty->cr();

Same question as above about the necessity of `cr()`.

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

PR: https://git.openjdk.java.net/jdk/pull/6746


More information about the hotspot-dev mailing list