-
Notifications
You must be signed in to change notification settings - Fork 115
FAQ: How do I use gprof to profile Fluidity?
Here is a very quick tutorial to get you started using gprof to profile fluidity runs.
Compile a profile-enabled version of fluidity:
./configure --enable-profiling
make clean
make
Run the profile-enabled version of fluidity.
You should make sure that the run finishes normally (i.e. it doesn't crash, nor get interrupted), otherwise it will not create the important gmon.out file when it ends.
Use gprof with the special debug symbols file from fluidity to examine the resulting gmon.out:
gprof /usr/lib/debug/usr/bin/fluidity gmon.out > gprof.info
Take a look at the gprof.info file in a text editor - there is loads of information in there, but, to get you started, the first few lines provide information about how long it spent in various fluidity subroutines.
For a more comprehensive guide, and to find out about all the other things in the file you've just created, check out the gprof manual online at http://www.gnu.org/software/binutils/manual/gprof-2.9.1/html_mono/gprof.html