diff options
| author | Ian Rogers <irogers@google.com> | 2025-07-18 20:05:08 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-07-24 13:41:35 -0700 |
| commit | 6d765f5f7ec669f2a16b44afd23cd877efa640de (patch) | |
| tree | 0bbd737066958e6d6824c32e34d89efbfd2b2b9b /tools/lib | |
| parent | 175c852325a1f566426e2470e5d5d67efc7621dd (diff) | |
libperf evsel: Rename own_cpus to pmu_cpus
own_cpus is generally the cpumask from the PMU. Rename to pmu_cpus to
try to make this clearer. Variable rename with no other changes.
Reviewed-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250719030517.1990983-7-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/lib')
| -rw-r--r-- | tools/lib/perf/evlist.c | 8 | ||||
| -rw-r--r-- | tools/lib/perf/evsel.c | 2 | ||||
| -rw-r--r-- | tools/lib/perf/include/internal/evsel.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c index b1f4c8176b32..9d9dec21f510 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -46,7 +46,7 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, * are valid by intersecting with those of the PMU. */ perf_cpu_map__put(evsel->cpus); - evsel->cpus = perf_cpu_map__intersect(evlist->user_requested_cpus, evsel->own_cpus); + evsel->cpus = perf_cpu_map__intersect(evlist->user_requested_cpus, evsel->pmu_cpus); /* * Empty cpu lists would eventually get opened as "any" so remove @@ -61,7 +61,7 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, list_for_each_entry_from(next, &evlist->entries, node) next->idx--; } - } else if (!evsel->own_cpus || evlist->has_user_cpus || + } else if (!evsel->pmu_cpus || evlist->has_user_cpus || (!evsel->requires_cpu && perf_cpu_map__has_any_cpu(evlist->user_requested_cpus))) { /* * The PMU didn't specify a default cpu map, this isn't a core @@ -72,13 +72,13 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, */ perf_cpu_map__put(evsel->cpus); evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus); - } else if (evsel->cpus != evsel->own_cpus) { + } else if (evsel->cpus != evsel->pmu_cpus) { /* * No user requested cpu map but the PMU cpu map doesn't match * the evsel's. Reset it back to the PMU cpu map. */ perf_cpu_map__put(evsel->cpus); - evsel->cpus = perf_cpu_map__get(evsel->own_cpus); + evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus); } if (evsel->system_wide) { diff --git a/tools/lib/perf/evsel.c b/tools/lib/perf/evsel.c index 2a85e0bfee1e..127abe7df63d 100644 --- a/tools/lib/perf/evsel.c +++ b/tools/lib/perf/evsel.c @@ -46,7 +46,7 @@ void perf_evsel__delete(struct perf_evsel *evsel) assert(evsel->mmap == NULL); /* If not munmap wasn't called. */ assert(evsel->sample_id == NULL); /* If not free_id wasn't called. */ perf_cpu_map__put(evsel->cpus); - perf_cpu_map__put(evsel->own_cpus); + perf_cpu_map__put(evsel->pmu_cpus); perf_thread_map__put(evsel->threads); free(evsel); } diff --git a/tools/lib/perf/include/internal/evsel.h b/tools/lib/perf/include/internal/evsel.h index ea78defa77d0..b97dc8c92882 100644 --- a/tools/lib/perf/include/internal/evsel.h +++ b/tools/lib/perf/include/internal/evsel.h @@ -99,7 +99,7 @@ struct perf_evsel { * cpu map for opening the event on, for example, the first CPU on a * socket for an uncore event. */ - struct perf_cpu_map *own_cpus; + struct perf_cpu_map *pmu_cpus; struct perf_thread_map *threads; struct xyarray *fd; struct xyarray *mmap; |
