From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, David Miller <davem@davemloft.net>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4/9] perf symbols: Handle NULL dso in dso__name_len
Date: Fri, 30 Mar 2012 13:09:19 -0300 [thread overview]
Message-ID: <1333123764-15662-5-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1333123764-15662-1-git-send-email-acme@infradead.org>
From: David Miller <davem@davemloft.net>
We should use "[unknown]" in this case, in concert with the code in
_hist_entry__dso_snprintf().
Otherwise we'll crash when recomputing the histogram column lengths in
hists__calc_col_len().
Signed-off-by: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/20120325.162822.2267799792062571623.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index d9e995b..c0a028c 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -50,6 +50,8 @@ struct symbol_conf symbol_conf = {
int dso__name_len(const struct dso *dso)
{
+ if (!dso)
+ return strlen("[unknown]");
if (verbose)
return dso->long_name_len;
--
1.7.9.2.358.g22243
next prev parent reply other threads:[~2012-03-30 16:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 16:09 [GIT PULL 0/9] perf/urgent fixes Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 1/9] perf tools: Fix display of first level of callchains Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 2/9] perf tools: Fix bug in raw sample parsing Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 3/9] perf symbols: Do not include libgen.h Arnaldo Carvalho de Melo
2012-03-30 16:09 ` Arnaldo Carvalho de Melo [this message]
2012-03-30 16:09 ` [PATCH 5/9] perf probe: Finder fails to resolve function name to address Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 6/9] perf annotate: addr2line wants addresses in same format as objdump Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 7/9] perf tools: Add missing ref-cycles event back to event parser Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 8/9] perf annotate: Fix off by one symbol hist size allocation and hit accounting Arnaldo Carvalho de Melo
2012-03-30 16:09 ` [PATCH 9/9] perf tools: Remove auto-generated bison/flex files Arnaldo Carvalho de Melo
2012-03-30 16:43 ` Namhyung Kim
2012-03-30 17:09 ` David Daney
2012-03-30 22:01 ` Arnaldo Carvalho de Melo
2012-03-31 7:31 ` [GIT PULL 0/9] perf/urgent fixes Ingo Molnar
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=1333123764-15662-5-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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
all inboxes | Powered by JetHome®