summaryrefslogtreecommitdiff
path: root/scripts/maint/display_callgraph.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/maint/display_callgraph.py')
-rwxr-xr-xscripts/maint/display_callgraph.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/maint/display_callgraph.py b/scripts/maint/display_callgraph.py
index 4e4ea637ff..9ead56c8cc 100755
--- a/scripts/maint/display_callgraph.py
+++ b/scripts/maint/display_callgraph.py
@@ -2,8 +2,21 @@
import cPickle
-callgraph = cPickle.load(open("callgraph.cp"))
-closure = cPickle.load(open("callgraph_closure.cp"))
+callgraph = cPickle.load(open("callgraph.pkl"))
+closure = cPickle.load(open("callgraph_closure.pkl"))
+sccs = cPickle.load(open("callgraph_sccs.pkl"))
for n_reachable, fn in sorted(list((len(r), fn) for fn, r in closure.iteritems())):
print "%s can reach %s other functions." %(fn, n_reachable)
+
+
+c = [ (len(component), component) for component in sccs ]
+c.sort()
+
+for n, component in c:
+ if n < 2:
+ continue
+ print n, component
+
+
+