diff options
-rw-r--r-- | tools/perf/builtin-ftrace.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-kvm.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-stat.c | 18 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-trace.c | 8 | ||||
-rw-r--r-- | tools/perf/lib/include/internal/evlist.h | 2 | ||||
-rw-r--r-- | tools/perf/tests/openat-syscall-tp-fields.c | 2 | ||||
-rw-r--r-- | tools/perf/util/auxtrace.c | 6 | ||||
-rw-r--r-- | tools/perf/util/evlist.c | 36 | ||||
-rw-r--r-- | tools/perf/util/evlist.h | 1 | ||||
-rw-r--r-- | tools/perf/util/stat.c | 2 |
12 files changed, 45 insertions, 44 deletions
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index f481a870e728..ae1466aa3b26 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c | |||
@@ -156,9 +156,9 @@ static int set_tracing_pid(struct perf_ftrace *ftrace) | |||
156 | if (target__has_cpu(&ftrace->target)) | 156 | if (target__has_cpu(&ftrace->target)) |
157 | return 0; | 157 | return 0; |
158 | 158 | ||
159 | for (i = 0; i < thread_map__nr(ftrace->evlist->threads); i++) { | 159 | for (i = 0; i < thread_map__nr(ftrace->evlist->core.threads); i++) { |
160 | scnprintf(buf, sizeof(buf), "%d", | 160 | scnprintf(buf, sizeof(buf), "%d", |
161 | ftrace->evlist->threads->map[i]); | 161 | ftrace->evlist->core.threads->map[i]); |
162 | if (append_tracing_file("set_ftrace_pid", buf) < 0) | 162 | if (append_tracing_file("set_ftrace_pid", buf) < 0) |
163 | return -1; | 163 | return -1; |
164 | } | 164 | } |
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index b9c58a5c1ba6..69d16ac852c3 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1450,7 +1450,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm, | |||
1450 | perf_session__set_id_hdr_size(kvm->session); | 1450 | perf_session__set_id_hdr_size(kvm->session); |
1451 | ordered_events__set_copy_on_queue(&kvm->session->ordered_events, true); | 1451 | ordered_events__set_copy_on_queue(&kvm->session->ordered_events, true); |
1452 | machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target, | 1452 | machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target, |
1453 | kvm->evlist->threads, false, 1); | 1453 | kvm->evlist->core.threads, false, 1); |
1454 | err = kvm_live_open_events(kvm); | 1454 | err = kvm_live_open_events(kvm); |
1455 | if (err) | 1455 | if (err) |
1456 | goto out; | 1456 | goto out; |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index d4f0430c2f49..d31d7a5a1be3 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -1275,7 +1275,7 @@ static int record__synthesize(struct record *rec, bool tail) | |||
1275 | if (err) | 1275 | if (err) |
1276 | goto out; | 1276 | goto out; |
1277 | 1277 | ||
1278 | err = perf_event__synthesize_thread_map2(&rec->tool, rec->evlist->threads, | 1278 | err = perf_event__synthesize_thread_map2(&rec->tool, rec->evlist->core.threads, |
1279 | process_synthesized_event, | 1279 | process_synthesized_event, |
1280 | NULL); | 1280 | NULL); |
1281 | if (err < 0) { | 1281 | if (err < 0) { |
@@ -1295,7 +1295,7 @@ static int record__synthesize(struct record *rec, bool tail) | |||
1295 | if (err < 0) | 1295 | if (err < 0) |
1296 | pr_warning("Couldn't synthesize bpf events.\n"); | 1296 | pr_warning("Couldn't synthesize bpf events.\n"); |
1297 | 1297 | ||
1298 | err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->threads, | 1298 | err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->core.threads, |
1299 | process_synthesized_event, opts->sample_address, | 1299 | process_synthesized_event, opts->sample_address, |
1300 | 1); | 1300 | 1); |
1301 | out: | 1301 | out: |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index d81b0b1ef514..4a94ca131d56 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -263,7 +263,7 @@ static int read_single_counter(struct evsel *counter, int cpu, | |||
263 | */ | 263 | */ |
264 | static int read_counter(struct evsel *counter, struct timespec *rs) | 264 | static int read_counter(struct evsel *counter, struct timespec *rs) |
265 | { | 265 | { |
266 | int nthreads = thread_map__nr(evsel_list->threads); | 266 | int nthreads = thread_map__nr(evsel_list->core.threads); |
267 | int ncpus, cpu, thread; | 267 | int ncpus, cpu, thread; |
268 | 268 | ||
269 | if (target__has_cpu(&target) && !target__has_per_thread(&target)) | 269 | if (target__has_cpu(&target) && !target__has_per_thread(&target)) |
@@ -485,15 +485,15 @@ try_again: | |||
485 | ui__warning("%s\n", msg); | 485 | ui__warning("%s\n", msg); |
486 | goto try_again; | 486 | goto try_again; |
487 | } else if (target__has_per_thread(&target) && | 487 | } else if (target__has_per_thread(&target) && |
488 | evsel_list->threads && | 488 | evsel_list->core.threads && |
489 | evsel_list->threads->err_thread != -1) { | 489 | evsel_list->core.threads->err_thread != -1) { |
490 | /* | 490 | /* |
491 | * For global --per-thread case, skip current | 491 | * For global --per-thread case, skip current |
492 | * error thread. | 492 | * error thread. |
493 | */ | 493 | */ |
494 | if (!thread_map__remove(evsel_list->threads, | 494 | if (!thread_map__remove(evsel_list->core.threads, |
495 | evsel_list->threads->err_thread)) { | 495 | evsel_list->core.threads->err_thread)) { |
496 | evsel_list->threads->err_thread = -1; | 496 | evsel_list->core.threads->err_thread = -1; |
497 | goto try_again; | 497 | goto try_again; |
498 | } | 498 | } |
499 | } | 499 | } |
@@ -579,7 +579,7 @@ try_again: | |||
579 | enable_counters(); | 579 | enable_counters(); |
580 | while (!done) { | 580 | while (!done) { |
581 | nanosleep(&ts, NULL); | 581 | nanosleep(&ts, NULL); |
582 | if (!is_target_alive(&target, evsel_list->threads)) | 582 | if (!is_target_alive(&target, evsel_list->core.threads)) |
583 | break; | 583 | break; |
584 | if (timeout) | 584 | if (timeout) |
585 | break; | 585 | break; |
@@ -1889,10 +1889,10 @@ int cmd_stat(int argc, const char **argv) | |||
1889 | * so we could print it out on output. | 1889 | * so we could print it out on output. |
1890 | */ | 1890 | */ |
1891 | if (stat_config.aggr_mode == AGGR_THREAD) { | 1891 | if (stat_config.aggr_mode == AGGR_THREAD) { |
1892 | thread_map__read_comms(evsel_list->threads); | 1892 | thread_map__read_comms(evsel_list->core.threads); |
1893 | if (target.system_wide) { | 1893 | if (target.system_wide) { |
1894 | if (runtime_stat_new(&stat_config, | 1894 | if (runtime_stat_new(&stat_config, |
1895 | thread_map__nr(evsel_list->threads))) { | 1895 | thread_map__nr(evsel_list->core.threads))) { |
1896 | goto out; | 1896 | goto out; |
1897 | } | 1897 | } |
1898 | } | 1898 | } |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 947f83e53272..c69ddc67c672 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -990,7 +990,7 @@ static int perf_top__start_counters(struct perf_top *top) | |||
990 | evlist__for_each_entry(evlist, counter) { | 990 | evlist__for_each_entry(evlist, counter) { |
991 | try_again: | 991 | try_again: |
992 | if (evsel__open(counter, top->evlist->core.cpus, | 992 | if (evsel__open(counter, top->evlist->core.cpus, |
993 | top->evlist->threads) < 0) { | 993 | top->evlist->core.threads) < 0) { |
994 | 994 | ||
995 | /* | 995 | /* |
996 | * Specially handle overwrite fall back. | 996 | * Specially handle overwrite fall back. |
@@ -1222,7 +1222,7 @@ static int __cmd_top(struct perf_top *top) | |||
1222 | pr_debug("Couldn't synthesize BPF events: Pre-existing BPF programs won't have symbols resolved.\n"); | 1222 | pr_debug("Couldn't synthesize BPF events: Pre-existing BPF programs won't have symbols resolved.\n"); |
1223 | 1223 | ||
1224 | machine__synthesize_threads(&top->session->machines.host, &opts->target, | 1224 | machine__synthesize_threads(&top->session->machines.host, &opts->target, |
1225 | top->evlist->threads, false, | 1225 | top->evlist->core.threads, false, |
1226 | top->nr_threads_synthesize); | 1226 | top->nr_threads_synthesize); |
1227 | 1227 | ||
1228 | if (top->nr_threads_synthesize > 1) | 1228 | if (top->nr_threads_synthesize > 1) |
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); |
1409 | out: | 1409 | out: |
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 | /* |
diff --git a/tools/perf/lib/include/internal/evlist.h b/tools/perf/lib/include/internal/evlist.h index f9caab1fe3c3..b7b43dbc9b82 100644 --- a/tools/perf/lib/include/internal/evlist.h +++ b/tools/perf/lib/include/internal/evlist.h | |||
@@ -3,12 +3,14 @@ | |||
3 | #define __LIBPERF_INTERNAL_EVLIST_H | 3 | #define __LIBPERF_INTERNAL_EVLIST_H |
4 | 4 | ||
5 | struct perf_cpu_map; | 5 | struct perf_cpu_map; |
6 | struct perf_thread_map; | ||
6 | 7 | ||
7 | struct perf_evlist { | 8 | struct perf_evlist { |
8 | struct list_head entries; | 9 | struct list_head entries; |
9 | int nr_entries; | 10 | int nr_entries; |
10 | bool has_user_cpus; | 11 | bool has_user_cpus; |
11 | struct perf_cpu_map *cpus; | 12 | struct perf_cpu_map *cpus; |
13 | struct perf_thread_map *threads; | ||
12 | }; | 14 | }; |
13 | 15 | ||
14 | #endif /* __LIBPERF_INTERNAL_EVLIST_H */ | 16 | #endif /* __LIBPERF_INTERNAL_EVLIST_H */ |
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 1de79208e690..9c06130d37be 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c | |||
@@ -58,7 +58,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest | |||
58 | 58 | ||
59 | perf_evsel__config(evsel, &opts, NULL); | 59 | perf_evsel__config(evsel, &opts, NULL); |
60 | 60 | ||
61 | perf_thread_map__set_pid(evlist->threads, 0, getpid()); | 61 | perf_thread_map__set_pid(evlist->core.threads, 0, getpid()); |
62 | 62 | ||
63 | err = evlist__open(evlist); | 63 | err = evlist__open(evlist); |
64 | if (err < 0) { | 64 | if (err < 0) { |
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 67a2afc5d964..65728cdeefb6 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c | |||
@@ -131,13 +131,13 @@ void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, | |||
131 | 131 | ||
132 | if (per_cpu) { | 132 | if (per_cpu) { |
133 | mp->cpu = evlist->core.cpus->map[idx]; | 133 | mp->cpu = evlist->core.cpus->map[idx]; |
134 | if (evlist->threads) | 134 | if (evlist->core.threads) |
135 | mp->tid = thread_map__pid(evlist->threads, 0); | 135 | mp->tid = thread_map__pid(evlist->core.threads, 0); |
136 | else | 136 | else |
137 | mp->tid = -1; | 137 | mp->tid = -1; |
138 | } else { | 138 | } else { |
139 | mp->cpu = -1; | 139 | mp->cpu = -1; |
140 | mp->tid = thread_map__pid(evlist->threads, idx); | 140 | mp->tid = thread_map__pid(evlist->core.threads, idx); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 977b9291fb0d..1a6f877ebb03 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -144,9 +144,9 @@ void evlist__delete(struct evlist *evlist) | |||
144 | perf_evlist__munmap(evlist); | 144 | perf_evlist__munmap(evlist); |
145 | evlist__close(evlist); | 145 | evlist__close(evlist); |
146 | perf_cpu_map__put(evlist->core.cpus); | 146 | perf_cpu_map__put(evlist->core.cpus); |
147 | perf_thread_map__put(evlist->threads); | 147 | perf_thread_map__put(evlist->core.threads); |
148 | evlist->core.cpus = NULL; | 148 | evlist->core.cpus = NULL; |
149 | evlist->threads = NULL; | 149 | evlist->core.threads = NULL; |
150 | perf_evlist__purge(evlist); | 150 | perf_evlist__purge(evlist); |
151 | perf_evlist__exit(evlist); | 151 | perf_evlist__exit(evlist); |
152 | free(evlist); | 152 | free(evlist); |
@@ -168,7 +168,7 @@ static void __perf_evlist__propagate_maps(struct evlist *evlist, | |||
168 | } | 168 | } |
169 | 169 | ||
170 | perf_thread_map__put(evsel->core.threads); | 170 | perf_thread_map__put(evsel->core.threads); |
171 | evsel->core.threads = perf_thread_map__get(evlist->threads); | 171 | evsel->core.threads = perf_thread_map__get(evlist->core.threads); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void perf_evlist__propagate_maps(struct evlist *evlist) | 174 | static void perf_evlist__propagate_maps(struct evlist *evlist) |
@@ -342,7 +342,7 @@ static int perf_evlist__nr_threads(struct evlist *evlist, | |||
342 | if (evsel->system_wide) | 342 | if (evsel->system_wide) |
343 | return 1; | 343 | return 1; |
344 | else | 344 | else |
345 | return thread_map__nr(evlist->threads); | 345 | return thread_map__nr(evlist->core.threads); |
346 | } | 346 | } |
347 | 347 | ||
348 | void evlist__disable(struct evlist *evlist) | 348 | void evlist__disable(struct evlist *evlist) |
@@ -425,7 +425,7 @@ int perf_evlist__enable_event_idx(struct evlist *evlist, | |||
425 | int perf_evlist__alloc_pollfd(struct evlist *evlist) | 425 | int perf_evlist__alloc_pollfd(struct evlist *evlist) |
426 | { | 426 | { |
427 | int nr_cpus = cpu_map__nr(evlist->core.cpus); | 427 | int nr_cpus = cpu_map__nr(evlist->core.cpus); |
428 | int nr_threads = thread_map__nr(evlist->threads); | 428 | int nr_threads = thread_map__nr(evlist->core.threads); |
429 | int nfds = 0; | 429 | int nfds = 0; |
430 | struct evsel *evsel; | 430 | struct evsel *evsel; |
431 | 431 | ||
@@ -556,8 +556,8 @@ static void perf_evlist__set_sid_idx(struct evlist *evlist, | |||
556 | sid->cpu = evlist->core.cpus->map[cpu]; | 556 | sid->cpu = evlist->core.cpus->map[cpu]; |
557 | else | 557 | else |
558 | sid->cpu = -1; | 558 | sid->cpu = -1; |
559 | if (!evsel->system_wide && evlist->threads && thread >= 0) | 559 | if (!evsel->system_wide && evlist->core.threads && thread >= 0) |
560 | sid->tid = thread_map__pid(evlist->threads, thread); | 560 | sid->tid = thread_map__pid(evlist->core.threads, thread); |
561 | else | 561 | else |
562 | sid->tid = -1; | 562 | sid->tid = -1; |
563 | } | 563 | } |
@@ -722,7 +722,7 @@ static struct perf_mmap *perf_evlist__alloc_mmap(struct evlist *evlist, | |||
722 | 722 | ||
723 | evlist->nr_mmaps = cpu_map__nr(evlist->core.cpus); | 723 | evlist->nr_mmaps = cpu_map__nr(evlist->core.cpus); |
724 | if (cpu_map__empty(evlist->core.cpus)) | 724 | if (cpu_map__empty(evlist->core.cpus)) |
725 | evlist->nr_mmaps = thread_map__nr(evlist->threads); | 725 | evlist->nr_mmaps = thread_map__nr(evlist->core.threads); |
726 | map = zalloc(evlist->nr_mmaps * sizeof(struct perf_mmap)); | 726 | map = zalloc(evlist->nr_mmaps * sizeof(struct perf_mmap)); |
727 | if (!map) | 727 | if (!map) |
728 | return NULL; | 728 | return NULL; |
@@ -836,7 +836,7 @@ static int perf_evlist__mmap_per_cpu(struct evlist *evlist, | |||
836 | { | 836 | { |
837 | int cpu, thread; | 837 | int cpu, thread; |
838 | int nr_cpus = cpu_map__nr(evlist->core.cpus); | 838 | int nr_cpus = cpu_map__nr(evlist->core.cpus); |
839 | int nr_threads = thread_map__nr(evlist->threads); | 839 | int nr_threads = thread_map__nr(evlist->core.threads); |
840 | 840 | ||
841 | pr_debug2("perf event ring buffer mmapped per cpu\n"); | 841 | pr_debug2("perf event ring buffer mmapped per cpu\n"); |
842 | for (cpu = 0; cpu < nr_cpus; cpu++) { | 842 | for (cpu = 0; cpu < nr_cpus; cpu++) { |
@@ -864,7 +864,7 @@ static int perf_evlist__mmap_per_thread(struct evlist *evlist, | |||
864 | struct mmap_params *mp) | 864 | struct mmap_params *mp) |
865 | { | 865 | { |
866 | int thread; | 866 | int thread; |
867 | int nr_threads = thread_map__nr(evlist->threads); | 867 | int nr_threads = thread_map__nr(evlist->core.threads); |
868 | 868 | ||
869 | pr_debug2("perf event ring buffer mmapped per thread\n"); | 869 | pr_debug2("perf event ring buffer mmapped per thread\n"); |
870 | for (thread = 0; thread < nr_threads; thread++) { | 870 | for (thread = 0; thread < nr_threads; thread++) { |
@@ -1015,7 +1015,7 @@ int perf_evlist__mmap_ex(struct evlist *evlist, unsigned int pages, | |||
1015 | { | 1015 | { |
1016 | struct evsel *evsel; | 1016 | struct evsel *evsel; |
1017 | const struct perf_cpu_map *cpus = evlist->core.cpus; | 1017 | const struct perf_cpu_map *cpus = evlist->core.cpus; |
1018 | const struct perf_thread_map *threads = evlist->threads; | 1018 | const struct perf_thread_map *threads = evlist->core.threads; |
1019 | /* | 1019 | /* |
1020 | * Delay setting mp.prot: set it before calling perf_mmap__mmap. | 1020 | * Delay setting mp.prot: set it before calling perf_mmap__mmap. |
1021 | * Its value is decided by evsel's write_backward. | 1021 | * Its value is decided by evsel's write_backward. |
@@ -1121,9 +1121,9 @@ void perf_evlist__set_maps(struct evlist *evlist, struct perf_cpu_map *cpus, | |||
1121 | evlist->core.cpus = perf_cpu_map__get(cpus); | 1121 | evlist->core.cpus = perf_cpu_map__get(cpus); |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | if (threads != evlist->threads) { | 1124 | if (threads != evlist->core.threads) { |
1125 | perf_thread_map__put(evlist->threads); | 1125 | perf_thread_map__put(evlist->core.threads); |
1126 | evlist->threads = perf_thread_map__get(threads); | 1126 | evlist->core.threads = perf_thread_map__get(threads); |
1127 | } | 1127 | } |
1128 | 1128 | ||
1129 | perf_evlist__propagate_maps(evlist); | 1129 | perf_evlist__propagate_maps(evlist); |
@@ -1398,7 +1398,7 @@ int evlist__open(struct evlist *evlist) | |||
1398 | * Default: one fd per CPU, all threads, aka systemwide | 1398 | * Default: one fd per CPU, all threads, aka systemwide |
1399 | * as sys_perf_event_open(cpu = -1, thread = -1) is EINVAL | 1399 | * as sys_perf_event_open(cpu = -1, thread = -1) is EINVAL |
1400 | */ | 1400 | */ |
1401 | if (evlist->threads == NULL && evlist->core.cpus == NULL) { | 1401 | if (evlist->core.threads == NULL && evlist->core.cpus == NULL) { |
1402 | err = perf_evlist__create_syswide_maps(evlist); | 1402 | err = perf_evlist__create_syswide_maps(evlist); |
1403 | if (err < 0) | 1403 | if (err < 0) |
1404 | goto out_err; | 1404 | goto out_err; |
@@ -1501,12 +1501,12 @@ int perf_evlist__prepare_workload(struct evlist *evlist, struct target *target, | |||
1501 | } | 1501 | } |
1502 | 1502 | ||
1503 | if (target__none(target)) { | 1503 | if (target__none(target)) { |
1504 | if (evlist->threads == NULL) { | 1504 | if (evlist->core.threads == NULL) { |
1505 | fprintf(stderr, "FATAL: evlist->threads need to be set at this point (%s:%d).\n", | 1505 | fprintf(stderr, "FATAL: evlist->threads need to be set at this point (%s:%d).\n", |
1506 | __func__, __LINE__); | 1506 | __func__, __LINE__); |
1507 | goto out_close_pipes; | 1507 | goto out_close_pipes; |
1508 | } | 1508 | } |
1509 | perf_thread_map__set_pid(evlist->threads, 0, evlist->workload.pid); | 1509 | perf_thread_map__set_pid(evlist->core.threads, 0, evlist->workload.pid); |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | close(child_ready_pipe[1]); | 1512 | close(child_ready_pipe[1]); |
@@ -1921,7 +1921,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist, | |||
1921 | 1921 | ||
1922 | evlist__for_each_entry(evlist, counter) { | 1922 | evlist__for_each_entry(evlist, counter) { |
1923 | if (evsel__open(counter, evlist->core.cpus, | 1923 | if (evsel__open(counter, evlist->core.cpus, |
1924 | evlist->threads) < 0) | 1924 | evlist->core.threads) < 0) |
1925 | goto out_delete_evlist; | 1925 | goto out_delete_evlist; |
1926 | } | 1926 | } |
1927 | 1927 | ||
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index fdd8f83eac2d..de2025d198d4 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -43,7 +43,6 @@ struct evlist { | |||
43 | struct fdarray pollfd; | 43 | struct fdarray pollfd; |
44 | struct perf_mmap *mmap; | 44 | struct perf_mmap *mmap; |
45 | struct perf_mmap *overwrite_mmap; | 45 | struct perf_mmap *overwrite_mmap; |
46 | struct perf_thread_map *threads; | ||
47 | struct evsel *selected; | 46 | struct evsel *selected; |
48 | struct events_stats stats; | 47 | struct events_stats stats; |
49 | struct perf_env *env; | 48 | struct perf_env *env; |
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 24c9c3015983..799f3c0a9050 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c | |||
@@ -507,7 +507,7 @@ int perf_stat_synthesize_config(struct perf_stat_config *config, | |||
507 | err = perf_event__synthesize_extra_attr(tool, evlist, process, | 507 | err = perf_event__synthesize_extra_attr(tool, evlist, process, |
508 | attrs); | 508 | attrs); |
509 | 509 | ||
510 | err = perf_event__synthesize_thread_map2(tool, evlist->threads, | 510 | err = perf_event__synthesize_thread_map2(tool, evlist->core.threads, |
511 | process, NULL); | 511 | process, NULL); |
512 | if (err < 0) { | 512 | if (err < 0) { |
513 | pr_err("Couldn't synthesize thread map.\n"); | 513 | pr_err("Couldn't synthesize thread map.\n"); |