From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
David Ahern <dsahern@gmail.com>,
Irina Tirdea <irina.tirdea@gmail.com>
Subject: [PATCH] perf tools: Don't try to lookup objdump for live mode
Date: Wed, 7 Nov 2012 10:30:15 +0900 [thread overview]
Message-ID: <1352251815-12615-1-git-send-email-namhyung@kernel.org> (raw)
From: Namhyung Kim <namhyung.kim@lge.com>
Arnaldo reported that annotation during perf top resulted in a
segfault. It was because the env->arch was NULL and we don't set it
for a live session. In fact, no need to look up objdump in this case
since we can use system's default (native) objdump.
Reported-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: Irina Tirdea <irina.tirdea@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/arch/common.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 5683529135b1..3e975cb6232e 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -199,6 +199,13 @@ out_error:
int perf_session_env__lookup_objdump(struct perf_session_env *env)
{
+ /*
+ * For live mode, env->arch will be NULL and we can use
+ * the native objdump tool.
+ */
+ if (env->arch == NULL)
+ return 0;
+
return perf_session_env__lookup_binutils_path(env, "objdump",
&objdump_path);
}
--
1.7.11.7
next reply other threads:[~2012-11-07 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 1:30 Namhyung Kim [this message]
2012-11-14 7:35 ` [tip:perf/core] perf tools: Don' t " tip-bot for Namhyung Kim
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=1352251815-12615-1-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=irina.tirdea@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.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
Powered by JetHome