lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH perf/core 1/2] [RESEND] perf probe: Show the error reason comes from invalid DSO
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


\
 
 \ /
  Last update: 2015-05-27 15:21    [W:0.121 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site