summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/env.h
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@amd.com>2022-06-04 06:45:15 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-06-24 18:18:55 +0200
commitff34eaa820231dfaecca9c048637bd86ba294bc7 (patch)
tree236c7eda53333cdbdba91bacdd83c077ed79202e /tools/perf/util/env.h
parentperf header: Pass "cpu" pmu name while printing caps (diff)
downloadlinux-ff34eaa820231dfaecca9c048637bd86ba294bc7.tar.xz
linux-ff34eaa820231dfaecca9c048637bd86ba294bc7.zip
perf header: Store PMU caps in an array of strings
Currently all capabilities are stored in a single string separated by NULL character. Instead, store them in an array which makes searching of capability easier. Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ananth Narayan <ananth.narayan@amd.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kim Phillips <kim.phillips@amd.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Richter <rrichter@amd.com> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Santosh Shukla <santosh.shukla@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/env.h')
-rw-r--r--tools/perf/util/env.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h
index a3541f98e1fc..43aab59f7322 100644
--- a/tools/perf/util/env.h
+++ b/tools/perf/util/env.h
@@ -46,7 +46,7 @@ struct hybrid_node {
struct hybrid_cpc_node {
int nr_cpu_pmu_caps;
unsigned int max_branches;
- char *cpu_pmu_caps;
+ char **cpu_pmu_caps;
char *pmu_name;
};
@@ -81,7 +81,7 @@ struct perf_env {
char *sibling_dies;
char *sibling_threads;
char *pmu_mappings;
- char *cpu_pmu_caps;
+ char **cpu_pmu_caps;
struct cpu_topology_map *cpu;
struct cpu_cache_level *caches;
int caches_cnt;