Gprof python. gprof, which gprof2dot then reads to generate a graph.