Profiling Standard C library functions using gprof
I'm trying to profile a program using gprof on Fedora Core 5 and I need profiling information for the Standard C Library functions. But when I compile using the -pg option, it doesn't automatically use the profiling version of the standard C library which seems to contradict what I read in the GNU gprof manual
Also, when I include the flag -lc_p to explicitly use the c profiling library, it says it can't find the library. I'm using glibc-2.4 which apparently obsoletes the old glibc-profile libraries.
I'm wondering whether I need to rebuild glibc with profiling enabled or if there is something else I need to do to be able to profile the standard C functions.
|