perf tools: Fix call-chain cumul hit based sub-total (fractal mode)
authorFrederic Weisbecker <fweisbec@gmail.com>
Fri, 7 Aug 2009 05:11:05 +0000 (07:11 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 9 Aug 2009 10:54:33 +0000 (12:54 +0200)
commit1953287bfe8afcbbd235bd6c42c9df06d52438dc
tree7428a4f33fe3509d7a705706df4f3c688266e19f
parent836179834833272f89098c6d1e1b89e8e69797c2
perf tools: Fix call-chain cumul hit based sub-total (fractal mode)

The callchain fractal mode builds each new total hits in a new
branch of profiling by using the parent's hits of the current
branch plus the hits of the children.

This is wrong, the total hits of a branch should be made of the
sum of every children hits, we must ignore the parent hits in
this scope.

This patch also fixes another mistake with the hit counting.

Now the rates are correct.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-report.c
tools/perf/util/callchain.c
tools/perf/util/callchain.h