public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* gprof and int overflow
@ 2009-08-19  6:51 Lewis Hyatt
  2009-08-19 17:43 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Lewis Hyatt @ 2009-08-19  6:51 UTC (permalink / raw)
  To: binutils

Hi Everyone-

I can't get accurate results for functions called more than 2^32-1 times in
gprof; it looks like somewhere the function call counts are limited to 32-bit
integers, even though I am compiling on a 64-bit architecture. Does anyone know
if this is a limitation of gprof or of the gcc implementation of the -pg option?
Is there a workaround? I am using binutils 2.17 and gcc 4.1.2 on Debian. Thanks
very much.

-Lewis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gprof and int overflow
  2009-08-19  6:51 gprof and int overflow Lewis Hyatt
@ 2009-08-19 17:43 ` Ian Lance Taylor
  2009-08-21  1:50   ` Lewis Hyatt
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2009-08-19 17:43 UTC (permalink / raw)
  To: Lewis Hyatt; +Cc: binutils

Lewis Hyatt <lhyatt@gmail.com> writes:

> I can't get accurate results for functions called more than 2^32-1 times in
> gprof; it looks like somewhere the function call counts are limited to 32-bit
> integers, even though I am compiling on a 64-bit architecture. Does anyone know
> if this is a limitation of gprof or of the gcc implementation of the -pg option?
> Is there a workaround? I am using binutils 2.17 and gcc 4.1.2 on Debian. Thanks
> very much.

It's a limitation of the format of the gmon.out file.  The counts are
defined to be 32-bit integers.  I don't know of any workaround.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gprof and int overflow
  2009-08-19 17:43 ` Ian Lance Taylor
@ 2009-08-21  1:50   ` Lewis Hyatt
  0 siblings, 0 replies; 3+ messages in thread
From: Lewis Hyatt @ 2009-08-21  1:50 UTC (permalink / raw)
  To: binutils

Ian Lance Taylor <iant <at> google.com> writes:

> It's a limitation of the format of the gmon.out file.  The counts are
> defined to be 32-bit integers.  I don't know of any workaround.
> 
> Ian
> 
> 

OK thanks... maybe some day there will be a -pg64 option to gcc or something
like that, since these days I can overflow a 32-bit counter on my coffee break
:-).

-Lewis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-20 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19  6:51 gprof and int overflow Lewis Hyatt
2009-08-19 17:43 ` Ian Lance Taylor
2009-08-21  1:50   ` Lewis Hyatt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).