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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 CE27FC169C4 for ; Tue, 29 Jan 2019 11:52:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D09620882 for ; Tue, 29 Jan 2019 11:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548762729; bh=XM6UhFt1ViQEe8x++zj0IkKDZfWwJuWbOaNgdN1rCvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FdQNO+QGROUZ/2YGa7EYfrR7eF8GvS4/Aq4yzHx33Fc9NloQf4BGJcoyp+YOHxcFe Jq/A0RHxEzf8+SlOnJ1WaYuTxMnHw4tnm22oqrw1+FtMH5GC5vakteC9dUI7+v2PXq GeQe2Z2b+bHJKWKCJRHBfJ5HYiHDcjFSjYI/1C7o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732028AbfA2LwH (ORCPT ); Tue, 29 Jan 2019 06:52:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:43744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732014AbfA2LwE (ORCPT ); Tue, 29 Jan 2019 06:52:04 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 6D0E42083B; Tue, 29 Jan 2019 11:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548762723; bh=XM6UhFt1ViQEe8x++zj0IkKDZfWwJuWbOaNgdN1rCvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eZy9Te1XMRdlmyN04mr4hJpVu3CFipTub9SiEcs7fOROF5Q7mmNfb6i7pxwmT2deg kDkk8gpowlQobh5exTqhw6vlQt5Abbau7Qep2Ym/8ZBBPcRETO5ENTcY5Yl8tD39rB t+U0Wv+2bofpTFYurYmcbx03XfwewHa+0Ozr57CA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Vuille , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.9 36/44] perf unwind: Unwind with libdw doesnt take symfs into account Date: Tue, 29 Jan 2019 12:36:31 +0100 Message-Id: <20190129113142.838754010@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129113139.826927690@linuxfoundation.org> References: <20190129113139.826927690@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 3d20c6246690219881786de10d2dda93f616d0ac ] Path passed to libdw for unwinding doesn't include symfs path if specified, so unwinding fails because ELF file is not found. Similar to unwinding with libunwind, pass symsrc_filename instead of long_name. If there is no symsrc_filename, fallback to long_name. Signed-off-by: Martin Vuille Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20180211212420.18388-1-jpmv27@aim.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/unwind-libdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c index b46e1cf347e5..b34085ae3e32 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -48,7 +48,7 @@ static int __report_module(struct addr_location *al, u64 ip, if (!mod) mod = dwfl_report_elf(ui->dwfl, dso->short_name, - dso->long_name, -1, al->map->start, + (dso->symsrc_filename ? dso->symsrc_filename : dso->long_name), -1, al->map->start, false); return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1; -- 2.19.1