From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
dsahern@gmail.com, artagnon@gmail.com
Subject: Re: [PATCH 6/8] perf tools: Make --raw-dump work as a proper option for perf list.
Date: Wed, 8 Jan 2014 13:20:32 -0200 [thread overview]
Message-ID: <20140108152032.GE2626@infradead.org> (raw)
In-Reply-To: <a8eee4e15aba50c210ae64aa034bc75b8270b14e.1388416837.git.yangds.fnst@cn.fujitsu.com>
Em Mon, Dec 30, 2013 at 10:26:41AM -0500, Dongsheng Yang escreveu:
> Ramkumar reported that perf list --raw-dump was broken by 44d742e.
> Fix by making raw-dump a proper argument.
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
Are you sure David Signed-off-by' this, isn't this just an Acked-by or
perhaps a Reviewed-by? David?
- Arnaldo
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> Cc: Ramkumar Ramachandra <artagnon@gmail.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/builtin-list.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
> index fed6792..ec90d0a 100644
> --- a/tools/perf/builtin-list.c
> +++ b/tools/perf/builtin-list.c
> @@ -19,8 +19,10 @@
> int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
> {
> int i;
> + bool raw_dump = false;
> unsigned int count = 0;
> const struct option list_options[] = {
> + OPT_BOOLEAN(0, "raw-dump", &raw_dump, "raw dump for completion"),
> OPT_END()
> };
> const char * const list_usage[] = {
> @@ -34,7 +36,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
> setup_pager();
>
> if (argc == 0) {
> - print_events(NULL, false);
> + print_events(NULL, raw_dump);
> return 0;
> }
>
> @@ -42,26 +44,24 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
> if (i)
> putchar('\n');
> if (strncmp(argv[i], "tracepoint", 10) == 0)
> - count += print_tracepoint_events(NULL, NULL, false);
> + count += print_tracepoint_events(NULL, NULL, raw_dump);
> else if (strcmp(argv[i], "hw") == 0 ||
> strcmp(argv[i], "hardware") == 0)
> - count += print_events_type(PERF_TYPE_HARDWARE);
> + count += print_events_type(PERF_TYPE_HARDWARE, raw_dump);
> else if (strcmp(argv[i], "sw") == 0 ||
> strcmp(argv[i], "software") == 0)
> - count += print_events_type(PERF_TYPE_SOFTWARE);
> + count += print_events_type(PERF_TYPE_SOFTWARE, raw_dump);
> else if (strcmp(argv[i], "cache") == 0 ||
> strcmp(argv[i], "hwcache") == 0)
> - count += print_hwcache_events(NULL, false);
> + count += print_hwcache_events(NULL, raw_dump);
> else if (strcmp(argv[i], "pmu") == 0)
> - count += print_pmu_events(NULL, false);
> - else if (strcmp(argv[i], "--raw-dump") == 0)
> - count += print_events(NULL, true);
> + count += print_pmu_events(NULL, raw_dump);
> else {
> char *sep = strchr(argv[i], ':'), *s;
> int sep_idx;
>
> if (sep == NULL) {
> - if(!(count += print_events(argv[i], false)))
> + if(!(count += print_events(argv[i], raw_dump)))
> goto err_out;
> continue;
> }
> @@ -71,7 +71,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
> return -1;
>
> s[sep_idx] = '\0';
> - if (!(count += print_tracepoint_events(s, s + sep_idx + 1, false)))
> + if (!(count += print_tracepoint_events(s, s + sep_idx + 1, raw_dump)))
> goto err_out;
> free(s);
> }
> --
> 1.8.2.1
next prev parent reply other threads:[~2014-01-08 15:20 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 15:26 [PATCH 0/8 V2] Enhancement " Dongsheng Yang
2013-12-30 15:26 ` [PATCH 1/8] perf tools: Make the all print_xxx_event functions to return unsigned int Dongsheng Yang
2013-12-30 15:26 ` [PATCH 2/8] perf tools: Make the print_pmu_events funtion " Dongsheng Yang
2014-01-08 15:10 ` Arnaldo Carvalho de Melo
2014-01-09 14:58 ` Dongsheng Yang
2014-01-09 22:23 ` Dongsheng Yang
2013-12-30 15:26 ` [PATCH 3/8] perf tools: free aliases[j] in pmu.c if name_only is true Dongsheng Yang
2014-01-08 15:12 ` Arnaldo Carvalho de Melo
2014-01-09 14:53 ` Dongsheng Yang
2013-12-30 15:26 ` [PATCH 4/8] perf tools: Improve the message of perf list for unexpected input Dongsheng Yang
2014-01-08 15:16 ` Arnaldo Carvalho de Melo
2014-01-09 14:38 ` Dongsheng Yang
2013-12-30 15:26 ` [PATCH 5/8] perf tools: Add support of name_only for print_events_type() function Dongsheng Yang
2014-01-08 15:19 ` Arnaldo Carvalho de Melo
2014-01-09 14:37 ` Dongsheng Yang
2013-12-30 15:26 ` [PATCH 6/8] perf tools: Make --raw-dump work as a proper option for perf list Dongsheng Yang
2013-12-30 8:09 ` Ramkumar Ramachandra
2014-01-08 15:20 ` Arnaldo Carvalho de Melo [this message]
2014-01-08 21:44 ` David Ahern
2014-01-09 14:36 ` Dongsheng Yang
2014-01-10 15:30 ` David Ahern
2014-01-13 21:03 ` Dongsheng Yang
2013-12-30 15:26 ` [PATCH 7/8] perf tools: Fix bug when --raw-dump is not the first arguement " Dongsheng Yang
2013-12-30 15:26 ` [PATCH 8/8] perf tools: Enhancement for perf list with --raw-dump Dongsheng Yang
-- strict thread matches above, loose matches on Subject: below --
2013-12-27 23:03 [PATCH 0/8] Enhancement for perf list Dongsheng Yang
2013-12-27 23:03 ` [PATCH 6/8] perf tools: Make --raw-dump work as a proper option " Dongsheng Yang
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=20140108152032.GE2626@infradead.org \
--to=acme@redhat.com \
--cc=artagnon@gmail.com \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=yangds.fnst@cn.fujitsu.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
Powered by JetHome