From: Joel Brobecker <brobecker@adacore.com>
To: John Wehle <john@feith.com>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB / SIM 7.3.1 Cosmetic patch for profile title
Date: Wed, 19 Oct 2011 01:05:00 -0000 [thread overview]
Message-ID: <20111019004407.GD19246@adacore.com> (raw)
In-Reply-To: <201110170428.p9H4SMZO025996@jwlab.FEITH.COM>
> 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.
[...]
> Mon Oct 17 00:14:40 EDT 2011 John Wehle (john@feith.com)
>
> * sim-profile.c (profile_info): Only print the title once.
This is OK with one little nit:
> - for (c = 0; c < MAX_NR_PROCESSORS; ++c)
> + for (c = 0; c < MAX_NR_PROCESSORS && ! print_title_p; ++c)
^^^^^^^^^^^^^^^
No space after the '!'.
As far as I can tell, you do not have a copyright assignment in
place for GDB (it looks like you assigned some specific changes
many many years ago, but nothing that covers those changes).
I will commit them using the "small change" rule, but if you think
you might contribute other changes, I invite you to start the process
now, so that future patches do not stay held up just because of
paperwork.
As a side note, it took me a while to understand some of the logic.
It looks like `print_title_p' really means `we-have-some-profile-data'.
So, if it was me, I'd probably rename that variable to something
like: profile_data_collected_p, and then rewrite the code such that
the double-loop only sets that variable. And then have a simple
if block:
if (profile_data_collected_p)
profile_printf (sd, cpu, "Summary profiling results:\n\n");
The only other place where this variable is reference would also benefit
from that renaming, since...
if (print_title_p
&& (PROFILE_INSN_P (cpu)
|| PROFILE_MODEL_P (cpu)))
profile_print_addr_ranges (cpu);
... would become:
if (profile_data_collected_p
&& (PROFILE_INSN_P (cpu)
|| PROFILE_MODEL_P (cpu)))
profile_print_addr_ranges (cpu);
--
Joel
next prev parent reply other threads:[~2011-10-19 0:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 7:13 John Wehle
2011-10-17 16:00 ` Mike Frysinger
2011-10-19 1:05 ` Joel Brobecker [this message]
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=20111019004407.GD19246@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=john@feith.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