From patchwork Mon Jan 13 20:47:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 23176 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 98786202DA for ; Mon, 13 Jan 2014 20:48:11 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id i4sf21582046oah.10 for ; Mon, 13 Jan 2014 12:48:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=ubDlWXfgzZF95fxtBUAdEdQ+LzCFciiXaJTIoohaST4=; b=C+A2/v3R67nwP5gOn6F8LBxQ4zcpp8FcVGTJmQxJaGRBuyhW7eN2+jKWXIrweTVZPa mQX9wRHGZ+2oMKnfFmiE4YzxgNyk/lf4VBAgTNL8Kiy+vYwOtDEq8+BwFr/AB1hAxfCp cSZl6w/jBdRZZU+VC6OV4J8F3eOMBcdAzboOlzb2SL6uCRDmKDRTY95Qtfre0dhpEzJx WZ8zZPAkPfUreTGH7R/4Y/MfTqQTOQWF4nhWGHu9igL3LcIoFsibGfIT7QThAHSqvhXf f+Sx1t20Tg2Vt+fsUXRIwNxzJHrmzIPn4uj0w6h1VyAr5kODA3G5HnACVmSEHXNmGBIm AtNw== X-Gm-Message-State: ALoCoQnJdpiqD+JVdpmwpIB6vby5M6KSNqoyTIs7zn1t4OEfS/lVGWllnIkU7JvaW4n5t73S6E2l X-Received: by 10.182.251.230 with SMTP id zn6mr10020364obc.14.1389646090641; Mon, 13 Jan 2014 12:48:10 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.11.173 with SMTP id r13ls2436079qeb.12.gmail; Mon, 13 Jan 2014 12:48:10 -0800 (PST) X-Received: by 10.52.89.173 with SMTP id bp13mr9874431vdb.5.1389646090492; Mon, 13 Jan 2014 12:48:10 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id sp7si11548785vdc.8.2014.01.13.12.48.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Jan 2014 12:48:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so5606365veb.12 for ; Mon, 13 Jan 2014 12:48:10 -0800 (PST) X-Received: by 10.58.187.98 with SMTP id fr2mr3126518vec.38.1389646090362; Mon, 13 Jan 2014 12:48:10 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp155800ved; Mon, 13 Jan 2014 12:48:09 -0800 (PST) X-Received: by 10.204.54.72 with SMTP id p8mr1652964bkg.24.1389646089047; Mon, 13 Jan 2014 12:48:09 -0800 (PST) Received: from merlin.infradead.org (merlin.infradead.org. [2001:4978:20e::2]) by mx.google.com with ESMTPS id kn2si10530386bkb.201.2014.01.13.12.48.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2014 12:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of BATV+613fc7a174fba1bb701a+3795+infradead.org+acme@merlin.srs.infradead.org designates 2001:4978:20e::2 as permitted sender) client-ip=2001:4978:20e::2; Received: from [177.135.13.95] (helo=zoo.ghostprotocols.net) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2oQV-0004Vd-8m; Mon, 13 Jan 2014 20:48:03 +0000 Received: by zoo.ghostprotocols.net (Postfix, from userid 1000) id 5D8961E19A0; Mon, 13 Jan 2014 17:47:43 -0300 (BRT) From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jean Pihet , Jiri Olsa , Will Deacon , linaro-kernel@lists.linaro.org, patches@linaro.org, Arnaldo Carvalho de Melo Subject: [PATCH 30/38] perf tools: Use the DWARF unwind info only if loaded Date: Mon, 13 Jan 2014 17:47:31 -0300 Message-Id: <1389646059-24881-31-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1389646059-24881-1-git-send-email-acme@infradead.org> References: <1389646059-24881-1-git-send-email-acme@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org See http://www.infradead.org/rpr.html X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: acme@infradead.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jean Pihet Use the info only if it has been found in the .debug_frame section of the ELF binary. Signed-off-by: Jean Pihet Acked-by: Jiri Olsa Cc: Ingo Molnar Cc: Jiri Olsa Cc: Will Deacon Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Link: http://lkml.kernel.org/r/1387212194-8028-1-git-send-email-jean.pihet@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/unwind.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c index 0efd5393de85..416f22bf3693 100644 --- a/tools/perf/util/unwind.c +++ b/tools/perf/util/unwind.c @@ -340,10 +340,10 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, /* Check the .debug_frame section for unwinding info */ if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) { memset(&di, 0, sizeof(di)); - dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name, - map->start, map->end); - return dwarf_search_unwind_table(as, ip, &di, pi, - need_unwind_info, arg); + if (dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name, + map->start, map->end)) + return dwarf_search_unwind_table(as, ip, &di, pi, + need_unwind_info, arg); } #endif