Messages in this thread | | | Date | Wed, 7 Mar 2012 13:49:30 +0100 | Subject | Re: [PATCH] perf report: auto-detect branch stack sampling mode | From | Stephane Eranian <> |
| |
On Mon, Mar 5, 2012 at 4:47 PM, Ingo Molnar <mingo@elte.hu> wrote: > > Another usability bug of the new branch sampling feature is that > typing the obvious: > > $ perf record -b ./myprog > > does not do the obvious thing and default to 'any' but throws a > *very* unhelpful generic perf error: > Ok, so looked at this. Given the option parsing code, looks like we would have to split the option in two: -b and something else to disambiguate cmdline such as:
$ perf record -b foo $ perf record -b any_call foo any_call: no such file or directory
The code cannot disambiguate between any_call being a branch filter vs. the command to run, given that -b has now an optional argument.
What we can do is split: -b and --branch-filter for instance. The former takes no argument and sets up branch-stack to ANY. The other one requires a parameter.
I am almost done with TUI navigation of branch samples.
> usage: perf record [<options>] [<command>] > or: perf record [<options>] -- <command> [<options>] > > ... > > Really, we should do better than this. Only people who *want* to > specify finer LBR filters should be forced to specify them. > > Thanks, > > Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |