Bug 238920 - No accumulated time in gprof
No accumulated time in gprof
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-03 16:51 EDT by Daryll
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-23 10:40:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daryll 2007-05-03 16:51:10 EDT
Fedora 7 test 4
2.6.12-1.1381_FC3smp
binutils-2.15.92.0.2-5.1

If I compile a piece of code with -pg and run it, a gmon.out is created. Then
when I look at the results, the number of calls of each function appears to be
correct, but they show no accumulated time.
Comment 1 Jakub Jelinek 2007-05-23 10:03:38 EDT
binutils-2.15.92.0.2 certainly aren't shipped on F7, nor such old kernel.
And I certainly can see non-zero accumulated time in F7 (or FC6).  E.g.:
$ cat > ux.c <<EOF
void
foo (void)
{
  int i;
  for (i = 0; i < 10000000; i++)
    asm volatile ("");
}
void
bar (void)
{
  int i;
  for (i = 0; i < 100000000; i++)
    asm volatile ("");
}
int
main (void)
{
  foo ();
  bar ();
  return 0;
}
EOF
$ gcc -pg -g -o ux ux.c
$ rm gmon.out
$ ./ux
$ gprof ./ux gmon.out 2>&1 | head -n 10
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 89.46      0.24     0.24        1   241.53   241.53  bar
 11.18      0.27     0.03        1    30.19    30.19  foo

 %         the percentage of the total running time of the
time       program used by this function.

Maybe your accumulated times are too low?
Comment 2 Daryll 2007-05-23 10:40:56 EDT
My bad. I grabbed the version output from the wrong box.
But my test case wasn't accumulating user space time.
Your example worked fine, so this is not a bug.


Note You need to log in before you can comment on or make changes to this bug.