mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 22:15:12 +08:00
* profiling bug fixes.
2001-02-09 Ben Elliston <bje@redhat.com> * (profile_print_pc): Write header out in target byte order. 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.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2001-02-09 Ben Elliston <bje@redhat.com>
|
||||||
|
|
||||||
|
* (profile_print_pc): Write header out in target byte order.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2001-01-12 Chris Demetriou <cgd@sibyte.com>
|
2001-01-12 Chris Demetriou <cgd@sibyte.com>
|
||||||
|
|
||||||
* aclocal.m4 (SIM_AC_OPTION_SCACHE): Properly handle the case
|
* aclocal.m4 (SIM_AC_OPTION_SCACHE): Properly handle the case
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Default profiling support.
|
/* Default profiling support.
|
||||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Cygnus Support.
|
Contributed by Cygnus Support.
|
||||||
|
|
||||||
This file is part of GDB, the GNU debugger.
|
This file is part of GDB, the GNU debugger.
|
||||||
@ -564,7 +564,7 @@ profile_pc_init (SIM_DESC sd)
|
|||||||
+ PROFILE_PC_NR_BUCKETS (data) - 1)
|
+ PROFILE_PC_NR_BUCKETS (data) - 1)
|
||||||
/ PROFILE_PC_NR_BUCKETS (data));
|
/ PROFILE_PC_NR_BUCKETS (data));
|
||||||
PROFILE_PC_SHIFT (data) = 0;
|
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;
|
PROFILE_PC_SHIFT (data) += 1;
|
||||||
}
|
}
|
||||||
@ -684,6 +684,12 @@ profile_print_pc (sim_cpu *cpu, int verbose)
|
|||||||
}
|
}
|
||||||
/* size of sample buffer (+ header) */
|
/* size of sample buffer (+ header) */
|
||||||
header[2] = PROFILE_PC_NR_BUCKETS (profile) * 2 + sizeof (header);
|
header[2] = PROFILE_PC_NR_BUCKETS (profile) * 2 + sizeof (header);
|
||||||
|
|
||||||
|
/* Header must be written out in target byte order. */
|
||||||
|
H2T (header[0]);
|
||||||
|
H2T (header[1]);
|
||||||
|
H2T (header[2]);
|
||||||
|
|
||||||
ok = fwrite (&header, sizeof (header), 1, pf);
|
ok = fwrite (&header, sizeof (header), 1, pf);
|
||||||
for (loop = 0;
|
for (loop = 0;
|
||||||
ok && (loop < PROFILE_PC_NR_BUCKETS (profile));
|
ok && (loop < PROFILE_PC_NR_BUCKETS (profile));
|
||||||
|
Reference in New Issue
Block a user