mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <namhyung.kim@lge.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	acme@ghostprotocols.net, namhyung.kim@lge.com,
	namhyung@kernel.org, dsahern@gmail.com, irina.tirdea@gmail.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf tools: Don' t try to lookup objdump for live mode
Date: Tue, 13 Nov 2012 23:35:10 -0800	[thread overview]
Message-ID: <tip-ff6f7778a66edc033044a6baa2459ce79519e571@git.kernel.org> (raw)
In-Reply-To: <1352251815-12615-1-git-send-email-namhyung@kernel.org>

Commit-ID:  ff6f7778a66edc033044a6baa2459ce79519e571
Gitweb:     http://git.kernel.org/tip/ff6f7778a66edc033044a6baa2459ce79519e571
Author:     Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Wed, 7 Nov 2012 10:30:15 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 8 Nov 2012 17:26:52 -0300

perf tools: Don't try to lookup objdump for live mode

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>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Irina Tirdea <irina.tirdea@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352251815-12615-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/common.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 5683529..3e975cb 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);
 }

      reply	other threads:[~2012-11-14  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07  1:30 [PATCH] perf tools: Don't " Namhyung Kim
2012-11-14  7:35 ` tip-bot for Namhyung Kim [this message]

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-ff6f7778a66edc033044a6baa2459ce79519e571@git.kernel.org \
    --to=namhyung.kim@lge.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=irina.tirdea@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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

Powered by JetHome