This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN 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]

[patch] gprof bucket overflows


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
  		      }
  		  }
  		

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