This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
[patch] gprof bucket overflows
- From: Dave Brolley <brolley at redhat dot com>
- To: cgen at sources dot redhat dot com
- Date: Wed, 14 May 2003 11:06:25 -0400
- Subject: [patch] gprof bucket overflows
- Organization: Red Hat Canada, Ltd
I have committed the following patch. When a bucket of the gprof
histogram overflowed (exceeded the 64k limit) the other buckets which
did not overflow were being counted again in the subsequent histogram(s).
2003-05-13 Dave Brolley <brolley@redhat.com>
* gprof.cxx (profiling_components): Set bucket count to zero when it
is empty.
Index: gprof.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/profiling/gprof.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -c -p -r1.10 -r1.11
*** gprof.cxx 8 Jan 2003 06:46:49 -0000 1.10
--- gprof.cxx 14 May 2003 14:59:52 -0000 1.11
*************** namespace profiling_components
*** 327,332 ****
--- 327,333 ----
else
{
put_bytes (of, host_int_2(count), 2);
+ b->second = 0; // in case we iterate due to overflow
}
}