diff --git a/src/hotspot/share/opto/idealGraphPrinter.cpp b/src/hotspot/share/opto/idealGraphPrinter.cpp index 6a28074f4d9..f6ec1a72506 100644 --- a/src/hotspot/share/opto/idealGraphPrinter.cpp +++ b/src/hotspot/share/opto/idealGraphPrinter.cpp @@ -542,6 +542,31 @@ void IdealGraphPrinter::visit_node(Node* n, bool edges) { assert(s2.size() < sizeof(buffer), "size in range"); print_prop("dump_spec", buffer); + const TypePtr* adr_type = node->adr_type(); + if (adr_type != nullptr && C->have_alias_type(adr_type)) { + Compile::AliasType* at = C->alias_type(adr_type); + if (at != nullptr) { + print_prop("alias_index", at->index()); + // The value of at->field(), if present, is already dumped in the + // "source"/"destination" properties. + const Type* element = at->element(); + if (element != nullptr) { + stringStream element_stream; + element->dump_on(&element_stream); + print_prop("alias_element", element_stream.freeze()); + } + if (at->is_rewritable()) { + print_prop("alias_is_rewritable", "true"); + } + if (at->is_volatile()) { + print_prop("alias_is_volatile", "true"); + } + if (at->general_index() != at->index()) { + print_prop("alias_general_index", at->general_index()); + } + } + } + if (node->is_block_proj()) { print_prop("is_block_proj", "true"); } diff --git a/src/hotspot/share/opto/idealGraphPrinter.hpp b/src/hotspot/share/opto/idealGraphPrinter.hpp index 042ac694843..aab35c7a908 100644 --- a/src/hotspot/share/opto/idealGraphPrinter.hpp +++ b/src/hotspot/share/opto/idealGraphPrinter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ class IdealGraphPrinter : public CHeapObj { outputStream *_output; ciMethod *_current_method; int _depth; - char buffer[512]; + char buffer[2048]; bool _should_send_method; PhaseChaitin* _chaitin; bool _traverse_outs; diff --git a/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/resources/com/sun/hotspot/igv/servercompiler/filters/showTypes.filter b/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/resources/com/sun/hotspot/igv/servercompiler/filters/showTypes.filter index 16360d78c18..a50729080a8 100644 --- a/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/resources/com/sun/hotspot/igv/servercompiler/filters/showTypes.filter +++ b/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/resources/com/sun/hotspot/igv/servercompiler/filters/showTypes.filter @@ -44,8 +44,16 @@ function simplifyType(type) { } // Merge a possibly existing extra label, bottom type, and phase type into a -// new, single extra label. -function mergeAndAppendTypeInfo(extra_label, bottom_type, phase_type) { +// new, single extra label. For memory nodes, add an extra label with the memory +// slice, extracted from the dump_spec field. +function mergeAndAppendTypeInfo(extra_label, bottom_type, phase_type, category, dump_spec) { + new_extra_label = extra_label == null ? "" : (extra_label + " "); + if (category == "memory") { + m = /idx=([^\s]+);/.exec(dump_spec); + if (m != null) { + return new_extra_label + "mem: " + m[1]; + } + } if (phase_type == null && bottom_type == null) { return extra_label; } @@ -62,11 +70,10 @@ function mergeAndAppendTypeInfo(extra_label, bottom_type, phase_type) { type += "B: "; type += simplifyType(bottom_type); } - new_extra_label = extra_label == null ? "" : (extra_label + " "); return new_extra_label + type; } editProperty(not(or([matches("bottom_type", "bottom"), matches("bottom_type", "abIO")])), - ["extra_label", "bottom_type", "phase_type"], "extra_label", - function(propertyValues) {return mergeAndAppendTypeInfo(propertyValues[0], propertyValues[1], propertyValues[2]);}); + ["extra_label", "bottom_type", "phase_type", "category", "dump_spec"], "extra_label", + function(propertyValues) {return mergeAndAppendTypeInfo(propertyValues[0], propertyValues[1], propertyValues[2], propertyValues[3], propertyValues[4]);});