Messages in this thread | | | Date | Wed, 27 May 2015 09:50:21 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [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
| |