public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
	mingo@redhat.com, efault@gmx.de, peterz@infradead.org,
	fweisbec@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] perf tools: callchain: Fix spurious 'perf report' warnings: ignore empty callchains
Date: Sun, 9 Aug 2009 11:09:46 GMT	[thread overview]
Message-ID: <tip-b0efe213f84f7fd5ccfe07053e3d9fb827b7c188@git.kernel.org> (raw)
In-Reply-To: <1249690585-9145-2-git-send-email-fweisbec@gmail.com>

Commit-ID:  b0efe213f84f7fd5ccfe07053e3d9fb827b7c188
Gitweb:     http://git.kernel.org/tip/b0efe213f84f7fd5ccfe07053e3d9fb827b7c188
Author:     Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Sat, 8 Aug 2009 02:16:23 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 9 Aug 2009 12:54:41 +0200

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>


---
 tools/perf/util/callchain.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 98c5627..a8e67aa 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,
 void append_chain(struct callchain_node *root, struct ip_callchain *chain,
 		  struct symbol **syms)
 {
+	if (!chain->nr)
+		return;
 	__append_chain_children(root, chain, syms, 0);
 }

  parent reply	other threads:[~2009-08-09 11:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-08  0:16 [PATCH 1/4] perf tools: callchain: Warn only once in empty node detection Frederic Weisbecker
2009-08-08  0:16 ` [PATCH 2/4] perf tools: callchain: Ignore empty callchains Frederic Weisbecker
2009-08-08 11:51   ` [tip:perfcounters/core] perf tools: callchain: Fix spurious 'perf report' warnings: ignore " tip-bot for Frederic Weisbecker
2009-08-09 11:09   ` tip-bot for Frederic Weisbecker [this message]
2009-08-08  0:16 ` [PATCH 3/4] perf tools: callchain: Default display callchain from report if recorded with -g Frederic Weisbecker
2009-08-08 11:51   ` [tip:perfcounters/core] perf tools: callchain: Fix 'perf report' display to be callchain by default tip-bot for Frederic Weisbecker
2009-08-09 11:09   ` tip-bot for Frederic Weisbecker
2009-08-08  0:16 ` [PATCH 4/4] perf tools: callchain: Display amount of ignored chains in fractal mode Frederic Weisbecker
2009-08-08 11:52   ` [tip:perfcounters/core] perf tools: callchain: Fix sum of percentages to be 100% by displaying " tip-bot for Frederic Weisbecker
2009-08-08 12:29     ` Ingo Molnar
2009-08-09  2:42       ` Frederic Weisbecker
2009-08-09 11:12         ` [tip:perfcounters/urgent] perf tools: callchain: Fix bad rounding of minimum rate tip-bot for Frederic Weisbecker
2009-08-09 11:10   ` [tip:perfcounters/core] perf tools: callchain: Fix sum of percentages to be 100% by displaying amount of ignored chains in fractal mode tip-bot for Frederic Weisbecker
2009-08-08  1:06 ` [PATCH 1/4] perf tools: callchain: Warn only once in empty node detection Arnaldo Carvalho de Melo
2009-08-08  1:10   ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-b0efe213f84f7fd5ccfe07053e3d9fb827b7c188@git.kernel.org \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox