From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrien BAK <adrien.bak@metascale.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Mathias Gaunard <mathias.gaunard@metascale.org>
Subject: Re: [PATCH] perf-script : improves option passing mechansim
Date: Thu, 20 Mar 2014 16:32:12 -0300 [thread overview]
Message-ID: <20140320193212.GB21431@kernel.org> (raw)
In-Reply-To: <532AF29E.3040207@metascale.org>
Em Thu, Mar 20, 2014 at 02:52:30PM +0100, Adrien BAK escreveu:
> Indeed. I wasn't aware of the '--' behaviour and the documentation
> doesn't seem to mention it. My patch essentially implements the same
> behaviour, except that the script name itself is used to separate
> the options. I guess there is not much need the proposed patch then.
>
> Sorry for the wasted time.
No need to be sorry, I appreciate _you_ taking the time to help improve
the tools, maybe you can send a patch to update the documentation
instead, with examples where -- is used so that people don't fall into
this trap again?
Thanks!
- Arnaldo
> Adrien
>
> On 03/18/2014 07:15 PM, Arnaldo Carvalho de Melo wrote:
> >Em Tue, Mar 18, 2014 at 05:09:33PM +0100, Adrien BAK escreveu:
> >>This pull request fixes the following issues :
> >>* when passing custom arguments to a script, if those arguments are
> >> not declared within perf, they prevent the execution of perf.
> >>e.g.
> >>
> >>perf script -i path/to/perf.data -s my_script -arg1 arg_value
> >>
> >>perf will issue an error message and no processing will occur
> >I haven't tested this, but what comes to mind is the use of -- to
> >separate what options should be processed by perf and which ones should
> >be left to the script, is that what you're fixing?
> >
> >- Arnaldo
> >>* when passing custom arguments to a script, if those arguments are
> >> declared by perf, they are consumed and not passed to the script.
> >>e.g.
> >>perf script -i path/to/perf.data -s my_script -h
> >>
> >>perf will display its own help message, instead of the expected help
> >>message from my_script.
> >>
> >>These issues are addressed as follows :
> >>* The parse option flag is changed from PARSE_OPT_STOP_AT_NON_OPTION to
> >>PARSE_OPT_KEEP_UNKNOWN
> >>* A new option type is introduce OPT_CALLBACK_FINAL_OPTION, which
> >>effectively
> >> prevents the parsing of all options located after the script.
> >>
> >>Signed-off-by: Adrien Bak <adrien.bak@metascale.org>
prev parent reply other threads:[~2014-03-20 19:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 16:09 Adrien BAK
2014-03-18 18:15 ` Arnaldo Carvalho de Melo
2014-03-20 13:52 ` Adrien BAK
2014-03-20 19:32 ` Arnaldo Carvalho de Melo [this message]
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=20140320193212.GB21431@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=adrien.bak@metascale.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathias.gaunard@metascale.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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