Received: by 10.213.65.68 with SMTP id h4csp1011626imn; Sun, 18 Mar 2018 10:52:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELtWrg/nQFV5vGi1BEDRDmWX/JsB0h2WED+Lr4NMMhTgd8uUajSRpNjuzD2+4LeCKPkfCfL2 X-Received: by 2002:a17:902:6ac1:: with SMTP id i1-v6mr6701468plt.152.1521395560276; Sun, 18 Mar 2018 10:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521395560; cv=none; d=google.com; s=arc-20160816; b=EsQsygMO+V99RHCEiGO0ULlHtaOtiz4Fdxj+vFJ4vyATnFc5UJb9FYQw0VKOwm1r9W FNsDo+mtOQdtGwMgCYO6oAj0+uAQLRcL0InyeJUeONE9lEQX4/hkvYzppF3D0+UXHqpq KkmQBbC/ugQ/1BUKvdO6kFacVtPU+9kU7m9UIzwBZ2uH8eQjFg3/QeeLvN+mfL7bRijs 9DEyC+kXi2bq8vx3mSKxQM5ZVagqbGxoDPe+c7bB0SA8UrwdZ9JhSB9wLz1NFjVkv4Ar v/FbpaYLYrDRbltA0AklutFdU8e44p9WhFe/X0lQycjysg0TyXjBGBz0ufimRYhsmIn1 FQCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:message-id:date:subject:cc :to:from:arc-authentication-results; bh=9ZHXtySJjidC99PimOkI8CNkAvqUZjlQzixEfYt/ycA=; b=hovl/6onG3BN3/96mfXRKCUJbNPenZ9h6+huts8L5HaLIU6RUpnxamEXKsaxnYqLLZ VYN2ktf6b9wsuYptDJNYKcJnvQMvhMLOwRit5FQ68DCmBfZw2aDzXlMYz6hk5teGEv9u 7qBCHTvl+KxEMb+W3oSrJc8hJKNMaLQiUNswsNA7vJLTm/CTq+RemisGEEOzzF/I8pw3 x2/UtTQ53IKZXLbfcQg9CGXEkxvV60DBi9tsKEWKZV7Uo4XQqmfhbyrUtmNqwLbIkF8l f75x1/9YnakV2F7+KC0F2EM5BzsdLMzUNDVm1sSLSiIPovpNI300ed0MmG7Ggdv3OtaU ciqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mx.aim.com header.s=20150623 header.b=A+1QEx7b; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aim.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si6315335pgc.296.2018.03.18.10.52.25; Sun, 18 Mar 2018 10:52:40 -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; dkim=pass header.i=@mx.aim.com header.s=20150623 header.b=A+1QEx7b; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aim.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754361AbeCRRvI (ORCPT + 99 others); Sun, 18 Mar 2018 13:51:08 -0400 Received: from omr-a018e.mx.aol.com ([204.29.186.64]:33060 "EHLO omr-a018e.mx.aol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754140AbeCRRvH (ORCPT ); Sun, 18 Mar 2018 13:51:07 -0400 Received: from mtaout-aaa02.mx.aol.com (mtaout-aaa02.mx.aol.com [172.27.1.226]) by omr-a018e.mx.aol.com (Outbound Mail Relay) with ESMTP id 991C6380009B; Sun, 18 Mar 2018 13:51:06 -0400 (EDT) Received: from thor.int.jpmvrealtime.com (CPE000db93f888c-CM001404556d28.cpe.net.cable.rogers.com [99.246.128.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mtaout-aaa02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 8E90038000081; Sun, 18 Mar 2018 13:51:05 -0400 (EDT) From: Martin Vuille To: Arnaldo Carvalho de Melo Cc: Martin Vuille , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] perf unwind: Report error from dwfl_attach_state Date: Sun, 18 Mar 2018 13:50:53 -0400 Message-Id: <20180318175053.4222-1-jpmv27@aim.com> X-Mailer: git-send-email 2.13.6 x-aol-global-disposition: G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aim.com; s=20150623; t=1521395466; bh=9ZHXtySJjidC99PimOkI8CNkAvqUZjlQzixEfYt/ycA=; h=From:To:Subject:Message-Id:Date; b=A+1QEx7buttbV46WCtHNXenyDKAaGTfCZOnz27uQ1zGZXpvWgYJt9r7bH5NUos3mt 6JgjMcIQgXCHxBNLmvUcMbQ84lcd6PYFFPrdZOubAsFHCugr17o7hhmlHB36s0ljjc LGjP3TUTnXCDBx2pnbIyVji6gvjfPaENbR12ANzk= x-aol-sid: 3039ac1b01e25aaea70908dc X-AOL-IP: 99.246.128.134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.13.6