Received: by 10.213.65.68 with SMTP id h4csp159798imn; Mon, 19 Mar 2018 23:29:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELvV8e1Z+7Sdo9ZU0NZkpA5wpuSVjLumLxE30WmRz4RGQAUV/DbfdEOW6V6ecHp0vxTnVxBz X-Received: by 10.101.91.199 with SMTP id o7mr11442537pgr.9.1521527380115; Mon, 19 Mar 2018 23:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521527380; cv=none; d=google.com; s=arc-20160816; b=rmKb9rmI/FmOh5CoMgCYvvUNtcHgiuPiU8Et5HNEXp2G5R29+37RbMPk1C+696ybTN dxX8JsTz0MoYB3DNfdW7v9bO9r+KR80klO6Z2w2Yfcaj0cKR3mfAl4Q+IoZIn2uwrE0y Jz9jqcVuq3vPNW/zpVeSUbH+S9n2RgPH1iZJqKeJtHH/if6G8NjkCDUpK9jZlJ2M/LNP 1lpDzWMyvOSWqy4PgNasDNEy1Y1CW9mTr1jy6ydstcwZww1s+uArcpsTJe4YkiT/WhbT UYTrMtz8EHRc7DXDs8sOHv6KwL2CBLzDJ17Cmh7/9IAHWazzCSISMTaQLuEEh/Q2rMV5 Rqwg== 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=LNzpm+SiSLcdhIPhll2AZ0IoiNVm3AUSSqYBUnY+WhE=; b=YJR1rrAwQ/8uBhUP8tZ8Y9FzhNoUsLbQXcvHRankHEQrOOaoVG3SXL4ONeENoB7bUM GBxGdeLxH9TmXzclO5HoJqEkLla6gpvnucO+tVm+dGlzwsRf037uCsGocSPRkkCZtdnO usuNa76C5DKxnxKgljT3gChfu/pBO7HC6WWDko/cN/68yMprxDzFb1P2wpWJx5MDU4yu 5ESiyG9tIVSDcasQwAjQnxnumHZjDPDeXSX4wVWI/2ake+hVYc4BisUHrN1YN8coso9/ fLk7YOBzemfK2TuGzx5yCGNEY0ZZaanjp2W3PXNPShoC647pV4FhUM3Noz3lYg7Rwb34 8P+g== 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 g5si736877pgo.211.2018.03.19.23.29.26; Mon, 19 Mar 2018 23:29: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; 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 S1752151AbeCTG2Y (ORCPT + 99 others); Tue, 20 Mar 2018 02:28:24 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43087 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbeCTG2U (ORCPT ); Tue, 20 Mar 2018 02:28:20 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2K6S52H030976; Mon, 19 Mar 2018 23:28:05 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2K6S5gW030973; Mon, 19 Mar 2018 23:28:05 -0700 Date: Mon, 19 Mar 2018 23:28:05 -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: namhyung@kernel.org, adrian.hunter@intel.com, jpmv27@aim.com, linux-kernel@vger.kernel.org, acme@redhat.com, jolsa@kernel.org, wangnan0@huawei.com, tglx@linutronix.de, dsahern@gmail.com, hpa@zytor.com, mingo@kernel.org Reply-To: tglx@linutronix.de, jolsa@kernel.org, wangnan0@huawei.com, dsahern@gmail.com, hpa@zytor.com, mingo@kernel.org, namhyung@kernel.org, jpmv27@aim.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, acme@redhat.com In-Reply-To: <20180211212420.18388-1-jpmv27@aim.com> References: <20180211212420.18388-1-jpmv27@aim.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf unwind: Unwind with libdw doesn't take symfs into account Git-Commit-ID: 3d20c6246690219881786de10d2dda93f616d0ac 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=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham 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: 3d20c6246690219881786de10d2dda93f616d0ac Gitweb: https://git.kernel.org/tip/3d20c6246690219881786de10d2dda93f616d0ac Author: Martin Vuille AuthorDate: Sun, 11 Feb 2018 16:24:20 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Mar 2018 13:55:51 -0300 perf unwind: Unwind with libdw doesn't take symfs into account 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 --- 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 1e9c974faf67..8e969f28cc59 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -50,7 +50,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;