linux/tools/perf/arch/x86/util
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
..
archinsn.c tools/perf: Convert to insn_decode() 2021-03-15 12:41:26 +01:00
auxtrace.c perf pmu: Separate pmu and pmus 2023-05-27 09:41:39 -03:00
Build perf tool x86: Consolidate is_amd check into single function 2023-06-13 23:40:33 -03:00
cpuid.h perf tsc: Add arch TSC frequency information 2022-07-25 12:28:00 -03:00
dwarf-regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
env.c perf tool x86: Fix perf_env memory leak 2023-06-14 18:19:06 -03:00
env.h perf tool x86: Consolidate is_amd check into single function 2023-06-13 23:40:33 -03:00
event.c perf map: Add accessors for ->pgoff and ->reloc 2023-04-06 22:12:40 -03:00
evlist.c perf parse-events x86: Avoid sorting uops_retired.slots 2023-08-03 17:01:27 -03:00
evsel.c perf parse-events x86: Avoid sorting uops_retired.slots 2023-08-03 17:01:27 -03:00
evsel.h perf record: Support sample-read topdown metric group for hybrid platforms 2022-06-03 21:30:10 +02:00
header.c perf tsc: Add arch TSC frequency information 2022-07-25 12:28:00 -03:00
intel-bts.c perf pmu: Separate pmu and pmus 2023-05-27 09:41:39 -03:00
intel-pt.c perf pmu: Parse sysfs events directly from a file 2023-08-24 11:02:59 -03:00
iostat.c perf x86 iostat: Use zfree() to reduce chances of use after free 2023-04-12 09:59:19 -03:00
kvm-stat.c perf evsel: Introduce evsel__name_is() method to check if the evsel name is equal to a given string 2023-04-24 14:28:11 -03:00
machine.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
mem-events.c perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
perf_regs.c perf parse-regs: Move out arch specific header from util/perf_regs.h 2023-08-16 08:52:45 -03:00
pmu.c perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
topdown.c perf pmu: Separate pmu and pmus 2023-05-27 09:41:39 -03:00
topdown.h perf stat: Add TopdownL1 metric as a default if present 2023-02-19 08:07:19 -03:00
tsc.c perf arch x86: Add missing stdlib.h to get free() prototype 2022-10-27 16:37:26 -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 perf unwind: Fix libunwind build failure on i386 systems 2019-09-26 21:59:38 +02:00