[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: susukita
Subject: gprof
Date: Fri, 24 Mar 2006 16:49:14 +0900

I would like to use gprof on CentOS 4.3 and tested gprof for a

$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.5/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
Thread model: posix
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
$ gprof -v
GNU gprof
Based on BSD gprof, copyright 1983 Regents of the University of
This program is free software.  This program has absolutely no warranty.
$ gcc -static -pg test.c
$ time ./a.out
real    0m4.324s
user    0m4.314s
sys     0m0.009s
$ gprof a.out
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 43.82     18.94    18.94                             random_r
 24.06     29.34    10.40        1    10.40    10.40  main
 22.65     39.13     9.79                             random
  9.46     43.22     4.09                             rand

The cumulative seconds seem ten times longer than
the output of the time command. I installed binutils-2.16.1, but I got
the same result. Is this a bug of gprof?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]