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: 20289 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E431D20286 for ; Fri, 13 Sep 2013 17:09:09 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gd11sf1559288vcb.0 for ; Fri, 13 Sep 2013 10:09:08 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mLOIsbwZa/D88rvmwbmKsGVVqHXQyLlRufxAXVgBgsA=; b=KVtJqa7vm6WMYXZWfpu48Q/dbTeYNUSzPg/SC/sgiY131sVh2YCqAA3UvFEY+ibbLv XhgfLyuf0Zt88V8Cup4Q4uxw47qRxRWi1/SkQAveUisO4+2wMd4j1Yz9n0KD1sv0KIl+ 23caAmC8sFDPz7OtqeU4SI8PCQFNxp/rnEeN+dN68e7OOwBI5VyqgxGVm082IeB3V/8F AI2dz/XDl7q2Wyq613BDF8LEPtv1G0v/tPAdlm4N9x+oIY+tNwfFrPpOPpxNPYbu9zUh q+vUGpCUqPhMvfftoa3DzlUL/L60IyWv2jfQ9/xXhfjK1RSs/YeqkrucHhhcnTh3N5cc bcUg== X-Gm-Message-State: ALoCoQmwzcb7leGcEG5lB6N7UmsjwIpv2BzQspti7HeHgB8fB44eeocQUICXGPqv16WHahiWci9p X-Received: by 10.236.19.225 with SMTP id n61mr5359900yhn.8.1379092148065; Fri, 13 Sep 2013 10:09:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.11.179 with SMTP id r19ls1206017qeb.76.gmail; Fri, 13 Sep 2013 10:09:07 -0700 (PDT) X-Received: by 10.52.107.134 with SMTP id hc6mr10468433vdb.10.1379092147813; Fri, 13 Sep 2013 10:09:07 -0700 (PDT) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id m10si3413329veh.82.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 10:09:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id x16so1132253vbf.38 for ; Fri, 13 Sep 2013 10:09:07 -0700 (PDT) X-Received: by 10.220.244.132 with SMTP id lq4mr1182636vcb.31.1379092147703; Fri, 13 Sep 2013 10:09:07 -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 u4csp91255vcz; Fri, 13 Sep 2013 10:09:07 -0700 (PDT) X-Received: by 10.14.184.132 with SMTP id s4mr19797964eem.13.1379092146285; Fri, 13 Sep 2013 10:09:06 -0700 (PDT) Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by mx.google.com with ESMTPS id u46si4657014eeg.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 10:09:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.177 is neither permitted nor denied by best guess record for domain of jean.pihet@linaro.org) client-ip=209.85.215.177; Received: by mail-ea0-f177.google.com with SMTP id f15so698634eak.8 for ; Fri, 13 Sep 2013 10:09:05 -0700 (PDT) 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 Cc: patches@linaro.org, Jean Pihet 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-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.212.51 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/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; }