This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

[Sim] Profiling patch


The following patch corrects a bug which leads to, effectively, an
empty `gmon.out' file.  As far as I can tell, profiling with the
program counter hasn't worked in about four years. :-)


2001-02-09  Ben Elliston  <bje@redhat.com>

	* sim-profile.c (profile_pc_init): Correct bug in loop logic when
	adjusting the pc shift value.


--- sim-profile.c       2000/03/02 09:10:56     1.27
+++ sim-profile.c       2001/02/09 04:36:40
@@ -499,7 +499,7 @@
                                + PROFILE_PC_NR_BUCKETS (data) - 1)
                               / PROFILE_PC_NR_BUCKETS (data));
              PROFILE_PC_SHIFT (data) = 0;
-             while (bucket_size < PROFILE_PC_BUCKET_SIZE (data))
+             while (bucket_size > PROFILE_PC_BUCKET_SIZE (data))
                {
                  PROFILE_PC_SHIFT (data) += 1;
                }


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