Received: by 10.223.185.116 with SMTP id b49csp1491997wrg; Sun, 11 Feb 2018 13:25:26 -0800 (PST) X-Google-Smtp-Source: AH8x226errEQgauozsHNWXp/uC9oOCyttRk3wqcUtse4o2s6jIMbOofvq/Pk4yUwH6Z7pHAHh1rv X-Received: by 2002:a17:902:9897:: with SMTP id s23-v6mr8763536plp.238.1518384326672; Sun, 11 Feb 2018 13:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518384326; cv=none; d=google.com; s=arc-20160816; b=i5HbO0+WJSLiNU8BqZ6CCUdR4zDaOq7pUHoxBHRD2Y8C2vsbMqI3NiLcopQpeJaklW TQ1XGJuEhtjKk7f0usprzUyZLK09OmcFFXxnmrq7Hv6KA09KgX0lAu64AYLMvllP/+xA 3J4LE6eLwEsTv/g2bDpXf8CZvcChBndy/8o5mJJPY72rWwxZ/M3C3pUklRBNNfoddUB1 vjCrOuyBpOrHjv8Zx2Tc4xEdJkaIorUnXeScUpwJb7ozx3RrPlxccu1jQGWogJ82OFyC UjiKbRtTa8mq3Uc5KqBIC1vFEDRU9jXgo7LnKI5Rxwj7kQ3yldjSovlmWRcxzYjRu9bj rXiQ== 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=Tw6zwyySeXGgZwTWYgpMatjKOF6Vne+yOy3bDieUZ7g=; b=Cl/392b68U37z5ToTKH4ITIv/1HsYmGlCFca9fbZtFyWzEoJutpr+gj04NqmMeoNdq ZtZNUiI/6ULsYd6d+b10zb3UXXcpvsVyKPpApjEmpTvPJ6TH/gV+DuRuuhD/i5ObIVyM E891Lu6CbdxmuaMLe1eaA47LCKWl2S/1Xh/0mfhZQyAPmiCkKn07ytURwroUhPu69MAg R3vJp8eCNv7/GiTkdnbXk8jf+WMAbf1aSUDWvAEcP/zkIyy4sJJ9nO9yWyd3prP0BQ4d yiLGZJFfbgmjaARP1rD1yZjr1ZCYPuZZexRf4/ERn7niANoGIOcYpjn0e8anX85CbHHV yMoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mx.aim.com header.s=20150623 header.b=B1mmb+fG; 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 c4si1657005pfg.151.2018.02.11.13.25.12; Sun, 11 Feb 2018 13:25:26 -0800 (PST) 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=B1mmb+fG; 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 S1753784AbeBKVY1 (ORCPT + 99 others); Sun, 11 Feb 2018 16:24:27 -0500 Received: from omr-m003e.mx.aol.com ([204.29.186.3]:33962 "EHLO omr-m003e.mx.aol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948AbeBKVY0 (ORCPT ); Sun, 11 Feb 2018 16:24:26 -0500 Received: from mtaout-mbd02.mx.aol.com (mtaout-mbd02.mx.aol.com [172.26.252.14]) by omr-m003e.mx.aol.com (Outbound Mail Relay) with ESMTP id D045B3800089; Sun, 11 Feb 2018 16:24:25 -0500 (EST) 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-mbd02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id EA4E538000092; Sun, 11 Feb 2018 16:24:24 -0500 (EST) From: Martin Vuille To: Arnaldo Carvalho de Melo Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf unwind: Unwind with libdw doesn't take symfs into account Date: Sun, 11 Feb 2018 16:24:20 -0500 Message-Id: <20180211212420.18388-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=1518384265; bh=Tw6zwyySeXGgZwTWYgpMatjKOF6Vne+yOy3bDieUZ7g=; h=From:To:Subject:Message-Id:Date; b=B1mmb+fGtgvZWD5knz27usUbSW1i/1P3SMR53wMP4raqT1lyMur5fT2nMxZZx9gCY CaTA1hFJbrAhhJOVlQs5v5bwvS5xbVfONekHG5ovycn0vbkaT0WYeyQ2ZP6o0DOd98 RuqRtohfmBduqvwyZBTORYeCvXbW55imriU9xjts= x-aol-sid: 3039ac1afc0e5a80b4881071 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 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 --- 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 967323c958fd..7bdd239c795c 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; -- 2.13.6