mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-03 17:13:33 +01:00
23 lines
479 B
Python
Executable File
23 lines
479 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import cPickle
|
|
|
|
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
|
|
|
|
|
|
|