perf report: Fix comm sorting
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 3 Jun 2009 10:37:36 +0000 (12:37 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 3 Jun 2009 12:14:31 +0000 (14:14 +0200)
commit8229289b607682f90b946ad2c319526303c17700
tree0fafa2c4e66052e4b94fb3b3e23507d6962800a4
parente61078a0c88773d3465b0b9d665c5ed6b952b1cf
perf report: Fix comm sorting

Since we can (and do) change comm strings during the collection
phase, we cannot actually sort on them to build the histogram.
Therefore add an (optional) third sorting phase to collapse the
histrogram.

Comm sorting now builds the histrogram on threads and then in
the collapse phase collects all threads with the same comm.

This collapsed histogram is then reversed and sorted on events.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/builtin-report.c