Messages in this thread | | | Date | Fri, 25 Oct 2013 13:22:27 -0600 | From | David Ahern <> | Subject | Re: 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
| |