From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752442AbbE0Xmv (ORCPT ); Wed, 27 May 2015 19:42:51 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:58541 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbbE0Xmq (ORCPT ); Wed, 27 May 2015 19:42:46 -0400 Message-ID: <5566566D.7030505@hitachi.com> Date: Thu, 28 May 2015 08:42:37 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo 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 References: <20150527083718.23880.84100.stgit@localhost.localdomain> <20150527125021.GR17970@kernel.org> In-Reply-To: <20150527125021.GR17970@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/05/27 21:50, Arnaldo Carvalho de Melo wrote: > 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. Indeed! This looks better for me. Thank you! -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com