perf record: Provide default branch stack sampling mode option
authorStephane Eranian <eranian@google.com>
Thu, 8 Mar 2012 22:47:45 +0000 (23:47 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 9 Mar 2012 07:26:07 +0000 (08:26 +0100)
commita5aabdacde9caff54886ae454e0fad2f26929753
tree6784617e8e37edf1ac25763bfc7481eef83d74ae
parent114382a0aea97974803c942f106d462cbca5c64d
perf record: Provide default branch stack sampling mode option

This patch chanegs the logic of the -b, --branch-stack options
of perf record.

Based on users' request, the patch provides a default filter
mode with the -b (or --branch-any) option.  With the option,
any type of taken branches is sampled.

With -j (or --branch-filter), the user can specify any
valid combination of branch types and privilege levels
if supported by the underlying hardware.

The -b (--branch any) is a shortcut for: --branch-filter any.

 $ perf record -b foo

or:

 $ perf record --branch-filter any foo

For more specific filtering:

 $ perf record --branch-filter ind_call,u foo

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: peterz@infradead.org
Cc: acme@redhat.com
Cc: asharma@fb.com
Cc: ravitillo@lbl.gov
Cc: vweaver1@eecs.utk.edu
Cc: khandual@linux.vnet.ibm.com
Cc: dsahern@gmail.com
Link: http://lkml.kernel.org/r/1331246868-19905-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/Documentation/perf-record.txt
tools/perf/builtin-record.c