From: Jiri Olsa <jolsa@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 06/10] perf kmem: Introduce --list-cmds for use by scripts
Date: Tue, 8 Apr 2014 20:01:04 +0200 [thread overview]
Message-ID: <1396980068-27124-7-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1396980068-27124-1-git-send-email-jolsa@redhat.com>
From: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1394853474-31019-2-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
tools/perf/builtin-kmem.c | 8 +++++---
tools/perf/perf-completion.sh | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 929462a..bd91de0 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -756,11 +756,13 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"),
OPT_END()
};
- const char * const kmem_usage[] = {
- "perf kmem [<options>] {record|stat}",
+ const char *const kmem_subcommands[] = { "record", "stat", NULL };
+ const char *kmem_usage[] = {
+ NULL,
NULL
};
- argc = parse_options(argc, argv, kmem_options, kmem_usage, 0);
+ argc = parse_options_subcommand(argc, argv, kmem_options,
+ kmem_subcommands, kmem_usage, 0);
if (!argc)
usage_with_options(kmem_usage, kmem_options);
diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh
index ae3a576..0ef59dd 100644
--- a/tools/perf/perf-completion.sh
+++ b/tools/perf/perf-completion.sh
@@ -121,8 +121,8 @@ __perf_main ()
elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then
evts=$($cmd list --raw-dump)
__perfcomp_colon "$evts" "$cur"
- # List subcommands for 'perf kvm'
- elif [[ $prev == "kvm" ]]; then
+ # List subcommands for perf commands
+ elif [[ $prev == @(kvm|kmem) ]]; then
subcmds=$($cmd $prev --list-cmds)
__perfcomp_colon "$subcmds" "$cur"
# List long option names
--
1.8.3.1
next prev parent reply other threads:[~2014-04-08 18:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 18:00 [GIT PULL 00/10] perf/core improvements and fixes Jiri Olsa
2014-04-08 18:00 ` [PATCH 01/10] perf tests: Add thread maps lookup automated tests Jiri Olsa
2014-04-08 18:01 ` [PATCH 02/10] perf top: Fix documentation of invalid -s option Jiri Olsa
2014-04-08 18:01 ` [PATCH 03/10] tools lib traceevent: Print event name when show warning if possible Jiri Olsa
2014-04-08 18:01 ` [PATCH 04/10] tools lib traceevent: Do not call warning() directly Jiri Olsa
2014-04-08 18:01 ` [PATCH 05/10] perf callchains: Disable unwind libraries when libelf isn't found Jiri Olsa
2014-04-08 18:01 ` Jiri Olsa [this message]
2014-04-08 18:01 ` [PATCH 07/10] perf mem: Introduce --list-cmds for use by scripts Jiri Olsa
2014-04-08 18:01 ` [PATCH 08/10] perf lock: " Jiri Olsa
2014-04-08 18:01 ` [PATCH 09/10] perf sched: " Jiri Olsa
2014-04-08 18:01 ` [PATCH 10/10] MAINTAINERS: Change e-mail to kernel.org one Jiri Olsa
[not found] ` <8738hnk3dg.fsf@tassilo.jf.intel.com>
[not found] ` <CAM9d7ciP4tLUmR-soEKH3nf6=XC5evKGfuQW1fUGA8Z42U3xCg@mail.gmail.com>
2014-04-09 5:31 ` [GIT PULL 00/10] perf/core improvements and fixes Ingo Molnar
2014-04-10 7:36 ` [GIT PULL v2] " Jiri Olsa
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=1396980068-27124-7-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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
Powered by JetHome