[PATCH v2] perf tools: Unify perf.data mapping and events handling

From: Frederic Weisbecker
Date: Wed Oct 07 2009 - 06:48:56 EST


On Wed, Oct 07, 2009 at 12:43:44PM +0200, Frederic Weisbecker wrote:
> This librarizes the perf.data file mapping and handling in various
> perf tools, roughly reducing the amount of code and fixing the places
> that mmap from beginning of the file whereas we want to mmap from
> the beginning of the data, leading to page faults because the mmap
> window is too small since the trace info are written in the file too.
>
> TODO:
>
> - Convert perf timechart too
> - Fix strange huge number of total samples reported in perf report
>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> Cc: Mike Galbraith <efault@xxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> ---
> tools/perf/Makefile | 2 +
> tools/perf/builtin-report.c | 211 +++++++------------------------------------
> tools/perf/builtin-sched.c | 140 ++++++-----------------------
> tools/perf/builtin-trace.c | 129 ++++-----------------------
> 4 files changed, 81 insertions(+), 401 deletions(-)


Sorry.
I'm really unable to post a correct first version of a patch :-(

---