linux/include/uapi
Andi Kleen b16a5b52eb perf/x86: Add option to disable reading branch flags/cycles
With LBRv5 reading the extra LBR flags like mispredict, TSX, cycles is
not free anymore, as it has moved to a separate MSR.

For callstack mode we don't need any of this information; so we can
avoid the unnecessary MSR read. Add flags to the perf interface where
perf record can request not collecting this information.

Add branch_sample_type flags for CYCLES and FLAGS. It's a bit unusual
for branch_sample_types to be negative (disable), not positive (enable),
but since the legacy ABI reported the flags we need some form of
explicit disabling to avoid breaking the ABI.

After we have the flags the x86 perf code can keep track if any users
need the flags. If noone needs it the information is not collected.

This cuts down the cost of LBR callstack on Skylake significantly.
Profiling a kernel build with LBR call stack the average run time of
the PMI handler drops by 43%.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
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: acme@kernel.org
Cc: jolsa@kernel.org
Link: http://lkml.kernel.org/r/1445366797-30894-2-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-11-23 09:58:25 +01:00
..
asm-generic mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage 2015-11-05 19:34:48 -08:00
drm Merge tag 'topic/drm-fixes-2015-11-11' of git://anongit.freedesktop.org/drm-intel into drm-fixes 2015-11-13 09:54:31 +10:00
linux perf/x86: Add option to disable reading branch flags/cycles 2015-11-23 09:58:25 +01:00
misc cxl: Add alternate MMIO error handling 2015-08-18 19:34:43 +10:00
mtd mtd: mtd-user: remove stdint.h include 2015-10-19 18:19:06 -07:00
rdma Initial 4.4 merge window submission 2015-11-07 13:33:07 -08:00
scsi cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sound ASoC: Updates for v4.4 2015-10-26 12:14:49 +01:00
video
xen xen/gntdev: use types from linux/types.h in userspace headers 2015-10-23 14:20:45 +01:00
Kbuild cxl: Add userspace header file 2014-10-08 20:15:57 +11:00