perf evsel: Disable branch flags/cycles for --callgraph lbr
authorAndi Kleen <ak@linux.intel.com>
Sat, 12 Dec 2015 00:12:24 +0000 (16:12 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 14 Dec 2015 15:11:22 +0000 (12:11 -0300)
commitbd0f889536f80630c1c4a414f2de90744d2c87d0
tree28c212dd96811729c10a68c6c216d0cdf8b94aa0
parentabd828688407eb86044f1bc9e5133c55d7597596
perf evsel: Disable branch flags/cycles for --callgraph lbr

[The kernel patch needed for this is in tip now (b16a5b52eb9 perf/x86:
Add option to disable ...) So this user tools patch to make use of it
should be merged now]

Automatically disable collecting branch flags and cycles with
--call-graph lbr. This allows avoiding a bunch of extra MSR
reads in the PMI on Skylake.

When the kernel doesn't support the new flags they are automatically
cleared in the fallback code.

v2: Switch to use branch_sample_type instead of sample_type.
Adjust description.
Fix the fallback logic.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1449879144-29074-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c