linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Richard Weinberger <richard@nod.at>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	namhyung@kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH perf/core 1/2] [RESEND] perf probe: Show the error reason comes from invalid DSO
Date: Thu, 28 May 2015 08:42:37 +0900	[thread overview]
Message-ID: <5566566D.7030505@hitachi.com> (raw)
In-Reply-To: <20150527125021.GR17970@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

  reply	other threads:[~2015-05-27 23:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  8:37 [PATCH perf/core 1/2] [RESEND] perf probe: Show the error reason comes from invalid DSO Masami Hiramatsu
2015-05-27  8:37 ` [PATCH perf/core 2/2] [BUGFIX] perf probe: Fix an error when deleting probes successfully Masami Hiramatsu
2015-05-27 16:52   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-05-27 12:50 ` [PATCH perf/core 1/2] [RESEND] perf probe: Show the error reason comes from invalid DSO Arnaldo Carvalho de Melo
2015-05-27 23:42   ` Masami Hiramatsu [this message]
2015-05-27 16:52 ` [tip:perf/core] " tip-bot for Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5566566D.7030505@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).