misc: Bail out of DVFS dot if we cannot resolve the domains
This changeset updates the dot output to bail out if it is unable to resolve the voltage or clock domains (which will cause it to raise an AttributeError). Additionally, the DVFS dot output is disabled by default for speed purposes. Minor fixup for 0aeca8f.
This commit is contained in:
@@ -310,7 +310,7 @@ def dot_create_dvfs_nodes(simNode, callgraph, domain=None):
|
||||
except AttributeError:
|
||||
# Just re-use the domain from above
|
||||
c_dom = domain
|
||||
c_dom.__getattr__('voltage_domain')
|
||||
v_dom = c_dom.__getattr__('voltage_domain')
|
||||
pass
|
||||
|
||||
if c_dom == domain or c_dom == None:
|
||||
@@ -329,7 +329,7 @@ def dot_create_dvfs_nodes(simNode, callgraph, domain=None):
|
||||
except AttributeError:
|
||||
# Just re-use the domain from above
|
||||
c_dom = domain
|
||||
c_dom.__getattr__('voltage_domain')
|
||||
v_dom = c_dom.__getattr__('voltage_domain')
|
||||
pass
|
||||
|
||||
if c_dom == domain or c_dom == None:
|
||||
@@ -370,11 +370,19 @@ def do_dot(root, outdir, dotFilename):
|
||||
def do_dvfs_dot(root, outdir, dotFilename):
|
||||
if not pydot:
|
||||
return
|
||||
dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3')
|
||||
dot_create_dvfs_nodes(root, dvfsgraph)
|
||||
dot_create_edges(root, dvfsgraph)
|
||||
dot_filename = os.path.join(outdir, dotFilename)
|
||||
dvfsgraph.write(dot_filename)
|
||||
|
||||
# There is a chance that we are unable to resolve the clock or
|
||||
# voltage domains. If so, we fail silently.
|
||||
try:
|
||||
dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3')
|
||||
dot_create_dvfs_nodes(root, dvfsgraph)
|
||||
dot_create_edges(root, dvfsgraph)
|
||||
dot_filename = os.path.join(outdir, dotFilename)
|
||||
dvfsgraph.write(dot_filename)
|
||||
except:
|
||||
warn("Failed to generate dot graph for DVFS domains")
|
||||
return
|
||||
|
||||
try:
|
||||
# dot crashes if the figure is extremely wide.
|
||||
# So avoid terminating simulation unnecessarily
|
||||
|
||||
Reference in New Issue
Block a user