Merge branch 'perf/urgent' into perf/core

To pick fixes that missed v5.9.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2020-10-13 13:02:20 -03:00
4 changed files with 65 additions and 23 deletions

View File

@@ -353,18 +353,20 @@ __add_event(struct list_head *list, int *idx,
const char *cpu_list)
{
struct evsel *evsel;
struct perf_cpu_map *cpus = pmu ? pmu->cpus :
struct perf_cpu_map *cpus = pmu ? perf_cpu_map__get(pmu->cpus) :
cpu_list ? perf_cpu_map__new(cpu_list) : NULL;
if (init_attr)
event_attr_init(attr);
evsel = evsel__new_idx(attr, *idx);
if (!evsel)
if (!evsel) {
perf_cpu_map__put(cpus);
return NULL;
}
(*idx)++;
evsel->core.cpus = perf_cpu_map__get(cpus);
evsel->core.cpus = cpus;
evsel->core.own_cpus = perf_cpu_map__get(cpus);
evsel->core.system_wide = pmu ? pmu->is_uncore : false;
evsel->auto_merge_stats = auto_merge_stats;