Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 <hch@infradead.org>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
commit c0016ec4e51c5ae58dfbe15974192badf567b5f4 1 parent 1d1a528
Frederic Weisbecker fweisbec authored gregkh committed

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  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)
50 50 INIT_LIST_HEAD(&node->children);
51 51 INIT_LIST_HEAD(&node->val);
52 52
  53 + node->children_hit = 0;
53 54 node->parent = NULL;
54 55 node->hit = 0;
55 56 }

0 comments on commit c0016ec

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