alistair23-linux/tools/perf
Ian Munsie eac23d1c38 perf record,report,annotate,diff: Process events in order
This patch changes perf report to ask for the ID info on all events be
default if recording from multiple CPUs.

Perf report, annotate and diff will now process the events in order if
the kernel is able to provide timestamps on all events. This ensures
that events such as COMM and MMAP which are necessary to correctly
interpret samples are processed prior to those samples so that they are
attributed correctly.

Before:
 # perf record ./cachetest
 # perf report

 # Events: 6K cycles
 #
 # Overhead  Command      Shared Object                           Symbol
 # ........  .......  .................  ...............................
 #
     74.11%    :3259  [unknown]          [k] 0x4a6c
      1.50%  cachetest  ld-2.11.2.so       [.] 0x1777c
      1.46%    :3259  [kernel.kallsyms]  [k] .perf_event_mmap_ctx
      1.25%    :3259  [kernel.kallsyms]  [k] restore
      0.74%    :3259  [kernel.kallsyms]  [k] ._raw_spin_lock
      0.71%    :3259  [kernel.kallsyms]  [k] .filemap_fault
      0.66%    :3259  [kernel.kallsyms]  [k] .memset
      0.54%  cachetest  [kernel.kallsyms]  [k] .sha_transform
      0.54%    :3259  [kernel.kallsyms]  [k] .copy_4K_page
      0.54%    :3259  [kernel.kallsyms]  [k] .find_get_page
      0.52%    :3259  [kernel.kallsyms]  [k] .trace_hardirqs_off
      0.50%    :3259  [kernel.kallsyms]  [k] .__do_fault
<SNIP>

After:
 # perf report

 # Events: 6K cycles
 #
 # Overhead  Command      Shared Object                           Symbol
 # ........  .......  .................  ...............................
 #
     44.28%  cachetest  cachetest          [.] sumArrayNaive
     22.53%  cachetest  cachetest          [.] sumArrayOptimal
      6.59%  cachetest  ld-2.11.2.so       [.] 0x1777c
      2.13%  cachetest  [unknown]          [k] 0x340
      1.46%  cachetest  [kernel.kallsyms]  [k] .perf_event_mmap_ctx
      1.25%  cachetest  [kernel.kallsyms]  [k] restore
      0.74%  cachetest  [kernel.kallsyms]  [k] ._raw_spin_lock
      0.71%  cachetest  [kernel.kallsyms]  [k] .filemap_fault
      0.66%  cachetest  [kernel.kallsyms]  [k] .memset
      0.54%  cachetest  [kernel.kallsyms]  [k] .copy_4K_page
      0.54%  cachetest  [kernel.kallsyms]  [k] .find_get_page
      0.54%  cachetest  [kernel.kallsyms]  [k] .sha_transform
      0.52%  cachetest  [kernel.kallsyms]  [k] .trace_hardirqs_off
      0.50%  cachetest  [kernel.kallsyms]  [k] .__do_fault
<SNIP>

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <1291872833-839-1-git-send-email-imunsie@au1.ibm.com>
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-12-21 20:17:51 -02:00
..
arch Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-06 09:30:52 -07:00
bench perf bench: Add feature that measures the performance of the arch/x86/lib/memcpy_64.S memcpy routines via 'perf bench mem' 2010-11-26 08:15:57 +01:00
Documentation perf report: Allow user to specify path to kallsyms file 2010-12-09 11:07:07 -02:00
scripts perf: Rename 'perf trace' to 'perf script' 2010-11-16 19:37:44 +01:00
util perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
.gitignore perf tools: .gitignore += config.make config.make.autogen 2010-06-17 10:24:31 -03:00
builtin-annotate.c perf record,report,annotate,diff: Process events in order 2010-12-21 20:17:51 -02:00
builtin-bench.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-buildid-cache.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
builtin-buildid-list.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-diff.c perf record,report,annotate,diff: Process events in order 2010-12-21 20:17:51 -02:00
builtin-help.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-inject.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-kmem.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-kvm.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -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 session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-probe.c perf probe: Add basic module support 2010-10-21 16:11:44 -02:00
builtin-record.c perf record,report,annotate,diff: Process events in order 2010-12-21 20:17:51 -02:00
builtin-report.c perf record,report,annotate,diff: Process events in order 2010-12-21 20:17:51 -02:00
builtin-sched.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-script.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-stat.c perf stat: Add csv-style output 2010-12-01 19:47:41 -02:00
builtin-test.c perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00
builtin-timechart.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin-top.c perf session: Fallback to unordered processing if no sample_id_all 2010-12-21 20:17:51 -02:00
builtin.h perf: Rename 'perf trace' to 'perf script' 2010-11-16 19:37:44 +01:00
command-list.txt Merge branch 'perf/rename' into perf/core 2010-12-01 09:22:19 +01: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
feature-tests.mak perf tools: Remove hardcoded include paths for elfutils 2010-11-19 16:38:04 -02:00
Makefile perf makefile: Allow strong and weak functions in LIB_OBJS 2010-12-07 11:58:50 -02:00
MANIFEST perf packaging: add memcpy to perf MANIFEST 2010-11-30 23:00:10 -02:00
perf-archive.sh perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.c perf: Rename 'perf trace' to 'perf script' 2010-11-16 19:37:44 +01:00
perf.h perf, MIPS: Support cross compiling of tools/perf for MIPS 2010-10-12 13:34:37 +02:00