Profiling support

Torsten Bonde Christiansen torsten at
Tue Jan 15 21:19:49 CET 2008

Torbjorn Granlund wrote:
> I suspect you're not linking to the newly compiler version of the
> library.
> There is probably other libgmp.{a,so} on your system, which your
> linker chooses.

I'm afaid there isn't. This is the output i get when trying to locate
any libgmp

mcbain at bellini:~$ locate libgmp
mcbain at bellini:~$

and the ls -l also:
mcbain at bellini:/usr/local/lib$ ls -l
total 1164
drwxrwsr-x 2 root staff   4096 2008-01-10 10:57 eclipse
-rw-r--r-- 1 root root  835644 2008-01-15 20:28 libgmp.a
-rwxr-xr-x 1 root root     785 2008-01-15 20:28
lrwxrwxrwx 1 root root      15 2008-01-15 20:28 ->
lrwxrwxrwx 1 root root      15 2008-01-15 20:28 ->
-rwxr-xr-x 1 root root  327909 2008-01-15 20:28
drwxrwsr-x 3 root staff   4096 2007-11-26 10:16 python2.5
mcbain at bellini:/usr/local/lib$

This time i did the following to make sure everything was in place and
from scratch. (all done as root):

make clean
./configure --enable-profiling=gprof
make && make check && make install

then compiling my own little program:
gcc -pg test.c -lgmp


and finally:
gprof a.out

the output from gprof is locate at pastebin:

and as you can see it does not contain any information on the mpz_...
function calls.

So I'm pretty sure that I'm not linking to a "wrong" version of the
libgmp as it only exists in /usr/local/lib - and the  LD_LIBRARY_PATH
point only to this file:
mcbain at bellini:~/tmp$ echo $LD_LIBRARY_PATH

any other suggestions?

Kind regards,
Torsten Bonde Christiansen

More information about the gmp-bugs mailing list