From c49fb4fca278a35795023116df1023c9018f0844 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Thu, 23 Nov 2023 08:36:34 +0000 Subject: [PATCH] 8320403: C2: PrintIdeal is no longer dumped to tty when xtty is set Reviewed-by: kvn, thartmann --- 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 9d899933c2e8f..cda46c11841db 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -590,10 +590,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