python: use box instead of Mrecord for dot plot
Base on https://graphviz.org/doc/info/shapes.html#record, record shape has problems with edge between adjacent nodes on the same rank. This will produce message "flat edge between adjacent nodes one of which has a record shape" and dump a huge svg file in gem5's stdout. Also, the edge will not be plotted in the output svg. By looking at out dot_writer, we don't really use any record specific label. As a result, we can simply apply box as the shape to achieve the same output without the strange error message. Change-Id: Ibbbcbfbc29edcd64bfeb7ae10adccfb54ea2613a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60749 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
This commit is contained in:
@@ -153,7 +153,7 @@ def dot_create_cluster(simNode, full_path, label):
|
||||
|
||||
return pydot.Cluster( \
|
||||
full_path, \
|
||||
shape = "Mrecord", \
|
||||
shape = "box", \
|
||||
label = label, \
|
||||
tooltip = "\"" + tooltip + "\"", \
|
||||
style = "\"rounded, filled\"", \
|
||||
@@ -167,7 +167,7 @@ def dot_create_cluster(simNode, full_path, label):
|
||||
def dot_create_node(simNode, full_path, label):
|
||||
return pydot.Node( \
|
||||
full_path, \
|
||||
shape = "Mrecord", \
|
||||
shape = "box", \
|
||||
label = label, \
|
||||
style = "\"rounded, filled\"", \
|
||||
color = "#000000", \
|
||||
@@ -274,7 +274,7 @@ def dot_add_clk_domain(c_dom, v_dom):
|
||||
full_path = re.sub('\.', '_', str(c_dom))
|
||||
return pydot.Cluster( \
|
||||
full_path, \
|
||||
shape = "Mrecord", \
|
||||
shape = "box", \
|
||||
label = label, \
|
||||
style = "\"rounded, filled, dashed\"", \
|
||||
color = "#000000", \
|
||||
|
||||
Reference in New Issue
Block a user