linux/tools/perf
Jiri Olsa ceaefcdf2a perf session: Do not fail on processing out of order event
commit f61ff6c06d upstream.

Linus reported perf report command being interrupted due to processing
of 'out of order' event, with following error:

  Timestamp below last timeslice flush
  0x5733a8 [0x28]: failed to process type: 3

I could reproduce the issue and in my case it was caused by one CPU
(mmap) being behind during record and userspace mmap reader seeing the
data after other CPUs data were already stored.

This is expected under some circumstances because we need to limit the
number of events that we queue for reordering when we receive a
PERF_RECORD_FINISHED_ROUND or when we force flush due to memory
pressure.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1417016371-30249-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[zhangzhiqiang: backport to 3.10:
 - adjust context
 - commit f61ff6c06d struct events_stats was defined in tools/perf/util/event.h
   while 3.10 stable defined in tools/perf/util/hist.h.
 - 3.10 stable there is no pr_oe_time() which used for debug.
 - After the above adjustments, becomes same to the original patch:
   f61ff6c06d
]
Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-16 06:59:34 -08:00
..
Documentation perf record: Rename --initial-delay to --delay 2014-01-14 17:58:12 -03:00
arch perf tools: Introduce zfree 2013-12-27 15:17:00 -03:00
bench perf bench numa: Make no args mean 'run all tests' 2014-03-14 10:04:10 -03:00
config perf tools: fix BFD detection on opensuse 2014-02-27 18:29:08 -03:00
python
scripts perf tools: Finish the removal of 'self' arguments 2013-11-05 15:32:36 -03:00
tests perf tests: No need to set up ref_reloc_sym 2014-01-31 17:21:52 -03:00
ui perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
util perf session: Do not fail on processing out of order event 2015-01-16 06:59:34 -08:00
.gitignore
CREDITS
MANIFEST perf tools: Include tools/lib/api/ in MANIFEST 2014-01-13 10:06:26 -03:00
Makefile perf tools: Add 'build-test' make target 2014-01-16 16:26:26 -03:00
Makefile.perf perf: tools: Fix cross building 2014-01-15 15:15:05 -03:00
builtin-annotate.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-bench.c perf bench: Fix NULL pointer dereference in "perf bench all" 2014-03-14 13:45:54 -03:00
builtin-buildid-cache.c perf buildid-cache: Check relocation when checking for existing kcore 2014-01-31 17:21:54 -03:00
builtin-buildid-list.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-diff.c perf diff: Color the Weighted Diff column 2014-01-13 11:38:25 -03:00
builtin-evlist.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-help.c
builtin-inject.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-kmem.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-kvm.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-list.c perf list: Add usage 2013-11-05 14:26:41 -03:00
builtin-lock.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-mem.c perf mem: Remove unused parameter from dump_raw_samples() 2013-12-19 17:03:39 -03:00
builtin-probe.c perf probe: Release all dynamically allocated parameters 2014-01-16 16:29:02 -03:00
builtin-record.c perf record: Get ref_reloc_sym from kernel map 2014-01-31 17:21:50 -03:00
builtin-report.c perf annotate: Check availability of annotate when processing samples 2014-02-24 11:12:55 -03:00
builtin-sched.c perf tools: Use zfree to help detect use after free bugs 2013-12-27 17:08:19 -03:00
builtin-script.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-stat.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-timechart.c perf timechart: Fix wrong SVG height 2014-01-20 16:19:08 -03:00
builtin-top.c perf annotate: Check availability of annotate when processing samples 2014-02-24 11:12:55 -03:00
builtin-trace.c perf trace: Decode architecture-specific signal numbers 2014-03-10 11:10:45 -03:00
builtin.h
command-list.txt
design.txt perf/doc: Remove mention of non-existent set_perf_event_pending() from design.txt 2014-01-26 09:37:48 +01:00
perf-archive.sh
perf-completion.sh perf completion: Complete 'perf kvm' 2013-12-13 10:30:21 -03:00
perf.c tools/: Convert to new topic libraries 2013-12-16 16:03:27 -03:00
perf.h perf tools: Fix AAAAARGH64 memory barriers 2014-01-29 15:50:57 -03:00