WSL2-Linux-Kernel/tools/perf/arch/x86/util
Kan Liang dff5463bc7 perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform
[ Upstream commit 01b28e4a58 ]

The X86 specific arch__intr_reg_mask() is to check whether the kernel
and hardware can collect XMM registers. But it doesn't work on some
hybrid platform.

Without the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15

The config of the test event doesn't contain the PMU information. The
kernel may fail to initialize it on the correct hybrid PMU and return
the wrong non-supported information.

Add the PMU information into the config for the hybrid platform. The
same register set is supported among different hybrid PMUs. Checking
the first available one is good enough.

With the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 XMM9
  XMM10 XMM11 XMM12 XMM13 XMM14 XMM15

Fixes: 6466ec14aa ("perf regs x86: Add X86 specific arch__intr_reg_mask()")
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220518145125.1494156-1-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:57:34 +02:00
..
Build perf stat: Enable iostat mode for x86 platforms 2021-04-20 08:40:20 -03:00
archinsn.c tools/perf: Convert to insn_decode() 2021-03-15 12:41:26 +01:00
auxtrace.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
dwarf-regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
event.c perf tools: Support arch specific PERF_SAMPLE_WEIGHT_STRUCT processing 2021-02-18 16:07:06 -03:00
evlist.c perf stat: Add Topdown metrics L2 events as default events 2021-07-09 14:04:32 -03:00
evsel.c perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT 2021-02-08 16:25:00 -03:00
header.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
intel-bts.c perf evlist: Use the right prefix for 'struct evlist' evsel list methods 2020-11-30 14:52:44 -03:00
intel-pt.c perf intel-pt: Use aux_watermark 2021-04-16 16:32:39 +02:00
iostat.c perf iostat: Fix Segmentation fault from NULL 'struct perf_counts_values *' 2021-09-27 09:41:07 -03:00
kvm-stat.c perf x86 kvm-stat: Support to analyze kvm MSR 2021-05-12 12:43:12 -03:00
machine.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
mem-events.c perf tools: Support pmu prefix for mem-store event 2021-06-01 11:04:05 -03:00
perf_regs.c perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform 2022-05-25 09:57:34 +02:00
pmu.c perf pmu: Add PMU alias support 2021-09-03 08:33:26 -03:00
topdown.c perf record: Support sample-read topdown metric group 2020-09-17 15:47:58 -03:00
tsc.c perf tsc: Move out common functions from x86 2020-09-22 13:38:33 -03:00
unwind-libdw.c perf libdw: Fix off-by 1 relative directory includes 2020-06-01 12:24:23 -03:00
unwind-libunwind.c perf unwind: Fix libunwind build failure on i386 systems 2019-09-26 21:59:38 +02:00