dot_writer.py (8999:6f306dd5cee0) | dot_writer.py (9528:d05714c2ab9c) |
---|---|
1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 43 unchanged lines hidden (view full) --- 52# is performed recursivly, traversing all children of the given root. 53# 54# pydot is required. When missing, no output will be generated. 55# 56##################################################################### 57 58import m5, os, re 59from m5.SimObject import isRoot, isSimObjectVector | 1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 43 unchanged lines hidden (view full) --- 52# is performed recursivly, traversing all children of the given root. 53# 54# pydot is required. When missing, no output will be generated. 55# 56##################################################################### 57 58import m5, os, re 59from m5.SimObject import isRoot, isSimObjectVector |
60from m5.util import warn |
|
60try: 61 import pydot 62except: 63 pydot = False 64 65# need to create all nodes (components) before creating edges (memory channels) 66def dot_create_nodes(simNode, callgraph): 67 if isRoot(simNode): --- 103 unchanged lines hidden (view full) --- 171 dot_create_edges(root, callgraph) 172 dot_filename = os.path.join(outdir, dotFilename) 173 callgraph.write(dot_filename) 174 try: 175 # dot crashes if the figure is extremely wide. 176 # So avoid terminating simulation unnecessarily 177 callgraph.write_pdf(dot_filename + ".pdf") 178 except: | 61try: 62 import pydot 63except: 64 pydot = False 65 66# need to create all nodes (components) before creating edges (memory channels) 67def dot_create_nodes(simNode, callgraph): 68 if isRoot(simNode): --- 103 unchanged lines hidden (view full) --- 172 dot_create_edges(root, callgraph) 173 dot_filename = os.path.join(outdir, dotFilename) 174 callgraph.write(dot_filename) 175 try: 176 # dot crashes if the figure is extremely wide. 177 # So avoid terminating simulation unnecessarily 178 callgraph.write_pdf(dot_filename + ".pdf") 179 except: |
179 print "warning: failed to generate pdf output from %s" % dot_filename | 180 warn("failed to generate pdf output from %s", dot_filename) |