linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 0/2] perf-probe: Improve warning message for buildid mismatch
Date: Fri, 29 Dec 2017 11:52:48 +0900	[thread overview]
Message-ID: <20171229115248.51bec125a52f84df690f650c@kernel.org> (raw)
In-Reply-To: <151358211494.25261.16134489192749792799.stgit@devbox>

Hello Arnaldo,

Could you review it?

Thank you,

On Mon, 18 Dec 2017 16:28:35 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Hello,
> 
> This series ensure the build-ids for target binary and debuginfo
> are matched. If there is a mismatch, it warns user to check the
> package versions.
> 
> To reproduce the problematic environment (on Fedora26),
> I did following operations;
> 
>   =====
>   # rpm -q glibc glibc-debuginfo
>   glibc-2.25-12.fc26.x86_64
>   package glibc-debuginfo is not installed
> 
>   # dnf debuginfo-install glibc
>   [...]
>   Installed:
>     glibc-debuginfo.x86_64 2.25-12.fc26
>     glibc-debuginfo-common.x86_64 2.25-12.fc26
> 
>   Complete!
> 
>   # dnf downgrade glibc        
>   [...]
>   Downgraded:
>     glibc.x86_64 2.25-6.fc26                 glibc-common.x86_64 2.25-6.fc26   
>     glibc-devel.x86_64 2.25-6.fc26           glibc-headers.x86_64 2.25-6.fc26  
>     glibc-langpack-en.x86_64 2.25-6.fc26     libcrypt-nss.x86_64 2.25-6.fc26   
> 
>   Complete!
> 
>   # rpm -q glibc glibc-debuginfo
>   glibc-2.25-6.fc26.x86_64
>   glibc-debuginfo-2.25-12.fc26.x86_64
>   =====
> 
> OK, so you can see now we have different versions of glibc and
> glibc-debuginfo. Each debuginfo must be different.
> 
> With this series, defining new events also warns :)
> 
>   =====
>   # perf probe -x /usr/lib64/libc-2.25.so -a malloc_get_state\\@GLIBC_2.2.5
>   WARN: There is a build-id mismatch between
>    /usr/lib/debug/usr/lib64/libc-2.25.so.debug
>    and
>    /usr/lib64/libc-2.25.so
>   Please check your system's debuginfo files for mismatches, e.g. check the versions for the target package and debuginfo package.
>   Added new event:
>     probe_libc:malloc_get_state (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so)
> 
>   You can now use it in all perf tools, such as:
> 
> 	  perf record -e probe_libc:malloc_get_state -aR sleep 1
> 
>   =====
> 
> And listing up events warns.
> 
>   =====
>   # perf probe -l | more
>   WARN: There is a build-id mismatch between
>    /usr/lib/debug/usr/lib64/libc-2.25.so.debug
>    and
>    /usr/lib64/libc-2.25.so
>   Please check your system's debuginfo files for mismatches, e.g. check the versions for the target package and debuginfo package.
>     probe_libc:malloc_get_state (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so)
>   =====
> 
> With [1/2], this warning messages repeated on same target (glibc). To suppress
> this, [2/2] introduces no-debuginfo blacklist to skip it 2nd time as below.
> 
>   =====
>   # perf probe -l | more
>   WARN: There is a build-id mismatch between
>    /usr/lib/debug/usr/lib64/libc-2.25.so.debug
>    and
>    /usr/lib64/libc-2.25.so
>   Please check your system's debuginfo files for mismatches, e.g. check the versions for the target package and debuginfo package.
>     probe_libc:malloc_get_state (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so)
>     probe_libc:malloc_get_state_1 (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so)
>     probe_libc:malloc_get_state_2 (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so)
>   =====
> 
> Arnaldo, would this match to your request?
> 
> 
> Thank you,
> ---
> 
> Masami Hiramatsu (2):
>       perf-probe: Ensure debuginfo's build-id is correct
>       perf-probe: Skip searching debuginfo if we know no debuginfo
> 
> 
>  tools/perf/util/probe-finder.c |   34 +++++++++++++++++++++++++++++++++-
>  1 file changed, 33 insertions(+), 1 deletion(-)
> 
> --
> Masami Hiramatsu (Linaro Ltd.) <mhiramat@kernel.org>


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  parent reply	other threads:[~2017-12-29  2:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18  7:28 [PATCH 0/2] perf-probe: Improve warning message for buildid mismatch Masami Hiramatsu
2017-12-18  7:29 ` [PATCH 1/2] perf-probe: Ensure debuginfo's build-id is correct Masami Hiramatsu
2018-01-04 16:17   ` Arnaldo Carvalho de Melo
2018-01-06 14:11     ` Masami Hiramatsu
2018-01-11 12:31     ` Masami Hiramatsu
2018-01-11 14:59       ` Arnaldo Carvalho de Melo
2018-01-11 15:06         ` Arnaldo Carvalho de Melo
2018-01-11 16:21           ` Masami Hiramatsu
2017-12-18  7:29 ` [PATCH 2/2] perf-probe: Skip searching debuginfo if we know no debuginfo Masami Hiramatsu
2017-12-29  2:52 ` Masami Hiramatsu [this message]
2018-01-03  6:51 ` [PATCH 0/2] perf-probe: Improve warning message for buildid mismatch Ravi Bangoria

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=20171229115248.51bec125a52f84df690f650c@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    /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).