RFR: 8251464: make Node::dump(int depth) support indent

Liu, Xin xxinliu at amazon.com
Sat Aug 29 20:08:36 UTC 2020


hi, Reviewers,


Could you review this patch?

JBS:https://bugs.openjdk.java.net/browse/JDK-8251464

Webrev:

http://cr.openjdk.java.net/~xliu/8251464/00/webrev/


This patch attempts to improve the formation of nodes when developers try to dump an ideal graph or snippet of a graph.  In practice, I found it's pretty handy if Node::dump(int d) can support indent.

The basic idea is to support indention for the utility function:

collect_nodes_i(GrowableArray<Node*>* queue, const Node* start, int direction, uint depth, bool include_start, bool only_ctrl, bool only_data)

It only affects Node::dump family and -XX::PrintIdeal.  It won't impact the output for igv.
This can help developers who try to inspect a cluster of nodes in gdb.

Another change is naming. collect_nodes_i uses breadth-first search. the container is used in fifo way instead of filo.
I think the name "queue" serve better.

TEST:
hotspot:tier1  and gtest.
mach-5

thanks,
--lx




More information about the hotspot-compiler-dev mailing list