Skip to content
Browse files

perf: Initialize callchains roots's childen hits

commit 5225c45 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 <>
  • Loading branch information...
1 parent 1d1a528 commit c0016ec4e51c5ae58dfbe15974192badf567b5f4 @fweisbec fweisbec committed with gregkh Aug 22, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 tools/perf/util/callchain.h
1 tools/perf/util/callchain.h
@@ -50,6 +50,7 @@ static inline void callchain_init(struct callchain_node *node)
+ node->children_hit = 0;
node->parent = NULL;
node->hit = 0;

0 comments on commit c0016ec

Please sign in to comment.
Something went wrong with that request. Please try again.