summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-06 11:35:19 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-25 09:51:46 -0300
commit648b5af3f3ae7f4fad7395c8dc84cb79eafe2ba9 (patch)
tree86619a0fb6a508bb1fe98b400f57a760612d08ff /tools/perf/util/evlist.c
parent65aa2e6bae3658cbc84c2e628a5c0ca163686204 (diff)
downloadblackbird-op-linux-648b5af3f3ae7f4fad7395c8dc84cb79eafe2ba9.tar.gz
blackbird-op-linux-648b5af3f3ae7f4fad7395c8dc84cb79eafe2ba9.zip
libperf: Move 'system_wide' from 'struct evsel' to 'struct perf_evsel'
Move the 'system_wide 'member from perf's evsel to libperf's perf_evsel. Committer notes: Added stdbool.h as we now use bool here. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r--tools/perf/util/evlist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 16d47a420bc2..16866533745c 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -319,7 +319,7 @@ int perf_evlist__add_newtp(struct evlist *evlist,
static int perf_evlist__nr_threads(struct evlist *evlist,
struct evsel *evsel)
{
- if (evsel->system_wide)
+ if (evsel->core.system_wide)
return 1;
else
return perf_thread_map__nr(evlist->core.threads);
@@ -410,7 +410,7 @@ int perf_evlist__alloc_pollfd(struct evlist *evlist)
struct evsel *evsel;
evlist__for_each_entry(evlist, evsel) {
- if (evsel->system_wide)
+ if (evsel->core.system_wide)
nfds += nr_cpus;
else
nfds += nr_cpus * nr_threads;
@@ -536,7 +536,7 @@ static void perf_evlist__set_sid_idx(struct evlist *evlist,
sid->cpu = evlist->core.cpus->map[cpu];
else
sid->cpu = -1;
- if (!evsel->system_wide && evlist->core.threads && thread >= 0)
+ if (!evsel->core.system_wide && evlist->core.threads && thread >= 0)
sid->tid = perf_thread_map__pid(evlist->core.threads, thread);
else
sid->tid = -1;
@@ -763,7 +763,7 @@ static int evlist__mmap_per_evsel(struct evlist *evlist, int idx,
mp->prot &= ~PROT_WRITE;
}
- if (evsel->system_wide && thread)
+ if (evsel->core.system_wide && thread)
continue;
cpu = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu);
@@ -793,7 +793,7 @@ static int evlist__mmap_per_evsel(struct evlist *evlist, int idx,
* other events, so it should not need to be polled anyway.
* Therefore don't add it for polling.
*/
- if (!evsel->system_wide &&
+ if (!evsel->core.system_wide &&
__perf_evlist__add_pollfd(evlist, fd, &maps[idx], revent) < 0) {
perf_mmap__put(&maps[idx]);
return -1;
OpenPOWER on IntegriCloud