From bf7d40d0486b7b4e4820bb5d08a63c446ea3291d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Maillard?= Date: Wed, 11 Jun 2025 11:08:38 +0000 Subject: [PATCH] 8356751: IGV: clean up redundant field _should_send_method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Manuel Hässig Reviewed-by: mhaessig, thartmann, dfenacci --- src/hotspot/share/opto/idealGraphPrinter.cpp | 16 ++++++---------- src/hotspot/share/opto/idealGraphPrinter.hpp | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/hotspot/share/opto/idealGraphPrinter.cpp b/src/hotspot/share/opto/idealGraphPrinter.cpp index 3721394c112..1ecb46eaf5a 100644 --- a/src/hotspot/share/opto/idealGraphPrinter.cpp +++ b/src/hotspot/share/opto/idealGraphPrinter.cpp @@ -155,7 +155,6 @@ void IdealGraphPrinter::init(const char* file_name, bool use_multiple_files, boo // in the mach where kill projections have no users but should // appear in the dump. _traverse_outs = true; - _should_send_method = true; _output = nullptr; buffer[0] = 0; _depth = 0; @@ -300,13 +299,11 @@ void IdealGraphPrinter::print_inline_tree(InlineTree *tree) { void IdealGraphPrinter::print_inlining() { // Print inline tree - if (_should_send_method) { - InlineTree *inlineTree = C->ilt(); - if (inlineTree != nullptr) { - print_inline_tree(inlineTree); - } else { - // print this method only - } + InlineTree *inlineTree = C->ilt(); + if (inlineTree != nullptr) { + print_inline_tree(inlineTree); + } else { + // print this method only } } @@ -382,7 +379,6 @@ void IdealGraphPrinter::begin_method() { tail(PROPERTIES_ELEMENT); - _should_send_method = true; this->_current_method = method; _xml->flush(); @@ -975,7 +971,7 @@ void IdealGraphPrinter::print_graph(const char* name, const frame* fr) { // Print current ideal graph void IdealGraphPrinter::print(const char* name, Node* node, GrowableArray& visible_nodes, const frame* fr) { - if (!_current_method || !_should_send_method || node == nullptr) return; + if (!_current_method || node == nullptr) return; if (name == nullptr) { stringStream graph_name; diff --git a/src/hotspot/share/opto/idealGraphPrinter.hpp b/src/hotspot/share/opto/idealGraphPrinter.hpp index 69ba2841506..7e68ce6c00f 100644 --- a/src/hotspot/share/opto/idealGraphPrinter.hpp +++ b/src/hotspot/share/opto/idealGraphPrinter.hpp @@ -110,7 +110,6 @@ class IdealGraphPrinter : public CHeapObj { ciMethod *_current_method; int _depth; char buffer[2048]; - bool _should_send_method; PhaseChaitin* _chaitin; bool _traverse_outs; Compile *C;