aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-profile.c
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-08-29 13:16:19 +0000
committerThiemo Seufer <ths@networkno.de>2006-08-29 13:16:19 +0000
commit41ec9f205e2aee2a7a7c1515a5c7b4372bcba9c4 (patch)
tree565e96b6d3539d0bf9c2a8f27e2f5df0e047971d /sim/common/sim-profile.c
parent2d2733fc966f64220d26a99caf9ed4cb0c075f5d (diff)
downloadgdb-41ec9f205e2aee2a7a7c1515a5c7b4372bcba9c4.zip
gdb-41ec9f205e2aee2a7a7c1515a5c7b4372bcba9c4.tar.gz
gdb-41ec9f205e2aee2a7a7c1515a5c7b4372bcba9c4.tar.bz2
* sim-profile.c (profile_pc_init): Initialise default profiling
frequency to a prime number. (profile_print_pc): Convert gmon.out sample data into target byte order.
Diffstat (limited to 'sim/common/sim-profile.c')
-rw-r--r--sim/common/sim-profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 20d7a54..787b0e9 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -519,7 +519,7 @@ profile_pc_init (SIM_DESC sd)
int bucket_size;
/* fill in the frequency if not specified */
if (PROFILE_PC_FREQ (data) == 0)
- PROFILE_PC_FREQ (data) = 256;
+ PROFILE_PC_FREQ (data) = 257;
/* fill in the start/end if not specified */
if (PROFILE_PC_END (data) == 0)
{
@@ -700,6 +700,7 @@ profile_print_pc (sim_cpu *cpu, int verbose)
sample = 0xffff;
else
sample = PROFILE_PC_COUNT (profile) [loop];
+ H2T (sample);
ok = fwrite (&sample, sizeof (sample), 1, pf);
}
if (ok == 0)