diff options
author | Leo Yan <leo.yan@linux.dev> | 2024-02-14 12:39:46 +0100 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2024-02-15 22:48:36 +0100 |
commit | 9a4e47ef98a3041f6d2869ba2cd3401701776275 (patch) | |
tree | ba9828d2b59e99812b404ac0032d40f14ecef01c /tools/perf/util/demangle-rust.c | |
parent | perf parse-regs: Always build perf register functions (diff) | |
download | linux-9a4e47ef98a3041f6d2869ba2cd3401701776275.tar.xz linux-9a4e47ef98a3041f6d2869ba2cd3401701776275.zip |
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
Diffstat (limited to 'tools/perf/util/demangle-rust.c')
0 files changed, 0 insertions, 0 deletions