perf/x86/intel/pt: Allow the disabling of branch tracing
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Mon, 6 Feb 2017 14:41:40 +0000 (16:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Mar 2017 07:53:49 +0000 (09:53 +0200)
commitd35869ba348d3f1ff3e6d8214fe0f674bb0e404e
treef2b4ec47f90b05b41a43e397a7bc50e018615675
parentc69f203df3e61414fbf1a66d130abfd7c3bf3fd0
perf/x86/intel/pt: Allow the disabling of branch tracing

Now that Intel PT supports more types of trace content than just branch
tracing, it may be useful to allow the user to disable branch tracing
when it is not needed.

The special case is BDW, where not setting BranchEn is not supported.

This is slightly trickier than necessary, because up to this moment
the driver has been setting BranchEn automatically and the userspace
assumes as much. Instead of reversing the semantics of BranchEn, we
introduce a 'passthrough' bit, which will forego the default and allow
the user to set BranchEn to their heart's content.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: vince@deater.net
Link: http://lkml.kernel.org/r/20170206144140.14402-1-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/pt.c
arch/x86/events/intel/pt.h