Received: by 10.213.65.68 with SMTP id h4csp835018imn; Sun, 25 Mar 2018 15:08:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELt2qoSO+hNUceV82EsGWuF2Z8FmBExH7O0P3oEGgP2yvGswTfWKUrkCQKadSEgbckUUqARU X-Received: by 10.98.198.92 with SMTP id m89mr31179210pfg.73.1522015732828; Sun, 25 Mar 2018 15:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522015732; cv=none; d=google.com; s=arc-20160816; b=yuDgiv8Y6qUE+kWjqkdWakTF/vb4fDWPM9UGZTGB41kboyZ+hTt4xcVdKH5sKsb7BA lElE5jv19nCN3NDlruxSh2sOXC+PwcwAZdEfRCJbnerzzo4c0IUT3nXh66JVLDsC9mPm cB72OvZsBfyYkTq0uPV3zLzulu+eD+5ktCZASAMJgSXFGgw3bO4J/fFwfdgHZcSpwYZt HrV/mWZ1TcesqGqrAymD5ODmm+QTcNHE1k0S4j1o2CwAVsIEhZL9YDGqlEVwwRXO2IcQ 4HwfHQtkCxJ6bi2uFPKIM7shs0c0fPiqEldcNIuDEK4cBUQfozzdUTxILnzOSRTVp2iM hByA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=icGy28T5cfLdFt/QAB5GHoLy5osF2mlM0r//pjHWY+s=; b=YaAXsebkwdemCbHOULrPKlep3h/GFC7RGIaYcEioN/2/mRVIQ4G64aNARjPZ8P5cys hTxUNnXZsLy1+iwVvrcm3fepvmTdLdtEmrnIMspj7AFEizd9KrT8VmNDJaVCqcxUHGmg 8kI18VvF9lMxe5MhLO3JRFig9MLbHN6Pt+wUK+R7bTLPlIA6czHnHf2VuFURM/XB1kSG wqoCU7pkSj1aNKeUF7nlrP0Cf/tf8mJqyPj4bdhPt/VDUb5Dvggg4PWY5dAgQoheELf1 5rmtsIGIOAtpWe3h1VgQY5Vd6aljCiw6ViVJ3ZpmZrkGgfjYO586sj6LLsSszd451wBK El4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7-v6si13252761plr.293.2018.03.25.15.08.37; Sun, 25 Mar 2018 15:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752282AbeCYWHo (ORCPT + 99 others); Sun, 25 Mar 2018 18:07:44 -0400 Received: from terminus.zytor.com ([198.137.202.136]:34387 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752112AbeCYWHm (ORCPT ); Sun, 25 Mar 2018 18:07:42 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2PM7S9A004197; Sun, 25 Mar 2018 15:07:28 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2PM7RZH004194; Sun, 25 Mar 2018 15:07:27 -0700 Date: Sun, 25 Mar 2018 15:07:27 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Martin Vuille Message-ID: Cc: mingo@kernel.org, jpmv27@aim.com, linux-kernel@vger.kernel.org, hpa@zytor.com, kim.phillips@arm.com, tglx@linutronix.de, acme@redhat.com Reply-To: jpmv27@aim.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, acme@redhat.com, kim.phillips@arm.com In-Reply-To: <20180318175053.4222-1-jpmv27@aim.com> References: <20180318175053.4222-1-jpmv27@aim.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf unwind: Report error from dwfl_attach_state Git-Commit-ID: 555fc3b1ef4c850c635be333024dcf67bc1e7cb8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.6 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO,FREEMAIL_REPLYTO_END_DIGIT autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 555fc3b1ef4c850c635be333024dcf67bc1e7cb8 Gitweb: https://git.kernel.org/tip/555fc3b1ef4c850c635be333024dcf67bc1e7cb8 Author: Martin Vuille AuthorDate: Sun, 18 Mar 2018 13:50:53 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 20 Mar 2018 13:16:09 -0300 perf unwind: Report error from dwfl_attach_state In verbose level 2, errors returned by libdw are reported in most cases, but not when calling dwfl_attach_state. Since elfutils v 0.160 (2014), dwfl_attach_state sets the error code to report failure cause. On failure, log the reported error. Signed-off-by: Martin Vuille Reviewed-by: Kim Phillips Link: http://lkml.kernel.org/r/20180318175053.4222-1-jpmv27@aim.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/unwind-libdw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c index 8e969f28cc59..7bdd239c795c 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -236,7 +236,8 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg, if (err) goto out; - if (!dwfl_attach_state(ui->dwfl, EM_NONE, thread->tid, &callbacks, ui)) + err = !dwfl_attach_state(ui->dwfl, EM_NONE, thread->tid, &callbacks, ui); + if (err) goto out; err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui);