1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/perf/arch/powerpc/util
Leo Yan 9a4e47ef98 perf parse-regs: Introduce a weak function arch__sample_reg_masks()
Every architecture can provide a register list for sampling. If an
architecture doesn't support register sampling, it won't define the data
structure 'sample_reg_masks'. Consequently, any code using this
structure must be protected by the macro 'HAVE_PERF_REGS_SUPPORT'.

This patch defines a weak function, arch__sample_reg_masks(), which will
be replaced by an architecture-defined function for returning the
architecture's register list. With this refactoring, the function always
exists, the condition checking for 'HAVE_PERF_REGS_SUPPORT' is not
needed anymore, so remove it.

Signed-off-by: Leo Yan <leo.yan@linux.dev>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Ming Wang <wangming01@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: linux-csky@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240214113947.240957-4-leo.yan@linux.dev
2024-02-15 13:48:36 -08:00
..
book3s_hcalls.h KVM: PPC: Fix typo on H_DISABLE_AND_GET hcall 2020-07-23 17:43:35 +10:00
book3s_hv_exits.h KVM: PPC: Book3S: Simplify external interrupt handling 2018-10-09 16:04:27 +11:00
Build perf mem: Clean up perf_mem_events__name() 2024-01-24 14:04:28 -08:00
dwarf-regs.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
event.c perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers 2022-10-31 11:06:41 -03:00
evsel.c perf powerpc: Add support for PERF_SAMPLE_WEIGHT_STRUCT 2021-03-26 08:49:48 -03:00
header.c tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix 2023-10-17 12:40:51 -07:00
kvm-stat.c perf kvm powerpc: Fix build 2024-02-07 08:55:11 -08:00
mem-events.c perf mem: Clean up perf_mem_event__supported() 2024-01-24 14:04:46 -08:00
mem-events.h perf mem: Clean up perf_mem_events__name() 2024-01-24 14:04:28 -08:00
perf_regs.c perf parse-regs: Introduce a weak function arch__sample_reg_masks() 2024-02-15 13:48:36 -08:00
pmu.c perf mem: Clean up perf_mem_events__name() 2024-01-24 14:04:28 -08:00
skip-callchain-idx.c perf callchain powerpc: Fix addr location init during arch_skip_callchain_idx function 2023-07-24 17:46:11 -03:00
sym-handling.c perf map: Add helper for ->map_ip() and ->unmap_ip() 2023-04-06 22:10:17 -03:00
unwind-libdw.c perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
unwind-libunwind.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
utils_header.h perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00