[lkml]   [2010]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[056/123] perf: Initialize callchains rootss childen hits
From: Frederic Weisbecker <>

commit 5225c45899e872383ca39f5533d28ec63c54b39e upstream.

Each histogram entry has a callchain root that stores the
callchain samples. However we forgot to initialize the
tracking of children hits of these roots, which then got
random values on their creation.

The root children hits is multiplied by the minimum percentage
of hits provided by the user, and the result becomes the minimum
hits expected from children branches. If the random value due
to the uninitialization is big enough, then this minimum number
of hits can be huge and eventually filter every children branches.

The end result was invisible callchains. All we need to
fix this is to initialize the children hits of the root.

Reported-by: Christoph Hellwig <>
Signed-off-by: Frederic Weisbecker <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Arnaldo Carvalho de Melo <>
Cc: Paul Mackerras <>
Signed-off-by: Greg Kroah-Hartman <>

tools/perf/util/callchain.h | 1 +
1 file changed, 1 insertion(+)

--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -49,6 +49,7 @@ static inline void callchain_init(struct

+ node->children_hit = 0;
node->parent = NULL;
node->hit = 0;

 \ /
  Last update: 2010-09-18 21:53    [W:0.303 / U:0.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site