Skip to content

FAQ: How do I use gprof to profile Fluidity?

Tim Greaves edited this page May 22, 2014 · 3 revisions

Here is a very quick tutorial to get you started using gprof to profile fluidity runs.

Step 0:

Compile a profile-enabled version of fluidity:

./configure --enable-profiling
make clean
make

Step 1:

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.

Step 2:

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

Step 3:

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

Clone this wiki locally