Re: [PATCH] perf report: auto-detect branch stack sampling mode

From: Stephane Eranian
Date: Wed Mar 07 2012 - 07:49:31 EST


On Mon, Mar 5, 2012 at 4:47 PM, Ingo Molnar <mingo@xxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/