diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index 51177774ba9..42729fcd214 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -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; diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp index 03bcba13346..24fecff3734 100644 --- a/src/hotspot/share/opto/parse2.cpp +++ b/src/hotspot/share/opto/parse2.cpp @@ -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