From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbbE0Mu1 (ORCPT ); Wed, 27 May 2015 08:50:27 -0400 Received: from mail.kernel.org ([198.145.29.136]:40905 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752475AbbE0Mu0 (ORCPT ); Wed, 27 May 2015 08:50:26 -0400 Date: Wed, 27 May 2015 09:50:21 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Peter Zijlstra , Richard Weinberger , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Subject: Re: [PATCH perf/core 1/2] [RESEND] perf probe: Show the error reason comes from invalid DSO Message-ID: <20150527125021.GR17970@kernel.org> References: <20150527083718.23880.84100.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150527083718.23880.84100.stgit@localhost.localdomain> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, May 27, 2015 at 05:37:18PM +0900, Masami Hiramatsu escreveu: > Show the reason of error when dso__load* failed. This shows > when user gives wrong kernel image or wrong path. > Without this, perf probe shows an obscure message. > ---- > $ perf probe -k ~/kbin/linux-3.x86_64/vmlinux -L vfs_read > Failed to find path of kernel module. > Error: Failed to show lines. > ---- > With this, perf shows appropriate error message. > ---- > $ perf probe -k ~/kbin/linux-3.x86_64/vmlinux -L vfs_read > Failed to find the path for kernel: Mismatching build id > Error: Failed to show lines. > ---- > And > ---- > $ perf probe -k /non-exist/kernel/vmlinux -L vfs_read > Failed to find the path for kernel: No such file or directory > Error: Failed to show lines. > ---- Its better than before, and I am applying it. But please consider to change the message further, because when one specifies the vmlinux file to use with -k/--vmlinux, the tool is not trying to "find the path for kernel", it is trying to use a specific vmlinux file. I.e. the messages above are good if we do: perf probe -L vfs_read Here it _will_ try to find the path, as none was given. So, when -k/--vmlinux is used, I suggest that the message be: $ perf probe -k ~/kbin/linux-3.x86_64/vmlinux -L vfs_read The kernel file "~/kbin/linux-3.x86_64/vmlinux" could not be used: Mismatching build id Error: Failed to show lines. And: $ perf probe -k /non-exist/kernel/vmlinux -L vfs_read The kernel file "/non-exist/kernel/vmlinux" could not be used: No such file or directory Error: Failed to show lines. Thanks! - Arnaldo