From: Thiemo Seufer <ths@networkno.de>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] sim: Better profiling
Date: Tue, 08 Aug 2006 11:49:00 -0000 [thread overview]
Message-ID: <20060808114827.GF29989@networkno.de> (raw)
Hello All,
the appended patch uses a prime number to initialise the PC sampling
frequency, this makes scaling effects less likely.
It also fixes an endianness bug in the sample data printing.
Thiemo
2006-08-08 Nigel Stephens <nigel@mips.com>
* 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.
Index: sim/common/sim-profile.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-profile.c,v
retrieving revision 1.5
diff -u -p -r1.5 sim-profile.c
--- sim/common/sim-profile.c 15 Feb 2001 21:14:40 -0000 1.5
+++ sim/common/sim-profile.c 7 Aug 2006 16:52:17 -0000
@@ -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 verb
sample = 0xffff;
else
sample = PROFILE_PC_COUNT (profile) [loop];
+ H2T (sample);
ok = fwrite (&sample, sizeof (sample), 1, pf);
}
if (ok == 0)
next reply other threads:[~2006-08-08 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 11:49 Thiemo Seufer [this message]
2006-08-29 14:56 ` Thiemo Seufer
2006-08-29 15:10 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060808114827.GF29989@networkno.de \
--to=ths@networkno.de \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox