From patchwork Thu Sep 26 11:36:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 20596 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 9681D23A4E for ; Thu, 26 Sep 2013 11:37:32 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf807870yen.2 for ; Thu, 26 Sep 2013 04:37:32 -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=+W+h2pvncuCCiwK/OYEkjZrb+mX6f24GmBN6/pyU+QU=; b=gKOEMpfnhmYKFxfDFb6u7KPmezHhodG5gx6yrVcSza4EIEDPa/sM++8tqe4v3ngByN GY/l2BF49uX77DbC10beiRMnKwcRe+GQfgokIyQzznIFGouHDxGknFt1Kn+jn637rwPj km3cKUXiNT0JniSfbTH3cYUS+CUKAnN9rGDXxi3oE5N+Cj5RxhJHB3mtJVPWyu3CeQL5 aR6j3YJRvcPvhcHt2IlYtk03136qqxCjUxu1KtT/PShEwHtfhXedfqtzo64lsYCtviWM 1NNGFBOE4me6Y5GGs/J5yoqc4Bf9zVvMuc8zuIc2CV9PCtwQe920FrOQaZwG+hWgBny0 1gLw== X-Gm-Message-State: ALoCoQls6FuqVK6lxRi5MIiQq3Sh+ij+dZkZsDPfiJe4Q2LlP+J4kpcr36o2UW+2hQOaWvz/8csp X-Received: by 10.236.142.38 with SMTP id h26mr55298yhj.57.1380195452425; Thu, 26 Sep 2013 04:37:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.194 with SMTP id b2ls838731qer.88.gmail; Thu, 26 Sep 2013 04:37:32 -0700 (PDT) X-Received: by 10.58.134.16 with SMTP id pg16mr192406veb.21.1380195452318; Thu, 26 Sep 2013 04:37:32 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id wh9si285215vcb.18.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 04:37:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.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.220.181; Received: by mail-vc0-f181.google.com with SMTP id hz10so734288vcb.12 for ; Thu, 26 Sep 2013 04:37:02 -0700 (PDT) X-Received: by 10.58.50.97 with SMTP id b1mr227649veo.32.1380195422153; Thu, 26 Sep 2013 04:37:02 -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 u4csp360787vcz; Thu, 26 Sep 2013 04:37:01 -0700 (PDT) X-Received: by 10.15.48.197 with SMTP id h45mr679285eew.0.1380195421089; Thu, 26 Sep 2013 04:37:01 -0700 (PDT) Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by mx.google.com with ESMTPS id x42si1075821eel.176.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 04:37:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.179 is neither permitted nor denied by best guess record for domain of jean.pihet@linaro.org) client-ip=209.85.215.179; Received: by mail-ea0-f179.google.com with SMTP id b10so482221eae.10 for ; Thu, 26 Sep 2013 04:37:00 -0700 (PDT) X-Received: by 10.15.43.206 with SMTP id x54mr501943eev.79.1380195420242; Thu, 26 Sep 2013 04:37:00 -0700 (PDT) Received: from localhost.localdomain (221.61-241-81.adsl-dyn.isp.belgacom.be. [81.241.61.221]) by mx.google.com with ESMTPSA id f49sm2945588eec.7.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Sep 2013 04:36:59 -0700 (PDT) From: Jean Pihet To: Will Deacon , Jiri Olsa , linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Jean Pihet Subject: [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature Date: Thu, 26 Sep 2013 13:36:37 +0200 Message-Id: <1380195398-4402-4-git-send-email-jean.pihet@linaro.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1380195398-4402-1-git-send-email-jean.pihet@linaro.org> References: <1380195398-4402-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.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: , 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 tests in the feature check list. Signed-off-by: Jean Pihet Acked-by: Jiri Olsa --- tools/perf/config/Makefile | 6 +++++- tools/perf/config/feature-tests.mak | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 4b65710..bbaeb04 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -223,9 +223,13 @@ 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 +ifneq ($(call try-cc,$(SOURCE_LIBUNWIND_DEBUG_FRAME),$(FLAGS_UNWIND),libunwind debug_frame),y) + msg := $(warning No debug_frame support found in libunwind); +CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME +endif # debug_frame support in libunwind endif # NO_LIBUNWIND ifndef NO_LIBUNWIND diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak index 708fb8e..cde75f5 100644 --- a/tools/perf/config/feature-tests.mak +++ b/tools/perf/config/feature-tests.mak @@ -176,7 +176,6 @@ 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) int main(void) @@ -188,6 +187,26 @@ int main(void) return 0; } endef + +define SOURCE_LIBUNWIND_DEBUG_FRAME +#include +#include + +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) +{ + dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0); + return 0; +} +endef + endif ifndef NO_BACKTRACE