perf/x86/intel: Hide TSX events when RTM is not supported
authorAndi Kleen <ak@linux.intel.com>
Thu, 9 Nov 2017 00:07:18 +0000 (16:07 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 13 Nov 2017 16:03:38 +0000 (17:03 +0100)
commit58ba4d5a25579e5c7e312bd359c95f3a9a0a242c
tree7f684a26e11191d570f1b072138f3cee48ca4423
parent516fb7f2e73dcc303fb97fc3593209fcacf2d982
perf/x86/intel: Hide TSX events when RTM is not supported

0day testing reported a perf test regression on Haswell systems without
RTM. Commit a5df70c35 hides the in_tx/in_tx_cp attributes when RTM is not
available, but the TSX events are still available in sysfs. Due to the
missing attributes the event parser fails on those files.

Don't show the TSX events in sysfs when RTM is not available on
Haswell/Broadwell/Skylake.

Fixes: a5df70c354c2 (perf/x86: Only show format attributes when supported)
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Tested-by: Jin Yao <yao.jin@linux.intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20171109000718.14137-1-andi@firstfloor.org
arch/x86/events/intel/core.c