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

Tobias Hartmann tobias.hartmann at oracle.com
Thu Sep 3 12:30:11 UTC 2020


Hi Xin,

I'm concerned that the output quickly becomes unreadable when dumping a large graph.
For example, isn't -XX:+PrintIdeal affected by this as well?

Also, looking at the example output you've posted [1], shouldn't the node id be indented as well?

This might be helpful when dumping small parts of the graph but then it should be optional (i.e. can
be turned on via a flag/argument if needed).

Best regards,
Tobias

[1] https://bugs.openjdk.java.net/secure/attachment/89800/dump2.txt

On 29.08.20 22:08, Liu, Xin wrote:
> 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