Code time analysis for intel ICC or GCC

During a code parallelization is important see which is most time spending function, using gprof and gprof2dot is possible to generate some graphs like this:

In the nutshell, using Debian:

# apt-get install python graphviz
# pip install gprof2dot
# icc yourSoftware.c -pg -o yourSoftware or gcc yourSoftware.c -pg -o yourSoftware
# ./yourSoftware
# gprof ./yourSoftware
# gprof ./yourSoftware | gprof2dot -n0 -e0 | dot -Tpng -o output.png ; eog output.png

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *