linux-stable/tools/perf
Leo Yan 37bb37168d perf cs-etm: Treat NO_SYNC element as trace discontinuity
The CoreSight tracer driver might insert barrier packets between
different buffers, thus the decoder can spot the boundaries based on the
barrier packet; it is possible for the decoder to hit a barrier packet
and emit a NO_SYNC element, then the decoder will find a periodic
synchronisation point inside that next trace block that starts the trace
again but does not have the TRACE_ON element as indicator - usually
because this trace block has wrapped the buffer so we have lost the
original point when the trace was enabled.

In the first case it causes the insertion of a OCSD_GEN_TRC_ELEM_NO_SYNC
in the middle of the tracing stream, but as we were not handling the
NO_SYNC element properly this ends up making users miss the
discontinuity indications.

Though OCSD_GEN_TRC_ELEM_NO_SYNC is different from CS_ETM_TRACE_ON when
output from the decoder, both indicate that the trace data is
discontinuous; this patch treats OCSD_GEN_TRC_ELEM_NO_SYNC as a trace
discontinuity and generates a CS_ETM_DISCONTINUITY packet for it, so
cs-etm can handle the discontinuity for this case, finally it saves the
last trace data for the previous trace block and restart samples for the
new block.

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: coresight ml <coresight@lists.linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1544513908-16805-7-git-send-email-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-12-18 12:23:59 -03:00
..
arch perf annotate: Introduce basic support for ARC 2018-12-17 14:59:42 -03:00
bench perf bench: Add epoll_ctl(2) benchmark 2018-11-21 22:39:55 -03:00
Documentation perf trace: Allow selecting use the use of the ordered_events code 2018-12-18 12:23:55 -03:00
examples/bpf perf augmented_syscalls: Switch to using a struct for the syscalls map values 2018-12-18 12:23:58 -03:00
include/bpf perf bpf: Move perf_event_output() from stdio.h to bpf.h 2018-12-18 12:23:58 -03:00
jvmti perf jvmti: Separate jvmti cmlr check 2018-11-21 22:39:58 -03:00
pmu-events perf vendor events intel: Fix Load_Miss_Real_Latency on SKL/SKX 2018-12-17 14:59:32 -03:00
python perf python: Make twatch.py work with both python2 and python3 2018-02-19 12:28:08 -03:00
scripts perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered 2018-11-05 14:53:00 -03:00
tests perf tests: Use shebangs in the shell scripts 2018-12-18 12:21:44 -03:00
trace perf trace: Beautify renameat2's flags argument 2018-12-18 12:23:56 -03:00
ui perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul 2018-12-17 14:59:23 -03:00
util perf cs-etm: Treat NO_SYNC element as trace discontinuity 2018-12-18 12:23:59 -03:00
.gitignore perf tools: Add trace/beauty/generated/ into .gitignore 2018-02-05 13:58:02 -03:00
Build perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
builtin-annotate.c perf tools: Remove perf_tool from event_op2 2018-09-19 10:25:10 -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 c2c report: Fix crash for empty browser 2018-07-31 10:53:20 -03:00
builtin-config.c
builtin-data.c
builtin-diff.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-evlist.c
builtin-ftrace.c perf ftrace: Append an EOL when write tracing files 2018-02-19 09:49:12 -03:00
builtin-help.c perf help: Remove needless use of strncpy() 2018-12-17 14:59:18 -03:00
builtin-inject.c perf tools: Report itrace options in help 2018-09-19 15:06:59 -03:00
builtin-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kmem.c tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag' 2018-08-13 15:22:18 -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 perf mem: Allow all record/report options 2018-04-18 15:35:48 -03:00
builtin-probe.c perf tools: No need to check if the argument to __get() function is NULL 2018-06-04 10:28:50 -03:00
builtin-record.c perf tools: Allow specifying proc-map-timeout in config file 2018-12-17 14:56:57 -03:00
builtin-report.c perf report: Display average IPC and IPC coverage per symbol 2018-12-17 14:55:44 -03:00
builtin-sched.c perf sched: Use sched->show_callchain where appropriate 2018-06-05 10:09:54 -03:00
builtin-script.c perf tools: Support 'srccode' output 2018-12-17 14:57:07 -03:00
builtin-stat.c perf stat: Avoid segfaults caused by negated options 2018-12-18 12:21:44 -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 top: Move perf_top__reset_sample_counters() to after counts display 2018-12-17 14:58:47 -03:00
builtin-trace.c perf trace: Switch to using a struct for the aumented_raw_syscalls syscalls map values 2018-12-18 12:23:58 -03:00
builtin-version.c perf version: Print status for syscall_table 2018-04-12 10:33:34 -03:00
builtin.h
check-headers.sh tools include uapi: Grab a copy of linux/fs.h 2018-10-30 11:46:22 -03:00
command-list.txt perf help: Add missing subcommand version 2018-09-19 14:53:36 -03:00
CREDITS
design.txt
Makefile perf tools: Disable parallelism for 'make clean' 2018-08-20 08:54:58 -03:00
Makefile.config perf tools: Add missing open_memstream() prototype for systems lacking it 2018-12-18 12:23:57 -03:00
Makefile.perf perf tools: Link libperf-jvmti.so with LDFLAGS variable 2018-12-18 12:23:57 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh perf tools: Auto-complete for events with ':' 2017-12-27 12:16:00 -03:00
perf-read-vdso.c
perf-sys.h Drop a bunch of metag references 2018-02-23 14:29:59 +00:00
perf-with-kcore.sh
perf.c perf tools: Remove dead quote.[ch] code 2018-06-04 10:28:50 -03:00
perf.h perf tools: Allow specifying proc-map-timeout in config file 2018-12-17 14:56:57 -03:00