]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf evsel: Remove pmu_name
authorIan Rogers <irogers@google.com>
Thu, 26 Sep 2024 14:48:36 +0000 (15:48 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 26 Sep 2024 20:26:11 +0000 (13:26 -0700)
commitd7d156fc5e40cce21404579b0080dfc51399507b
treee07429112f28b0ea4beae316d244f811944b0bf5
parente2216fac1ee2bdfd7beab435ef1190a349cb3745
perf evsel: Remove pmu_name

"evsel->pmu_name" is only ever assigned a strdup of "pmu->name", a
strdup of "evsel->pmu_name" or NULL. As such, prefer to use
"pmu->name" directly and even to directly compare PMUs than PMU
names. For safety, add some additional NULL tests.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ian Rogers <irogers@google.com>
[ Fix arm-spe.c usage of pmu_name and empty PMU name ]
Acked-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Cc: Yang Jihong <yangjihong@bytedance.com>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ze Gao <zegao2021@gmail.com>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Yang Li <yang.lee@linux.alibaba.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: ak@linux.intel.com
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Sun Haiyong <sunhaiyong@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20240926144851.245903-6-james.clark@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/arch/arm64/util/arm-spe.c
tools/perf/arch/x86/util/evsel.c
tools/perf/tests/parse-events.c
tools/perf/util/evlist.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/metricgroup.c
tools/perf/util/parse-events.c
tools/perf/util/stat-shadow.c
tools/perf/util/stat.c