RFR: JDK-8280274: Guard printing code of Compile::print_method in PRODUCT
Nils Eliasson
neliasso at openjdk.java.net
Fri Jan 21 13:42:51 UTC 2022
On Thu, 20 Jan 2022 13:30:05 GMT, Tobias Holenstein <duke at openjdk.java.net> wrote:
> In `Compile::print_method(CompilerPhaseType cpt, Node* n, int level)` the code
> ```
> ResourceMark rm;
> stringStream ss;
> ss.print_raw(CompilerPhaseTypeHelper::to_string(cpt));
> if (n != NULL) {
> ss.print(": %d %s ", n->_idx, NodeClassNames[n->Opcode()]);
> } else {
> ss.print_raw(": NULL");
> }
> ```
> should to be guarded by a `#ifndef PRODUCT` since the usage of the string is also guarded in `Compile::print_method_impl`
>
> Tested on Tier1-3
Looks good.
-------------
Marked as reviewed by neliasso (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7158
More information about the hotspot-compiler-dev
mailing list