Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jun 2005 22:23:16 +1200
From:      Mark Kirkwood <markir@paradise.net.nz>
To:        freebsd-stable@freebsd.org
Subject:   5.4R - gcc/gprof profile not showing %time information
Message-ID:  <42A57594.4030406@paradise.net.nz>

next in thread | raw e-mail | index | archive | help
I profiled a program today, and discovered that the end result seems to 
be missing information in the '%time' column - it is always zero. Has 
something changed with respect to obtaining a profile?

Any suggestions welcome :-)

A simple example follows...

$ gcc -g -pg -o test test.c
$ ./test
$ gprof ./test test.gmon> test.gprof


test.c:

int
main() {

         int     i;
         for (i=0;i<1000000;i++) {
         }
         return 0;
}


test.gprof:


   %   cumulative   self              self     total
  time   seconds   seconds    calls  ms/call  ms/call  name
   0.0       0.00     0.00        1     0.00     0.00  __cxa_finalize [236]
   0.0       0.00     0.00        1     0.00     0.00  __sys___sysctl [237]
   0.0       0.00     0.00        1     0.00     0.00  _mcleanup (238)
   0.0       0.00     0.00        1     0.00     0.00  _profil [239]
   0.0       0.00     0.00        1     0.00     0.00  exit [1]
   0.0       0.00     0.00        1     0.00     0.00  moncontrol [2]
   0.0       0.00     0.00        1     0.00     0.00  sysctl [3]

Index by function name

  [236] __cxa_finalize      [239] _profil               [3] sysctl
  [237] __sys___sysctl        [1] exit
  (238) _mcleanup             [2] moncontrol


regards

Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42A57594.4030406>