From 1bb54cb1722463a0d6ffe2eb3774e0a21aaeab83 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Wed, 22 Nov 2023 10:36:37 +0100 Subject: [PATCH] 8320403: C2: PrintIdeal is no longer dumped to tty when xtty is set --- src/hotspot/share/opto/compile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index 3dfcd14b38254..f221c82cdc61c 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -589,10 +589,12 @@ void Compile::print_ideal_ir(const char* phase_name) { compile_id(), is_osr_compilation() ? " compile_kind='osr'" : "", phase_name); - xtty->print("%s", ss.as_string()); // print to tty would use xml escape encoding + } + + tty->print("%s", ss.as_string()); + + if (xtty != nullptr) { xtty->tail("ideal"); - } else { - tty->print("%s", ss.as_string()); } } #endif