This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[Sim] Profiling patch
- To: gdb-patches at sources dot redhat dot com
- Subject: [Sim] Profiling patch
- From: Ben Elliston <bje at redhat dot com>
- Date: Fri, 9 Feb 2001 15:38:01 +1100
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;
}