From patchwork Mon Dec 16 16:43:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 22524 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5970123FC7 for ; Mon, 16 Dec 2013 16:43:32 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf9852201yha.6 for ; Mon, 16 Dec 2013 08:43:31 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XdcLk8c8UpyzT7gmGT97NmvOcuashTlrpz/RsR+zfCM=; b=Ql+OzSC9lShYlWtT0fweYr+M8zCkBkNhy3IzDaH+c/Kjj+4hNnnQhg2XB1pJLgtxTn 7U5+eMMZu4TOLv3kVVrpQkvZUDdfyhghaAW9vswClbfsDxSDga32b6iNRFmhoMhVeu/v dDBhZxyn1KYhBJTowk2G56b/wVqSBtSN76W0sWmnM4YbCZuHgLJdW5cFCV9m2cTLY8D0 IYVYVkIEbalDeh8KpI1wovX+Wa3zNv1vjZ5hx0NbJYnpTuqP4pSWjETTv5x713UJBCnc 5hl278PEG5763aePnEkSUWzbgBkXY1JcDdOTbs0qWcKeAd02LCpBicvt5LWQS7AwzGud +oVw== X-Gm-Message-State: ALoCoQkH0piaKSyguwcJDgbflwgkxzsKobqFfIgYomniyoca2YB/ra7ZOr9U+JWYZppX3qWiFY4w X-Received: by 10.58.23.166 with SMTP id n6mr6512398vef.13.1387212211455; Mon, 16 Dec 2013 08:43:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.241 with SMTP id b17ls2206805qec.11.gmail; Mon, 16 Dec 2013 08:43:31 -0800 (PST) X-Received: by 10.52.164.203 with SMTP id ys11mr3692413vdb.37.1387212211317; Mon, 16 Dec 2013 08:43:31 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id sx7si4114935vdc.55.2013.12.16.08.43.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 08:43:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ld13so3281950vcb.6 for ; Mon, 16 Dec 2013 08:43:31 -0800 (PST) X-Received: by 10.220.159.4 with SMTP id h4mr8872981vcx.1.1387212211246; Mon, 16 Dec 2013 08:43:31 -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.220.174.196 with SMTP id u4csp2340vcz; Mon, 16 Dec 2013 08:43:30 -0800 (PST) X-Received: by 10.15.26.200 with SMTP id n48mr18015324eeu.46.1387212210336; Mon, 16 Dec 2013 08:43:30 -0800 (PST) Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) by mx.google.com with ESMTPS id h45si1192249eeo.4.2013.12.16.08.43.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 08:43:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.171 is neither permitted nor denied by best guess record for domain of jean.pihet@linaro.org) client-ip=209.85.215.171; Received: by mail-ea0-f171.google.com with SMTP id h10so2370991eak.30 for ; Mon, 16 Dec 2013 08:43:29 -0800 (PST) X-Received: by 10.14.150.5 with SMTP id y5mr17954708eej.73.1387212209684; Mon, 16 Dec 2013 08:43:29 -0800 (PST) Received: from localhost.localdomain (243.102-241-81.adsl-dyn.isp.belgacom.be. [81.241.102.243]) by mx.google.com with ESMTPSA id h3sm44142639eem.15.2013.12.16.08.43.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Dec 2013 08:43:28 -0800 (PST) From: Jean Pihet To: linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, Jiri Olsa , Ingo Molnar , Arnaldo Cc: patches@linaro.org, Will Deacon , Jean Pihet Subject: [PATCH] perf: unwind: use the dwarf info only if loaded Date: Mon, 16 Dec 2013 17:43:14 +0100 Message-Id: <1387212194-8028-1-git-send-email-jean.pihet@linaro.org> X-Mailer: git-send-email 1.7.11.7 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jean.pihet@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 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: , 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 --- 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 0efd539..416f22b 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