From: John Wehle <john@feith.com>
To: gdb-patches@sourceware.org
Subject: GDB / SIM 7.3.1 Cosmetic patch for profile title
Date: Mon, 17 Oct 2011 07:13:00 -0000 [thread overview]
Message-ID: <201110170428.p9H4SMZO025996@jwlab.FEITH.COM> (raw)
Currently doing:
tomi-unknown-elf-run -v -p program
results in:
Summary profiling results:
Summary profiling results:
Summary profiling results:
Summary profiling results:
Instruction Statistics
Total: 6,212 insns
...
The issue being that "Summary profiling results" is displayed multiple
times in a row. This patch fixes profile_info so that the title is
only displayed once.
The enclosed patch has been tested on FreeBSD with gdb configured for
tomi Borealis (a processor under development by Venray Technology).
ChangeLog:
Mon Oct 17 00:14:40 EDT 2011 John Wehle (john@feith.com)
* sim-profile.c (profile_info): Only print the title once.
-- John Wehle
------------------8<------------------------8<------------------------
--- gdb/sim/common/sim-profile.c 2011-03-14 23:16:17.000000000 -0400
+++ gdb/sim/common/sim-profile.c 2011-09-08 23:43:49.000000000 -0400
@@ -1132,7 +1122,7 @@ profile_info (SIM_DESC sd, int verbose)
/* FIXME: If the number of processors can be selected on the command line,
then MAX_NR_PROCESSORS will need to take an argument of `sd'. */
- for (c = 0; c < MAX_NR_PROCESSORS; ++c)
+ for (c = 0; c < MAX_NR_PROCESSORS && ! print_title_p; ++c)
{
sim_cpu *cpu = STATE_CPU (sd, c);
PROFILE_DATA *data = CPU_PROFILE_DATA (cpu);
@@ -1142,6 +1132,7 @@ profile_info (SIM_DESC sd, int verbose)
{
profile_printf (sd, cpu, "Summary profiling results:\n\n");
print_title_p = 1;
+ break;
}
}
-------------------------------------------------------------------------
next reply other threads:[~2011-10-17 4:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 7:13 John Wehle [this message]
2011-10-17 16:00 ` Mike Frysinger
2011-10-19 1:05 ` Joel Brobecker
2011-10-19 2:08 ` Joel Brobecker
2011-10-20 9:26 ` Mike Frysinger
2011-10-20 16:21 ` Joel Brobecker
2011-10-20 16:35 ` Mike Frysinger
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=201110170428.p9H4SMZO025996@jwlab.FEITH.COM \
--to=john@feith.com \
--cc=gdb-patches@sourceware.org \
/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