Skip to content

Commit bd2439f

Browse files
author
Xin Liu
committedSep 22, 2023
8316702: Only evaluate buffer when IGVPrintLevelOption >= 5
Reviewed-by: chagedorn, thartmann
1 parent 4b65483 commit bd2439f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎src/hotspot/share/opto/compile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5127,7 +5127,7 @@ bool Compile::should_print_phase(CompilerPhaseType cpt) {
51275127
return false;
51285128
}
51295129

5130-
bool Compile::should_print_igv(int level) {
5130+
bool Compile::should_print_igv(const int level) {
51315131
#ifndef PRODUCT
51325132
if (PrintIdealGraphLevel < 0) { // disabled by the user
51335133
return false;

‎src/hotspot/share/opto/parse2.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -2779,13 +2779,14 @@ void Parse::do_one_bytecode() {
27792779
}
27802780

27812781
#ifndef PRODUCT
2782-
if (C->should_print_igv(1)) {
2782+
constexpr int perBytecode = 5;
2783+
if (C->should_print_igv(perBytecode)) {
27832784
IdealGraphPrinter* printer = C->igv_printer();
27842785
char buffer[256];
27852786
jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s", bci(), Bytecodes::name(bc()));
27862787
bool old = printer->traverse_outs();
27872788
printer->set_traverse_outs(true);
2788-
printer->print_method(buffer, 5);
2789+
printer->print_method(buffer, perBytecode);
27892790
printer->set_traverse_outs(old);
27902791
}
27912792
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.