public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
	David Ahern <dsahern@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: perf probe: request: Better message when no debug info is found on vmlinux
Date: Fri, 15 Aug 2014 02:54:49 +0900	[thread overview]
Message-ID: <53ECF7E9.3050200@hitachi.com> (raw)
In-Reply-To: <20140814153312.GO2718@kernel.org>

(2014/08/15 0:33), Arnaldo Carvalho de Melo wrote:
> Hi Masami,
> 
> 	I was trying to figure out why sys_perf_event_open was returning
> EACCES when trying to record, as a non priviledged user, a 'ping'
> process started by this user, while it has no problem doing the same
> thing if the monitored process is 'sleep' (reusing of ptrace perms seems
> to be what is causing this, but I digress), when I stumbled in something
> annoying:
> 
>   [root@ssdandy ~]# perf probe -v -L icmp_rcv
>   Looking at the vmlinux_path (6 entries long)
>   Using /lib/modules/3.16.0+/build/vmlinux for symbols
>   Failed to open debuginfo file.
>     Error: Failed to show lines. (-2)
>   [root@ssdandy ~]# 
> 
> Huh? Why? So I went to look to see why it was "failing to open debuginfo
> file":
> 
>   [root@ssdandy ~]# ls -la /lib/modules/3.16.0+/build/vmlinux
>   -rwxrwxr-x. 3 acme acme 22505817 Aug 13 11:54
>   /lib/modules/3.16.0+/build/vmlinux
>   [root@ssdandy ~]# ls -la /lib/modules/3.16.0+/build
>   lrwxrwxrwx. 1 root root 29 Aug 13 12:10 /lib/modules/3.16.0+/build ->
>   /home/acme/git/build/v3.16.0+
> 
> The file is there, but... I forgot I had disabled CONFIG_DEBUG_INFO on
> this machine:
> 
>   [root@ssdandy ~]# ls -la /lib/modules/3.16.0+/build/.config
>   -rw-rw-r--. 1 acme acme 136217 Aug 13 11:40
>   /lib/modules/3.16.0+/build/.config
>   [root@ssdandy ~]# grep CONFIG_DEBUG_INFO
>   /lib/modules/3.16.0+/build/.config
>   # CONFIG_DEBUG_INFO is not set
>   [root@ssdandy ~]# 
> 
> So, only the CFI ELF section was there, not the other with the -g stuff:
> 
>   [root@ssdandy ~]# readelf -SW /lib/modules/3.16.0+/build/vmlinux | grep \.debug_
>     [29] .debug_frame  PROGBITS  0000000000000000 1266030 0021d0 00  0   0  8
>   [root@ssdandy ~]#
> 
> So, I suggest that we improve that error message to be more clear:
> 
>   [root@ssdandy ~]# perf probe -L icmp_rcv
>   Failed to open debuginfo file.
>     Error: The /lib/modules/3.16.0+/build/vmlinux file has no
>            debugging information, rebuild with CONFIG_DEBUG_INFO=y
> 
>   [root@ssdandy ~]# 
> 
> Since it knows it is a kernel image file, and that the config option to
> enable it is CONFIG_DEBUG_INFO.

OK, it seems better for me too.
It will be a bit different message, but I'm sure to mention
that config option for users.

Thank you!

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



  reply	other threads:[~2014-08-14 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 15:33 perf probe: request: Better message when no debug info is found on vmlinux Arnaldo Carvalho de Melo
2014-08-14 17:54 ` Masami Hiramatsu [this message]
2014-08-14 18:29   ` [PATCH] perf probe: Warn user to rebuild target with debuginfo Masami Hiramatsu
2014-08-14 18:55     ` Arnaldo Carvalho de Melo
2014-08-14 20:07     ` Brendan Gregg
2014-08-15  1:07       ` Arnaldo Carvalho de Melo
2014-08-15  1:29         ` Masami Hiramatsu
2014-08-15  1:44           ` Masami Hiramatsu
2014-08-15  1:51             ` Masami Hiramatsu
2014-08-15  3:39               ` Brendan Gregg
2014-08-15 13:34                 ` Arnaldo Carvalho de Melo
2014-08-18  8:21             ` [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=53ECF7E9.3050200@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=namhyung@gmail.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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