linux-stable/tools/perf
Leo Yan 95c6fe970a perf cs-etm: Change tuple from traceID-CPU# to traceID-metadata
If packet processing wants to know the packet is bound with which ETM
version, it needs to access metadata to decide that based on metadata
magic number; but we cannot simply to use CPU logic ID number as index
to access metadata sequential array, especially when system have
hotplugged off CPUs, the metadata array are only allocated for online
CPUs but not offline CPUs, so the CPU logic number doesn't match with
its index in the array.

This patch is to change tuple from traceID-CPU# to traceID-metadata,
thus it can use the tuple to retrieve metadata pointer according to
traceID.

For safe accessing metadata fields, this patch provides helper function
cs_etm__get_cpu() which is used to return CPU number according to
traceID; cs_etm_decoder__buffer_packet() is the first consumer for this
helper function.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: coresight ml <coresight@lists.linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190129122842.32041-6-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-02-06 10:00:40 -03:00
..
arch perf coresight: Remove set_drv_config() API 2019-02-06 10:00:39 -03:00
bench perf bench: Add epoll_ctl(2) benchmark 2018-11-21 22:39:55 -03:00
Documentation perf tools: Add documentation for BPF event selection 2019-02-06 10:00:40 -03:00
examples/bpf perf augmented_syscalls: Convert to bpf_map() 2019-01-25 15:12:11 +01:00
include/bpf perf bpf: Convert pid_map() to bpf_map() 2019-01-25 15:12:10 +01:00
jvmti perf jvmti: Separate jvmti cmlr check 2018-11-21 22:39:58 -03:00
pmu-events nds32 patches for 4.21 2018-12-29 09:37:03 -08:00
python
scripts perf script python: Remove explicit shebang from Python scripts 2019-01-25 15:12:10 +01:00
tests perf tests pmu: Add missing headers 2019-02-06 10:00:38 -03:00
trace perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h 2019-01-08 14:09:33 -03:00
ui perf tools: Add missing include <callchain.h> in various places 2019-02-06 10:00:38 -03:00
util perf cs-etm: Change tuple from traceID-CPU# to traceID-metadata 2019-02-06 10:00:40 -03:00
.gitignore
Build
builtin-annotate.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-bench.c perf bench: Add epoll_ctl(2) benchmark 2018-11-21 22:39:55 -03:00
builtin-buildid-cache.c perf buildid-cache: Warn --purge-all failures 2018-05-15 10:32:16 -03:00
builtin-buildid-list.c
builtin-c2c.c perf hists: Add argument to hists__resort_cb_t callback 2019-02-06 10:00:39 -03:00
builtin-config.c perf config: Show the configuration when no arguments are provided 2018-12-18 12:24:00 -03:00
builtin-data.c
builtin-diff.c perf hist: Use cached rbtrees 2019-01-25 15:12:10 +01:00
builtin-evlist.c
builtin-ftrace.c
builtin-help.c perf help: Remove needless use of strncpy() 2018-12-17 14:59:18 -03:00
builtin-inject.c perf tools: Add missing include for symbols.h 2019-02-06 10:00:38 -03:00
builtin-kallsyms.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-kmem.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-kvm.c perf tools: Allow specifying proc-map-timeout in config file 2018-12-17 14:56:57 -03:00
builtin-list.c
builtin-lock.c
builtin-mem.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-probe.c perf namespaces: Remove namespaces.h from .h headers 2019-01-25 15:12:09 +01:00
builtin-record.c perf record: Apply affinity masks when reading mmap buffers 2019-02-06 10:00:39 -03:00
builtin-report.c perf report: Move symbol annotation to the resort phase 2019-02-06 10:00:40 -03:00
builtin-sched.c perf sched: Use cached rbtrees 2019-01-25 15:12:10 +01:00
builtin-script.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-stat.c perf pmu: Remove set_drv_config API 2019-02-06 10:00:39 -03:00
builtin-timechart.c perf tools: Add missing open_memstream() prototype for systems lacking it 2018-12-18 12:23:57 -03:00
builtin-top.c perf pmu: Remove set_drv_config API 2019-02-06 10:00:39 -03:00
builtin-trace.c perf tools: Add missing include for symbols.h 2019-02-06 10:00:38 -03:00
builtin-version.c
builtin.h
check-headers.sh tools headers powerpc: Remove unistd.h 2019-01-10 10:42:08 -03:00
command-list.txt perf help: Add missing subcommand version 2018-09-19 14:53:36 -03:00
CREDITS
design.txt perf/doc: Update design.txt for exclude_{host|guest} flags 2019-01-21 11:01:18 +01:00
Makefile perf tools: Disable parallelism for 'make clean' 2018-08-20 08:54:58 -03:00
Makefile.config perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2018-12-21 09:42:46 -03:00
Makefile.perf perf script python: Remove explicit shebang from Python scripts 2019-01-25 15:12:10 +01:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c perf tools: Make find_vdso_map() more modular 2019-01-08 13:28:13 -03:00
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Remove dead quote.[ch] code 2018-06-04 10:28:50 -03:00
perf.h perf record: Allocate affinity masks 2019-02-06 10:00:39 -03:00