From patchwork Mon Sep 16 09:17:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 20322 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ED5A52486B for ; Mon, 16 Sep 2013 09:17:51 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf3814416yen.2 for ; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) 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=eUQsa2GcKWr+Ih545bhUidZYy7xs4LwniFhYoE0MEQ4=; b=kShDsOLEVGYLtg4Oqb00lDSidZ8Nh84d9F/vlK8/0MrF/CrFCeLvMpg9cih+pOQkVK fzstpP1goYSmPrSwMrW4r2Wv40gZaE0nJj/BgHXNL+Uc0vr6U86gMmvBs6vlSnfdlfDf PV+83gGV9bJN7DUI2xJUUU9suhCQcQTMKgg24gDG/lSsyDKuaoRzt5TK9KMYZ1KIfdz5 3RkW4iOaQuDX5zI+xFhQKfQ3Uo2n9/pNSeluNg7vv8FNXAAOLNzbJw7NT1zUeBjNTRRS Nazar8RiNkAj6FbaH9eoTCbwg7M8cD9Vv1y0aupzXT7ehcV/5Cs1tlwNiSMsbEXRSvTu 4tGA== X-Gm-Message-State: ALoCoQm5FZjZyfoBh5I5oimYvL24G42iNYc4YZIXHMhYjB+2HGcImHaTq78G2WbNxR9flnF0v9qb X-Received: by 10.224.61.211 with SMTP id u19mr8261577qah.5.1379323071570; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.199 with SMTP id y7ls2184529qed.78.gmail; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) X-Received: by 10.52.23.113 with SMTP id l17mr4036636vdf.23.1379323071493; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ee8si6870324vdc.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 02:17:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id ij15so2604348vcb.2 for ; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) X-Received: by 10.52.108.230 with SMTP id hn6mr399579vdb.28.1379323071225; Mon, 16 Sep 2013 02:17:51 -0700 (PDT) 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 u4csp85950vcz; Mon, 16 Sep 2013 02:17:50 -0700 (PDT) X-Received: by 10.14.213.68 with SMTP id z44mr795950eeo.70.1379323070514; Mon, 16 Sep 2013 02:17:50 -0700 (PDT) Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by mx.google.com with ESMTPS id t9si15128176eeh.183.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 02:17:50 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.43 is neither permitted nor denied by best guess record for domain of jean.pihet@linaro.org) client-ip=74.125.83.43; Received: by mail-ee0-f43.google.com with SMTP id e52so1890845eek.30 for ; Mon, 16 Sep 2013 02:17:50 -0700 (PDT) X-Received: by 10.14.108.194 with SMTP id q42mr86595eeg.113.1379323069879; Mon, 16 Sep 2013 02:17:49 -0700 (PDT) Received: from localhost.localdomain (45.104-241-81.adsl-dyn.isp.belgacom.be. [81.241.104.45]) by mx.google.com with ESMTPSA id f49sm40208333eec.7.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Sep 2013 02:17:49 -0700 (PDT) From: Jean Pihet To: Will Deacon , Jiri Olsa , linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar Cc: patches@linaro.org, Jean Pihet Subject: [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature Date: Mon, 16 Sep 2013 11:17:32 +0200 Message-Id: <1379323053-11458-4-git-send-email-jean.pihet@linaro.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1379323053-11458-1-git-send-email-jean.pihet@linaro.org> References: <1379323053-11458-1-git-send-email-jean.pihet@linaro.org> 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.171 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: , The newly added dwarf unwinding feature [1] requires: . a recent version (>= 1.1) of libunwind, . libunwind to be configured with --enable-debug-frame. [1] http://www.spinics.net/lists/kernel/msg1598951.html Add the corresponding API test in the feature check list. Signed-off-by: Jean Pihet --- tools/perf/config/Makefile | 2 +- tools/perf/config/feature-tests.mak | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 4b65710..395bc41 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -223,7 +223,7 @@ endif FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(CFLAGS) $(LIBUNWIND_LDFLAGS) $(LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y) - msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99); + msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1); NO_LIBUNWIND := 1 endif # Libunwind support endif # NO_LIBUNWIND diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak index 708fb8e..87124d0 100644 --- a/tools/perf/config/feature-tests.mak +++ b/tools/perf/config/feature-tests.mak @@ -176,14 +176,23 @@ extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_proc_info_t *pi, int need_unwind_info, void *arg); - #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table) +extern int +UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, + unw_word_t ip, + unw_word_t segbase, + const char *obj_name, unw_word_t start, + unw_word_t end); + +#define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame) + int main(void) { unw_addr_space_t addr_space; addr_space = unw_create_addr_space(NULL, 0); unw_init_remote(NULL, addr_space, NULL); + dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0); dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL); return 0; }