Node::find(int) should not traverse from new to old nodes
Emanuel Peter
emanuel.peter at oracle.com
Thu May 5 09:25:44 UTC 2022
Hi,
I have been bothered by find_node(idx) for a while. When I am looking at the Mach graph, and search for a node with an idx, I sometimes get old, sometimes new nodes. The reason is that Node::find does not just traverse input/output edges, but also debug_orig (if ASSERT is enabled). Via debug_orig, most Mach nodes link to their old node from the IR of previous phases. This way we can find multiple nodes for an idx. Node::find returns the last one it finds - sometimes the new one is last, sometimes the old one is last. At least it prints both pointers to the terminal.
Here, I have a detailed writeup, and some proposed solutions:
https://bugs.openjdk.java.net/browse/JDK-8286179
Do you agree that we should fix this? Would you pick one of my solutions, or propose a new one?
Since this is a tool that probably many people are using for debugging, I do not want to break it for you.
Best Regards,
Emanuel Peter
More information about the hotspot-compiler-dev
mailing list