mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-25 21:07:57 +00:00
8316702: Only evaluate buffer when IGVPrintLevelOption >= 5
Reviewed-by: chagedorn, thartmann
This commit is contained in:
parent
4b65483921
commit
bd2439f3fc
@ -5127,7 +5127,7 @@ bool Compile::should_print_phase(CompilerPhaseType cpt) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Compile::should_print_igv(int level) {
|
||||
bool Compile::should_print_igv(const int level) {
|
||||
#ifndef PRODUCT
|
||||
if (PrintIdealGraphLevel < 0) { // disabled by the user
|
||||
return false;
|
||||
|
||||
@ -2779,13 +2779,14 @@ void Parse::do_one_bytecode() {
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (C->should_print_igv(1)) {
|
||||
constexpr int perBytecode = 5;
|
||||
if (C->should_print_igv(perBytecode)) {
|
||||
IdealGraphPrinter* printer = C->igv_printer();
|
||||
char buffer[256];
|
||||
jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s", bci(), Bytecodes::name(bc()));
|
||||
bool old = printer->traverse_outs();
|
||||
printer->set_traverse_outs(true);
|
||||
printer->print_method(buffer, 5);
|
||||
printer->print_method(buffer, perBytecode);
|
||||
printer->set_traverse_outs(old);
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user