RFR: JDK-8280274: Guard printing code of Compile::print_method in PRODUCT
Tobias Holenstein
duke at openjdk.java.net
Fri Jan 21 12:03:09 UTC 2022
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
-------------
Commit messages:
- JDK-8280274: Guard printing code of Compile::print_method in PRODUCT
Changes: https://git.openjdk.java.net/jdk/pull/7158/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7158&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280274
Stats: 8 lines in 2 files changed: 2 ins; 0 del; 6 mod
Patch: https://git.openjdk.java.net/jdk/pull/7158.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7158/head:pull/7158
PR: https://git.openjdk.java.net/jdk/pull/7158
More information about the hotspot-compiler-dev
mailing list