linux-stable/tools/perf/arch
Ian Rogers c091ee9089 perf pmu: Remove logic for PMU name being NULL
The PMU name could be NULL in the case of the fake_pmu. Initialize the
name for the fake_pmu to "fake" so that all other logic can assume it
is initialized. Add a const to the type of name so that a literal can
be used to avoid additional initialization code. Propagate the cost
through related routines and remove now unnecessary "(char *)"
casts. Doing this located a bug in builtin-list for the pmu_glob that
was missing a strdup.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20230825024002.801955-3-irogers@google.com
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Wei Li <liwei391@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Ming Wang <wangming01@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-08-25 10:22:16 -03:00
..
alpha
arc/annotate perf annotate: Introduce basic support for ARC 2018-12-17 14:59:42 -03:00
arm perf pmu: Avoid passing format list to perf_pmu__format_bits() 2023-08-23 14:27:34 -03:00
arm64 perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
csky perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
loongarch perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
mips perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
parisc
powerpc perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
riscv perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
riscv64/annotate perf annotate: Add riscv64 support 2021-09-27 09:33:44 -03:00
s390 perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
sh treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sparc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
x86 perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
xtensa treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
common.c perf tools riscv: Add support for riscv lookup_binutils_path 2023-05-12 15:21:48 -03:00
common.h perf annotate: Own objdump_path and disassembler_style strings 2023-04-04 09:39:56 -03:00