RFR: JDK-8280274: Guard printing code of Compile::print_method in PRODUCT [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Fri Jan 21 15:11:44 UTC 2022
On Fri, 21 Jan 2022 13:51:19 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
>
> Tobias Holenstein has updated the pull request incrementally with two additional commits since the last revision:
>
> - minor code style update
>
> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
> - minor code style update
>
> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
Right, makes sense. Looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7158
More information about the hotspot-compiler-dev
mailing list