summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-09-04 13:23:00 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-09-04 13:23:00 -0400
commit3b90f52b6155e038089c8816beb8498cacdf9f9e (patch)
treeedffde11c9a3cde0aa7127a39a502c0591d32cfe /src
parentfad36b35c6dc1bfe7406ba15f578b964423a0460 (diff)
downloadgem5-3b90f52b6155e038089c8816beb8498cacdf9f9e.tar.xz
util: Add ini string as tooltip info in dot output
This patch adds the config ini string as a tooltip that can be displayed in most browsers rendering the resulting svg. Certain characters are modified for HTML output. Tested on chrome and firefox.
Diffstat (limited to 'src')
-rw-r--r--src/python/m5/util/dot_writer.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py
index 8d93b4263..a6f721a0c 100644
--- a/src/python/m5/util/dot_writer.py
+++ b/src/python/m5/util/dot_writer.py
@@ -129,10 +129,22 @@ def dot_add_edge(simNode, callgraph, full_port_name, peerPort):
callgraph.add_edge(pydot.Edge(full_port_name, peer_port_name))
def dot_create_cluster(simNode, full_path, label):
+ # get the parameter values of the node and use them as a tooltip
+ ini_strings = []
+ for param in sorted(simNode._params.keys()):
+ value = simNode._values.get(param)
+ if value != None:
+ # parameter name = value in HTML friendly format
+ ini_strings.append(str(param) + "&#61;" +
+ simNode._values[param].ini_str())
+ # join all the parameters with an HTML newline
+ tooltip = "&#10;".join(ini_strings)
+
return pydot.Cluster( \
full_path, \
shape = "Mrecord", \
label = label, \
+ tooltip = "\"" + tooltip + "\"", \
style = "\"rounded, filled\"", \
color = "#000000", \
fillcolor = dot_gen_colour(simNode), \