Bug 4848 - gprof gives wrong time summary on multi core / SMP environment
Summary: gprof gives wrong time summary on multi core / SMP environment
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gprof (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 18:21 UTC by Markus Maresch
Modified: 2007-09-12 15:06 UTC (History)
1 user (show)

See Also:
Host: i686
Target: i686
Build: 2.6.20-1.2962.fc6
Last reconfirmed:


Attachments
This simple program checks if the user time reported by time corresponds to the cumulative seconds reported by gprof (376 bytes, text/plain)
2007-07-26 18:23 UTC, Markus Maresch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Maresch 2007-07-26 18:21:37 UTC
GPROF: GNU gprof 2.17.50.0.6-5.fc6
UNAME-A: Linux <myhost> 2.6.20-1.2962.fc6 #1 SMP Tue Jun 19 18:24:12 EDT 2007
i686 i686 i386 GNU/Linux

On single core CPU's and older kernels the cumulative seconds column converged
well towards the user time for the executed command. On multi core and SMP
machines this seems way off - not half (for dual core) - just something.

Reproduce: I have a simple C program to demonstrate this.
Comment 1 Markus Maresch 2007-07-26 18:23:38 UTC
Created attachment 1934 [details]
This simple program checks if the user time reported by time corresponds to the cumulative seconds reported by gprof

for multi core CPUs currently this seems to be way off;
for RH9 (on a single core CPU) a good correspondence was found
Comment 2 Daniel Jacobowitz 2007-09-12 15:06:06 UTC
This isn't a bug with gprof.  gprof is a very simple program; it reads data
files generated by your system C library, and those contain time information. 
So you need to report this against the system C library.