aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/callchain.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-08-07 20:16:23 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-09 06:54:41 -0400
commitb0efe213f84f7fd5ccfe07053e3d9fb827b7c188 (patch)
tree652a2d089e6c964b963409c1bf4186d4cdc67daa /tools/perf/util/callchain.c
parent266e0e219888420a1a7cafc82e82891cf7b5a979 (diff)
perf tools: callchain: Fix spurious 'perf report' warnings: ignore empty callchains
When the callchain tree comes to insert an empty backtrace, it raises a spurious warning about the fact we are inserting an empty. This is spurious because the radix tree assumes it did something wrong to reach this state. But it didn't, we just met an empty callchain that has to be ignored. This happens occasionally with certain types of call-chain recordings. If it happens it's a big nuisance as perf report output starts with thousands of warning lines. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <1249690585-9145-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/callchain.c')
-rw-r--r--tools/perf/util/callchain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 98c5627f327b..a8e67aa9ef49 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -336,5 +336,7 @@ __append_chain(struct callchain_node *root, struct ip_callchain *chain,
336void append_chain(struct callchain_node *root, struct ip_callchain *chain, 336void append_chain(struct callchain_node *root, struct ip_callchain *chain,
337 struct symbol **syms) 337 struct symbol **syms)
338{ 338{
339 if (!chain->nr)
340 return;
339 __append_chain_children(root, chain, syms, 0); 341 __append_chain_children(root, chain, syms, 0);
340} 342}