lkml.org 
[lkml]   [2013]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFP: Fixing "-ga -ag -g fp -g dwarf" was Re: [PATCHSET 0/8] perf tools: Fix scalability problem on callchain merging (v5)
On 10/25/13 1:09 PM, Arnaldo Carvalho de Melo wrote:
>>> I think I did with the second follow up patch: -ga -ag -g fp -g
>>> dwarf should all work properly with fp the default for -g.
>
>> Acked-by: Ingo Molnar <mingo@kernel.org>
>
> Can I have this one submitted?
>
> I guess I found it but it was malformed, didn't apply.

Upon further review, Jiri was correct: that patch handles some of the
old cases fine, but did not handle others. ie., it just moved the bad
syntax problem around.

Looks like the parse-options code does not handle optional arguments.
e.g., -g defaults to 'fp' if no argument is given. With the following
permutations:
-gfoo
-g foo
-g -- foo

the parsing code gets confused on what 'foo' is. It needs some logic for
callbacks to say 'nope, not my argument' and the option parsing checks
for an alternative interpretation (e.g., "-gfoo" ?= "-f -o -o" or in the
case of '-g foo' it means -g is the end of the arguments and foo is the
first one not processed -- ie., the workload to run).

David



\
 
 \ /
  Last update: 2013-10-25 21:41    [W:0.106 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site