5 data
= cPickle
.load(open("callgraph.pkl"))
7 # data = data['modItems']
9 callgraph
= data
['callgraph']
10 closure
= data
['closure']
12 fn_bottle
, call_bottle
= data
['bottlenecks']
14 for n_reachable
, fn
in sorted(list((len(r
), fn
) for fn
, r
in closure
.iteritems())):
15 print "%s can reach %s other functions." %(fn
, n_reachable
)
18 c
= [ (len(component
), component
) for component
in sccs
]
21 print "\n================================"
23 for n
, component
in c
:
26 print "Strongly connected component of size %d:"%n
30 print "\n================================"
32 print "====== Number of functions pulled into blob, by function in blob."
34 for n
, fn
in fn_bottle
[-30:]:
35 print "%3d: %s"%(n
, fn
)
37 print "====== Number of functions pulled into blob, by call in blob."
39 for n
, fn1
, _
, fn2
in call_bottle
[-30:]:
40 print "%3d: %s -> %s "%(n
, fn2
, fn1
)