Received: by 10.223.185.116 with SMTP id b49csp1459318wrg; Sun, 11 Feb 2018 12:33:24 -0800 (PST) X-Google-Smtp-Source: AH8x225bxo3E8QLl2bRLd86WpMOD1l+vY2iHEP9UlJlKqPuKf/oYmralq0K9AHGK3q3H+4gLaBiO X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr8950368pld.17.1518381204601; Sun, 11 Feb 2018 12:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518381204; cv=none; d=google.com; s=arc-20160816; b=Dk0yR90yvnJrIDhC0WAM/NVzGOFqDYgIr4cYAxMwr2g/8KhpfG/NXsAQgBXN+RcEvU NjDspK/JrGBUhU+j02FpTnrk5g+bONnkh2jVVmXIrv41nurE7hRohd/fAbZPz3hYGRkp TvKgeWeO8/BT69HB4PKidBfmR+uVD/WviFO7w2Ga6Lt36uQvbpv6+6SInhZlx/qFndIV 1gQNy/bKcaHNi5pm9X30ufm8kmw55O/OROc1vbRxhepLauG4x+71aaqXsAY2Ct4liWKD xkWnvSWYKFqno+cuILmrVHcmLyZDHdITESxiay5zjxqm1TAtCLk21n5vbPfX9WgoBf8c mirw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=yC4qMOVS7Q7tf/0UqZV7akhRxbO00i1f3ups4lH3eAs=; b=Etze9+t915fhXstDE9JZFNWUaP+RNAIZUzL0RygHMzUdoGpAHHXh4YLpCQ99lJxVab BrK25q9XrkEs4fCMhwUJLKiyHT198J7H8EWSJNzkoNgiDJE4mQhPvfUenHfjKvZr8W5B THicNNVPbICEH516IUZ1GAEwBzU05pNLvkjFsRCtGKGRo7eEB4yTOJtLxOhWGNST24i8 orU1zZZIP1KEq3aUQbWhJUuz5VGwFEzRM8kNw93efd5gzWl198icHNo/ibHTo6N4NkeJ QsTx7wJkaV2SsT0MPDK2P4/zYBggSkjGuyKJ6L5ppvNDwoPMpmN3K2MaqhbbHpg7yaqk csoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mx.aim.com header.s=20150623 header.b=XsLuzr61; 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 b3-v6si4912045pld.148.2018.02.11.12.33.09; Sun, 11 Feb 2018 12:33:24 -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=XsLuzr61; 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 S932184AbeBKUcc (ORCPT + 99 others); Sun, 11 Feb 2018 15:32:32 -0500 Received: from omr-m016e.mx.aol.com ([204.29.186.16]:37059 "EHLO omr-m016e.mx.aol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932160AbeBKUc2 (ORCPT ); Sun, 11 Feb 2018 15:32:28 -0500 Received: from mtaout-mce02.mx.aol.com (mtaout-mce02.mx.aol.com [172.29.27.206]) by omr-m016e.mx.aol.com (Outbound Mail Relay) with ESMTP id 5A06538000BE; Sun, 11 Feb 2018 15:32:27 -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-mce02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 612893800008E; Sun, 11 Feb 2018 15:32:26 -0500 (EST) From: Martin Vuille To: Arnaldo Carvalho de Melo Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/1] perf annotate: Don't prepend symfs path to vmlinux path Date: Sun, 11 Feb 2018 15:32:10 -0500 Message-Id: <20180211203210.12738-2-jpmv27@aim.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180211203210.12738-1-jpmv27@aim.com> References: <20180211203210.12738-1-jpmv27@aim.com> x-aol-global-disposition: G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aim.com; s=20150623; t=1518381147; bh=yC4qMOVS7Q7tf/0UqZV7akhRxbO00i1f3ups4lH3eAs=; h=From:To:Subject:Message-Id:Date; b=XsLuzr61iijXFGZYO6pI0yFQJlu35zzqg1ok5zfQqua7p71LPmapXfVLke0uHxT6C +zIfTPcjb6VUMnQTgivJg8nFCLKv7j0zZ3qWCxeJyYSbGFuCgQIIbgy8uyh9WWWryv VvUHD+3raQ0WGeI1n2KEz7Xho3lQbRRVQjd6ZDEY= x-aol-sid: 3039ac1d1bce5a80a85a6571 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 When selecting the filename to pass to objdump for disassembly, if there is no entry for vmlinux in the build-id cache then the fallback code prepends symfs path to vmlinux path. If the vmlinux option was specified, this is unnecessary and, as a result, vmlinux is not found. Don't prepend symfs path if DSO is [kernel.kallsyms] Signed-off-by: Martin Vuille --- tools/perf/util/annotate.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 425b7f0760ec..0b78cc4fb155 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1412,7 +1412,14 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil * cache, or is just a kallsyms file, well, lets hope that this * DSO is the same as when 'perf record' ran. */ - __symbol__join_symfs(filename, filename_size, dso->long_name); + if (!strstr(dso->short_name, DSO__NAME_KALLSYMS)) + { + __symbol__join_symfs(filename, filename_size, dso->long_name); + } + else + { + scnprintf(filename, filename_size, "%s", dso->long_name); + } } free(build_id_path); -- 2.13.6