This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

profiling shared libraries


Hi,

I have tried profiling shared libraries using the following:

program=test.c
main()
{
           printf("hello world\n");
}

$ gcc test.c -lc

$ ldd a.out
        libc.so.6 => /lib/libc.so.6 (0x4001a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)b

$ export LD_PROFILE=/lib/libc.so.6

$ ./a.out

hello world

$ unset LD_PROFILE

$ gprof /lib/libc.so.6 libc.so.6.profile

The versions are
gcc -> egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
gprof ->GNU gprof 2.9.5

Here I am getting the message:
"gprof: file `libc.so.6.profile' has unsupported version 131071 "

Please help me in this regard..

Thanks in advance,
taha



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]