diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-07-08 03:41:46 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-07-08 06:26:56 +0200 |
commit | 108553e1f3c45a92d23681a378ad9e4c3230eebc (patch) | |
tree | 27cde88dbb3ec8438d100032135e845bd43ad92d /tools/perf/util/callchain.h | |
parent | 97aa1052739c6a06cb6b0467dbf410613d20bc97 (diff) | |
download | blackbird-op-linux-108553e1f3c45a92d23681a378ad9e4c3230eebc.tar.gz blackbird-op-linux-108553e1f3c45a92d23681a378ad9e4c3230eebc.zip |
perf: Sync callchains with period based hits
Hists have their hits increased by the event period. And this
period based counting is the foundation of all the stats in
perf report.
But callchains still use the raw number of hits, without taking
the period into account. So when we compute the percentage,
absolute based percentages are totally broken, and relative ones
too in the first parent level. Because we pass the number of events
muliplied by their period as the total number of hits to the
callchain filtering, while callchains expect this number to be
the number of raw hits.
perf report -g graph was simply not working, showing no graph unless
the min percent was zero. And even there the percentage of the
branches was always 0. And may be fractal filtering was broken on
the first branch level too.
flat also was broken, but it was hidden because of other breakages.
Anyway fix this by counting using periods on callchains.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r-- | tools/perf/util/callchain.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 22dbaec003d5..f2e9ee164bd8 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -61,7 +61,7 @@ static inline u64 cumul_hits(struct callchain_node *node) int register_callchain_param(struct callchain_param *param); int append_chain(struct callchain_node *root, struct ip_callchain *chain, - struct map_symbol *syms); + struct map_symbol *syms, u64 period); bool ip_callchain__valid(struct ip_callchain *chain, event_t *event); #endif /* __PERF_CALLCHAIN_H */ |