From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] perf completion: complete 'perf kvm'
Date: Wed, 11 Dec 2013 17:50:46 -0200 [thread overview]
Message-ID: <20131211195046.GA2295@infradead.org> (raw)
In-Reply-To: <1386758056-24618-2-git-send-email-artagnon@gmail.com>
Em Wed, Dec 11, 2013 at 04:04:15PM +0530, Ramkumar Ramachandra escreveu:
> Currently, there is no way to enumerate the subcommands under 'perf
> kvm', so hardcode them.
[acme@ssdandy linux]$ perf kvm -h 2>&1 | grep usage
usage: perf kvm [<options>] {top|record|report|diff|buildid-list|stat}
Can't you use this somehow?
I'm applying it tho as it is better than the current situation.
- Arnaldo
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> tools/perf/perf-completion.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh
> index 4949488..496e2ab 100644
> --- a/tools/perf/perf-completion.sh
> +++ b/tools/perf/perf-completion.sh
> @@ -121,6 +121,10 @@ __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
> + subcmds="top record report diff buildid-list stat"
> + __perfcomp_colon "$subcmds" "$cur"
> # List long option names
> elif [[ $cur == --* ]]; then
> subcmd=${words[1]}
> --
> 1.8.5.rc0.5.g70ebc73.dirty
next prev parent reply other threads:[~2013-12-11 19:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 10:34 [PATCH 0/2] Completion for " Ramkumar Ramachandra
2013-12-11 10:34 ` [PATCH 1/2] perf completion: complete " Ramkumar Ramachandra
2013-12-11 19:50 ` Arnaldo Carvalho de Melo [this message]
2013-12-11 19:56 ` David Ahern
2013-12-12 9:09 ` Ramkumar Ramachandra
2013-12-12 16:53 ` David Ahern
2013-12-12 17:26 ` [PATCH] perf kvm: introduce --list-cmds for use by scripts Ramkumar Ramachandra
2013-12-13 4:32 ` David Ahern
2013-12-16 13:16 ` Arnaldo Carvalho de Melo
2013-12-16 15:27 ` [tip:perf/core] perf completion: Complete 'perf kvm' tip-bot for Ramkumar Ramachandra
2013-12-11 10:34 ` [PATCH 2/2] perf tools: ignore files generated by " Ramkumar Ramachandra
2013-12-11 20:01 ` Arnaldo Carvalho de Melo
2013-12-12 9:05 ` [PATCH v2] " Ramkumar Ramachandra
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=20131211195046.GA2295@infradead.org \
--to=acme@redhat.com \
--cc=artagnon@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®