This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gprof question


Dave Cottingham <dcottingham00@comcast.net> writes:

> In case anyone was wondering, I have figured out what causes gprof to
> report a total cumulative time substantially shorter than the actual
> total CPU time.  The histogram counters are unsigned shorts, so if you
> get more than 2^16 hits in one or more counters, they wrap, and hence
> the total cumulative time reported by gprof comes up short.

This is an ironic place where this historical kernel system call can
come up short compared to an unconstrained implementation.  In
simulators (e.g. sid) it is not a problem to widen the counters.
Because the gmon.out format permits this, they can write out as many
consecutive histogram tables as needed to represent larger values.
gprof itself can correctly digest larger values when stored this way.


- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]