From: Frederic Weisbecker Date: Mon, 3 Jan 2011 15:13:11 +0000 (+0100) Subject: perf: Fix callchain hit bad cast on ascii display X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d425de5436a620de506f9e4119bf8daa1cb93718;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf: Fix callchain hit bad cast on ascii display ipchain__fprintf_graph() casts the number of hits in a branch as an int, which means we lose its highests bits. This results in meaningless number of callchain hits in perf.data that have a high number of hits recorded, typically those that have callchain branches hits appearing more than INT_MAX. This happens easily as those are pondered by the event period. Reported-by: Nick Piggin Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras --- diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 2022e8740994..76bcc35cf9b1 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -356,7 +356,7 @@ static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask, static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain, int depth, int depth_mask, int period, - u64 total_samples, int hits, + u64 total_samples, u64 hits, int left_margin) { int i;