diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-01-27 16:48:04 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-01-27 16:48:04 -0300 |
commit | 70f0ba9f2435c1f8693a6d958d8f9cf95e80d94e (patch) | |
tree | 1d65c007c7b32c9a956d65c6f349c6f59ad525b7 /tools/lib/perf | |
parent | cd07e536b0201fceffd90a701bfb1e1fc07fcd34 (diff) | |
parent | 76c057c84d286140c6c416c3b4ba832cd1d8984e (diff) | |
download | linux-70f0ba9f2435c1f8693a6d958d8f9cf95e80d94e.tar.gz linux-70f0ba9f2435c1f8693a6d958d8f9cf95e80d94e.tar.bz2 linux-70f0ba9f2435c1f8693a6d958d8f9cf95e80d94e.zip |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/perf')
-rw-r--r-- | tools/lib/perf/evlist.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c index cfcdbd7be066..17465d454a0e 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -367,21 +367,13 @@ static struct perf_mmap* perf_evlist__alloc_mmap(struct perf_evlist *evlist, boo return map; } -static void perf_evlist__set_sid_idx(struct perf_evlist *evlist, - struct perf_evsel *evsel, int idx, int cpu, - int thread) +static void perf_evsel__set_sid_idx(struct perf_evsel *evsel, int idx, int cpu, int thread) { struct perf_sample_id *sid = SID(evsel, cpu, thread); sid->idx = idx; - if (evlist->cpus && cpu >= 0) - sid->cpu = evlist->cpus->map[cpu]; - else - sid->cpu = -1; - if (!evsel->system_wide && evlist->threads && thread >= 0) - sid->tid = perf_thread_map__pid(evlist->threads, thread); - else - sid->tid = -1; + sid->cpu = perf_cpu_map__cpu(evsel->cpus, cpu); + sid->tid = perf_thread_map__pid(evsel->threads, thread); } static struct perf_mmap* @@ -500,8 +492,7 @@ mmap_per_evsel(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops, if (perf_evlist__id_add_fd(evlist, evsel, cpu, thread, fd) < 0) return -1; - perf_evlist__set_sid_idx(evlist, evsel, idx, cpu, - thread); + perf_evsel__set_sid_idx(evsel, idx, cpu, thread); } } |