From patchwork Fri Sep 13 17:08:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 2891381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC6BD9F1C0 for ; Fri, 13 Sep 2013 17:09:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E682202C3 for ; Fri, 13 Sep 2013 17:09:37 +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 63110202C0 for ; Fri, 13 Sep 2013 17:09:36 +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 1VKWsA-0007CT-4i; Fri, 13 Sep 2013 17:09:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKWs8-0001rU-2f; Fri, 13 Sep 2013 17:09:32 +0000 Received: from mail-ea0-f169.google.com ([209.85.215.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKWs5-0001qO-Ab for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 17:09:30 +0000 Received: by mail-ea0-f169.google.com with SMTP id k11so717988eaj.14 for ; Fri, 13 Sep 2013 10:09:05 -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; bh=mLOIsbwZa/D88rvmwbmKsGVVqHXQyLlRufxAXVgBgsA=; b=CuRbgEBnV8M9hpZ6ul1qeU1Z0HxmEtOctcAWys+BWmtVpCj0ekJRaeWz/bQy+OJFkO qT+ZAUPiyymEFTZgDVUdC+xM1JhjNCKHX8YaT86mg7oDxIbUozl/VQlOqr9HPY3Uavfz Z9gf0VvRNFoYRYG4hrr0N/18bME4qz6XZKouc6+XedaRwxk9OWo5t8+aouyXFAFQazHe 2YhitsSLThTHZCYd7dJsn5egSoyZBpbBXqXHGeZbtFmzwNRfq6TU9k5HDJ3dKibHwc6P 8ysyeqjm9/fBufj/66imr1WItF12Qc7mZa3ILQsiG51jCLJY/5WL3A0o5IqhhM4TnLY8 2+uA== X-Gm-Message-State: ALoCoQl+eABSHlr1Wdi1xoDEm8vCxSHtRodT5cfEwzH4F1gDqoqJXVYVlIZir71jY4/qpzxgkIHk X-Received: by 10.14.208.194 with SMTP id q42mr19539576eeo.31.1379092145513; Fri, 13 Sep 2013 10:09:05 -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 z12sm16599686eev.6.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 10:09:04 -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] perf tools: Check libunwind for availability of dwarf parsing feature Date: Fri, 13 Sep 2013 19:08:41 +0200 Message-Id: <1379092121-5981-1-git-send-email-jean.pihet@linaro.org> X-Mailer: git-send-email 1.7.11.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_130929_527842_E7B6816A X-CRM114-Status: UNSURE ( 8.19 ) X-CRM114-Notice: Please train this message. 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=-5.1 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/feature-tests.mak | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; }