I used oprofile ( linux only ) for the data acquisition:
http://oprofile.sourceforge.net/about/
Code: Select all
# opcontrol -c=16 -p=library,thread,cpu --no-vmlinux
# opcontrol --start
$ spring ( must contain debug symbols )
# opcontrol --stop
# opcontrol --flush
$ opreport -cgf --demangle=smart --exclude-dependent --merge=tgid,cpu,tid --symbols /path/to/spring > calldata.txt
oprof is a statistical profiler, you might want to calculate number of samples to have error confidence less than your acceptable level
gprof2dot to convert the table data into a graph script
http://code.google.com/p/jrfonseca/wiki/Gprof2Dot
Code: Select all
$ gprof2dot -f oprofile -o dotgraph.dot calldata.txt
gprof2dot can convert from multiple profiling tools, but I found oprofile to be best since it only requires debug symbols in the binary to work, and the slowdown it introduces is neglectable
either you're running linux, windows, or mac you could try gprof, altho it requires for the binary to be compiled using special gprof symbols, slows down the app to grind levels, and I find it somehow crappier than oprof. ( after compiling the app with the special symbols, you'll have to run it and parse the binary profile data with the gprof tool in order to make it readble from the script, make sure you'll enable call graph output from gprof )
graphviz to render the graph script
http://www.graphviz.org/
$ dot -T svg -o svggraph.svg dotgraph.dot