From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH 1/4] perf tools: Allow use of an exclusive option more than once
Date: Mon, 12 Jan 2015 11:02:28 -0300 [thread overview]
Message-ID: <20150112140228.GG12406@kernel.org> (raw)
In-Reply-To: <54B3B397.8080808@hitachi.com>
Em Mon, Jan 12, 2015 at 08:44:23PM +0900, Masami Hiramatsu escreveu:
> (2015/01/10 19:33), Namhyung Kim wrote:
> > The exclusive options are to prohibit use of conflicting options at the
> > same time. But it had a side effect that it also limits a such option
> > can be used at most once. Currently the only user of the flag is perf
> > probe and it allows to use such options more than once, but when one
> > tries to use it, perf will fail like below:
> >
> > $ sudo perf probe -x /lib/libc-2.20.so --add malloc --add free
> > Error: option `add' cannot be used with add
> > ...
> >
> > Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
>
> Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thanks, applied to perf/urgent
> Thanks!
>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/util/parse-options.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c
> > index f62dee7bd924..4a015f77e2b5 100644
> > --- a/tools/perf/util/parse-options.c
> > +++ b/tools/perf/util/parse-options.c
> > @@ -46,7 +46,7 @@ static int get_value(struct parse_opt_ctx_t *p,
> > return opterror(opt, "is not usable", flags);
> >
> > if (opt->flags & PARSE_OPT_EXCLUSIVE) {
> > - if (p->excl_opt) {
> > + if (p->excl_opt && p->excl_opt != opt) {
> > char msg[128];
> >
> > if (((flags & OPT_SHORT) && p->excl_opt->short_name) ||
> >
>
>
> --
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Research Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com
>
next prev parent reply other threads:[~2015-01-12 14:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-10 10:33 Namhyung Kim
2015-01-10 10:33 ` [PATCH 2/4] perf probe: Do not rely on map__load() filter to find symbols Namhyung Kim
2015-01-12 12:31 ` Masami Hiramatsu
2015-01-14 1:45 ` Namhyung Kim
2015-01-14 8:42 ` Masami Hiramatsu
2015-01-10 10:33 ` [PATCH 3/4] perf probe: Fix probing kretprobes Namhyung Kim
2015-01-12 11:26 ` Jiri Olsa
2015-01-12 12:08 ` Masami Hiramatsu
2015-01-12 12:22 ` Masami Hiramatsu
2015-01-14 1:59 ` Namhyung Kim
2015-01-10 10:33 ` [PATCH 4/4] perf probe: Propagate error code when write(2) failed Namhyung Kim
2015-01-12 11:17 ` Masami Hiramatsu
2015-01-12 14:03 ` Arnaldo Carvalho de Melo
2015-01-17 10:10 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2015-01-12 11:44 ` [PATCH 1/4] perf tools: Allow use of an exclusive option more than once Masami Hiramatsu
2015-01-12 14:02 ` Arnaldo Carvalho de Melo [this message]
2015-01-28 15:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
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=20150112140228.GG12406@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=namhyung@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