aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-07-21 07:24:42 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-29 17:34:45 -0400
commit03617c22e31f32cbf0e4797e216db898fb898d90 (patch)
tree2c344d33e287efb2abc1e2dfa2a9cb693fe6a231 /tools/perf/builtin-trace.c
parentf72f901d90b00aaf2a6c1335b41311687b3f2dec (diff)
libperf: Add threads to struct perf_evlist
Move threads from tools/perf's evlist to libperf's perf_evlist struct. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-56-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index abfd22ff1730..35f3684f5327 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1404,7 +1404,7 @@ static int trace__symbols_init(struct trace *trace, struct evlist *evlist)
1404 goto out; 1404 goto out;
1405 1405
1406 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, 1406 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
1407 evlist->threads, trace__tool_process, false, 1407 evlist->core.threads, trace__tool_process, false,
1408 1); 1408 1);
1409out: 1409out:
1410 if (err) 1410 if (err)
@@ -3183,7 +3183,7 @@ static int trace__set_filter_pids(struct trace *trace)
3183 err = bpf_map__set_filter_pids(trace->filter_pids.map, trace->filter_pids.nr, 3183 err = bpf_map__set_filter_pids(trace->filter_pids.map, trace->filter_pids.nr,
3184 trace->filter_pids.entries); 3184 trace->filter_pids.entries);
3185 } 3185 }
3186 } else if (thread_map__pid(trace->evlist->threads, 0) == -1) { 3186 } else if (thread_map__pid(trace->evlist->core.threads, 0) == -1) {
3187 err = trace__set_filter_loop_pids(trace); 3187 err = trace__set_filter_loop_pids(trace);
3188 } 3188 }
3189 3189
@@ -3412,8 +3412,8 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
3412 evlist__enable(evlist); 3412 evlist__enable(evlist);
3413 } 3413 }
3414 3414
3415 trace->multiple_threads = thread_map__pid(evlist->threads, 0) == -1 || 3415 trace->multiple_threads = thread_map__pid(evlist->core.threads, 0) == -1 ||
3416 evlist->threads->nr > 1 || 3416 evlist->core.threads->nr > 1 ||
3417 perf_evlist__first(evlist)->core.attr.inherit; 3417 perf_evlist__first(evlist)->core.attr.inherit;
3418 3418
3419 /* 3419 /*