linux_dsm_epyc7002/tools/perf
Frederic Weisbecker c61e52ee70 perf: Generalize perf lock's sample event reordering to the session layer
The sample events recorded by perf record are not time ordered
because we have one buffer per cpu for each event (even demultiplexed
per task/per cpu for task bound events). But when we read trace events
we want them to be ordered by time because many state machines are
involved.

There are currently two ways perf tools deal with that:

- use -M to multiplex every buffers (perf sched, perf kmem)
  But this creates a lot of contention in SMP machines on
  record time.

- use a post-processing time reordering (perf timechart, perf lock)
  The reordering used by timechart is simple but doesn't scale well
  with huge flow of events, in terms of performance and memory use
  (unusable with perf lock for example).
  Perf lock has its own samples reordering that flushes its memory
  use in a regular basis and that uses a sorting based on the
  previous event queued (a new event to be queued is close to the
  previous one most of the time).

This patch proposes to export perf lock's samples reordering facility
to the session layer that reads the events. So if a tool wants to
get ordered sample events, it needs to set its
struct perf_event_ops::ordered_samples to true and that's it.

This prepares tracing based perf tools to get rid of the need to
use buffers multiplexing (-M) or to implement their own
reordering.

Also lower the flush period to 2 as it's sufficient already.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
2010-04-24 03:49:58 +02:00
..
arch perf probe: Add PowerPC DWARF register number mappings 2010-04-22 13:48:31 +10:00
bench perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
Documentation perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
scripts perf trace/scripting: Enable scripting shell scripts for live mode 2010-04-14 11:56:08 +02:00
util perf: Generalize perf lock's sample event reordering to the session layer 2010-04-24 03:49:58 +02:00
.gitignore perf: Ignore perf-archive temp file 2010-01-29 10:37:33 +01:00
builtin-annotate.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-bench.c perf bench: Add "all" pseudo subsystem and "all" pseudo suite 2009-12-14 08:51:19 +01:00
builtin-buildid-cache.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
builtin-buildid-list.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-diff.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-help.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
builtin-kmem.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-kvm.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-lock.c perf: Generalize perf lock's sample event reordering to the session layer 2010-04-24 03:49:58 +02:00
builtin-probe.c perf probe: Fix to use correct debugfs path finder 2010-04-14 17:41:06 -03:00
builtin-record.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-report.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-sched.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
builtin-stat.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
builtin-timechart.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
builtin-top.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
builtin-trace.c perf trace: Invoke live mode automatically if record/report not specified 2010-04-14 11:56:09 +02:00
builtin.h perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
command-list.txt perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00
Makefile perf: Move arch specific code into separate arch directory 2010-04-22 13:48:31 +10:00
perf-archive.sh perf archive: Explain how to use the generated tarball 2010-03-23 20:33:08 +01:00
perf.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
perf.h perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00