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 1C9D9C2D0D1 for ; Sun, 29 Dec 2019 18:17:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5CF1206A4 for ; Sun, 29 Dec 2019 18:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577643433; bh=fN7g6WY2amEW3gqUv3QZ5oQptFJW0G0E2Sh8Gs8Zyko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=D+HrsqSrMdYC9plMeAtkOOcMpDjDSGUUQAZGLfnnsputjaBCoKeiR6MgNzwdZMsCI N3RQcj+4Rnv0Y5b84rwTQKDu+ykNveZaC6Xv1gTnNHhY3lOYPlUXsZHfT9src6yKfF sAndCHhBsPc+1Eu+Q5LkMdWh7YneHC8uuFLXshA4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727527AbfL2RX0 (ORCPT ); Sun, 29 Dec 2019 12:23:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:40976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbfL2RXZ (ORCPT ); Sun, 29 Dec 2019 12:23:25 -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 5353720CC7; Sun, 29 Dec 2019 17:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640204; bh=fN7g6WY2amEW3gqUv3QZ5oQptFJW0G0E2Sh8Gs8Zyko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rm3IJXnyFZQ2T9lo0Hht+OKNQ4qisB8jDmt+MdOJZ++RKfKmsDoi7CQk6TrBZT2ab yNc10YVwckbE3ItaIrM7ioJI2UA1jU0vLUR8t8mz2oCy0zYxnVTsGHMuyfXdEYMZFR rwbEG7X65L43ob42XwwgzJBFE6ojcQ8FCsvevGNU= 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 4.14 061/161] perf report: Add warning when libunwind not compiled in Date: Sun, 29 Dec 2019 18:18:29 +0100 Message-Id: <20191229162417.955740376@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162355.500086350@linuxfoundation.org> References: <20191229162355.500086350@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 4ddb0726eebc..fd4dd12b8f9d 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -342,6 +342,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