perf evlist: Factor out a function to propagate maps for a single evsel
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / parse-events.c
index 7e8ae21906e2a87a02d7043b80917ccc6f8fbe66..21ed6ee63da9747d1215ac638f936357c8df2e8c 100644 (file)
@@ -287,8 +287,8 @@ __add_event(struct list_head *list, int *idx,
        if (!evsel)
                return NULL;
 
-       if (cpus)
-               evsel->cpus = cpu_map__get(cpus);
+       evsel->cpus     = cpu_map__get(cpus);
+       evsel->own_cpus = cpu_map__get(cpus);
 
        if (name)
                evsel->name = strdup(name);