RFR: 8294356: IGV: scheduled graphs contain duplicated elements
Christian Hagedorn
chagedorn at openjdk.org
Mon Sep 26 15:05:37 UTC 2022
On Mon, 26 Sep 2022 13:55:56 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> This changeset removes duplicated nodes and edges from graph dumps that include a control-flow graph:
> 
> This is achieved by ensuring that HotSpot only visits each node once when dumping IGV graphs.
>
> #### Testing
> - Tested that tens of thousands of graphs do not contain duplicated nodes or edges by instrumenting IGV and running `java -Xcomp -XX:PrintIdealGraphLevel=4`.
> - Tested manually that unscheduled graphs are not affected by this changeset.
> - Tested that running compiler tests with `-XX:PrintIdealGraphLevel=3` does not trigger any failure.
Looks good!
src/hotspot/share/opto/idealGraphPrinter.cpp line 748:
> 746:
> 747: while (nodeStack.length() > 0) {
> 748:
While at it, this empty line could be removed.
src/hotspot/share/opto/idealGraphPrinter.cpp line 763:
> 761:
> 762: for (uint i = 0; i < n->len(); i++) {
> 763: if (n->in(i)) {
While at it, it might be good to replace this check with an explicit `!= nullptr` instead.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10423
More information about the hotspot-compiler-dev
mailing list