From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 634B9C2D0CE for ; Sun, 29 Dec 2019 18:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32A05207FD for ; Sun, 29 Dec 2019 18:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642851; bh=oU/WGYFECuodx4Pion/XozfB0+l4f/57ZrurNF6ZRYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qtAPZOoAqKD08lV0M9NJb7SQHtERSQHLtaaEdIbmx3i8qLA6QLN+tna14buY2dRj9 BK3H74Jb+mETdJonZ8I8tqGzhGddMyYSayHS2euKYaJYwvJtHyQuM1oOq3CCrzIACf IFpxELt0lXAr1+FeUbJVLN7bWGofSvlGiip+PaBs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731427AbfL2RsS (ORCPT ); Sun, 29 Dec 2019 12:48:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:59436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731424AbfL2RsR (ORCPT ); Sun, 29 Dec 2019 12:48:17 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4BE27206A4; Sun, 29 Dec 2019 17:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641696; bh=oU/WGYFECuodx4Pion/XozfB0+l4f/57ZrurNF6ZRYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXloYdIAQxyyDR3dwKGhtRah8LLDLphmsaw6gfqftC7foeEU3r1fY0qOeqLlO0eOk 7gFHrpTvWpgAYjSaN9Yi36n7SowdRfToRyJShiiBbbE2QVzVrcJ7M6GjYFbplvaChU ljz1o0sR7LyN885XqhUkJi1Vl+ORBKGjFB4uxSOU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jin Yao , Alexander Shishkin , Andi Kleen , Jiri Olsa , Kan Liang , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 146/434] perf report: Add warning when libunwind not compiled in Date: Sun, 29 Dec 2019 18:23:19 +0100 Message-Id: <20191229172711.446001924@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jin Yao [ Upstream commit 800d3f561659b5436f8c57e7c26dd1f6928b5615 ] We received a user report that call-graph DWARF mode was enabled in 'perf record' but 'perf report' didn't unwind the callstack correctly. The reason was, libunwind was not compiled in. We can use 'perf -vv' to check the compiled libraries but it would be valuable to report a warning to user directly (especially valuable for a perf newbie). The warning is: Warning: Please install libunwind development packages during the perf build. Both TUI and stdio are supported. Signed-off-by: Jin Yao Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191011022122.26369-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-report.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index aae0e57c60fb..7accaf8ef689 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -399,6 +399,13 @@ static int report__setup_sample_type(struct report *rep) PERF_SAMPLE_BRANCH_ANY)) rep->nonany_branch_mode = true; +#ifndef HAVE_LIBUNWIND_SUPPORT + if (dwarf_callchain_users) { + ui__warning("Please install libunwind development packages " + "during the perf build.\n"); + } +#endif + return 0; } -- 2.20.1