call graphs in sprof

Arvind Ayyangar arvind.ayyangar@gmail.com
Mon Jul 2 07:24:00 GMT 2007


Hi,
  I have a little library (libfun.so) which calls routines in two
other libraries (libfoo.c and  libc.so.6). I have a program which
links to this little library. I tried to profile the library and using
sprof.
The output of sprof is as below:

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  us/call  us/call  name
  0.00      0.00     0.00        1     0.00           fun

index % time    self  children    called     name

[0]      0.0    0.00    0.00        0         printf@@GLIBC_2.0 [0]
                0.00    0.00        1/1           fun [2]
-----------------------------------------------
                0.00    0.00        1/1           <UNKNOWN>
[2]      0.0    0.00    0.00        1         fun [2]
-----------------------------------------------


The call graph gives me information about calls to glibc
{printf@@GLIBC_2.0 [0]} but provides no information about calls to
library libfoo.so.

Also, what does the <UNKNOWN> in the output above mean? Does it refer
to the function calling it (viz main) or the function foo that it
called..

Thanks in advance

-Arvind



More information about the Libc-alpha mailing list