display_callgraph.py 283 B

123456789
  1. #!/usr/bin/python
  2. import cPickle
  3. callgraph = cPickle.load(open("callgraph.cp"))
  4. closure = cPickle.load(open("callgraph_closure.cp"))
  5. for n_reachable, fn in sorted(list((len(r), fn) for fn, r in closure.iteritems())):
  6. print "%s can reach %s other functions." %(fn, n_reachable)