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: 2896131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DCDEABFF05 for ; Mon, 16 Sep 2013 09:20:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AF260201DC for ; Mon, 16 Sep 2013 09:20:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D72CF201D5 for ; Mon, 16 Sep 2013 09:19:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLUxR-0002xl-H1; Mon, 16 Sep 2013 09:19:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLUxA-0006Le-Da; Mon, 16 Sep 2013 09:18:44 +0000 Received: from mail-ee0-f53.google.com ([74.125.83.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLUwe-0006Ey-F9 for linux-arm-kernel@lists.infradead.org; Mon, 16 Sep 2013 09:18:14 +0000 Received: by mail-ee0-f53.google.com with SMTP id b15so1870711eek.40 for ; Mon, 16 Sep 2013 02:17:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eUQsa2GcKWr+Ih545bhUidZYy7xs4LwniFhYoE0MEQ4=; b=HC0fmX1MP3BDP6M4qABNr+qeix3yaslnPqP2O95sgXsaFo5jr6SL6EyrH17jaLKTlm EmLHzyqbpIoU3RroQywno/gPTn9HK8hKzIvRNK7uSHvx9073URuC4JHLordiRK+9gwYG Jj97FcuP5l33FdbSxPIKx7iPjPGxlYdMkk49ZpuniPISxgKMS3rH9y72pSEm5sem9Oev PVVkr4nOXk3ZUDKyvl5dTOQz/8fbP1mLn/+i+a9kKIwPn8PcGF5wbYoUU8uFXPJXBnZU Lr3QZfRnn6PXeT9Pm6FcRXxNfYNZaJ53gWg+wqAoYwx0MUPcdlc1tVaUcLuFNjNDOnJT cGcg== X-Gm-Message-State: ALoCoQlOSoX6OQQ0jrknT078TgmlbujO1pbg+3+dc/eC6HzgZ2RHuIoLlscpxdW49Zq8F3L1x0iT 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130916_051812_686692_D45E9383 X-CRM114-Status: GOOD ( 10.85 ) X-Spam-Score: -2.6 (--) Cc: Jean Pihet , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }