OpenCloudOS-Kernel/tools/lib/perf
Adrian Hunter fc705fecf3 perf evlist: Fix id index for heterogeneous systems
perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map
index, CPU number and TID. It is passed indexes to the evsel's cpu and
thread maps, but references the evlist's maps instead. That results in
using incorrect CPU numbers on heterogeneous systems. Fix it by using
evsel maps.

The id index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in
sampling mode. Having an incorrect CPU number causes the trace data to
be attributed to the wrong CPU, and can result in decoder errors because
the trace data is then associated with the wrong process.

Committer notes:

Keep the class prefix convention in the function name, switching from
perf_evlist__set_sid_idx() to perf_evsel__set_sid_idx().

Fixes: 3c659eedad ("perf tools: Add id index")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20210121125446.11287-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-21 17:25:33 -03:00
..
Documentation libperf: Fix man page typos 2020-08-13 09:34:26 -03:00
include perf tools: Add size to 'struct perf_record_header_build_id' 2020-10-14 11:28:12 -03:00
tests libperf tests: Fail when failing to get a tracepoint id 2021-01-15 17:28:27 -03:00
Build libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile libperf: Add man pages 2020-01-06 11:46:09 -03:00
core.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
cpumap.c libperf: Add NULL pointer check for cpu_map iteration and NULL assignment for all_cpus. 2020-05-05 16:35:29 -03:00
evlist.c perf evlist: Fix id index for heterogeneous systems 2021-01-21 17:25:33 -03:00
evsel.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
internal.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
lib.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
libperf.map libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
libperf.pc.template libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
mmap.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
threadmap.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
xyarray.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00