This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gprof and int overflow
- From: Ian Lance Taylor <iant at google dot com>
- To: Lewis Hyatt <lhyatt at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 19 Aug 2009 06:12:32 -0700
- Subject: Re: gprof and int overflow
- References: <loom.20090819T071647-82@post.gmane.org>
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