linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>,
	Mark Wielaard <mjw@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Milian Wolff <milian.wolff@kdab.com>,
	John Levon <levon@movementarian.org>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: libdw dwarf unwind issue
Date: Mon, 23 Nov 2020 23:12:47 +0100	[thread overview]
Message-ID: <20201123221247.GC2003988@krava> (raw)
In-Reply-To: <20201122222751.GA1362915@host1.jankratochvil.net>

On Sun, Nov 22, 2020 at 11:27:51PM +0100, Jan Kratochvil wrote:

SNIP

>              --1.15%--iothread_run
>                        aio_poll
>                        qemu_poll_ns
> 
> 
> > any idea why libdw is doing that? ;-)
> 
> Because libdw was reporting separate debuginfo file as the main file:
> 
> (lldb) p thread->process->dwfl->modulelist->main.name
> (char *) $1 = 0x0000000000b52490 "/home/jkratoch/.debug/.build-id/fc/d0111443729957fa8ef9511ff5dc3e9a5ccf9d/debug"
> (lldb) p thread->process->dwfl->modulelist->debug.name
> (char *) $2 = 0x0000000000000000
> 
> The correct way is to report the main ELF file as the main file:
> 
> (lldb) p thread->process->dwfl->modulelist->main.name
> (char *) $1 = 0x0000000000b52490 "/home/jkratoch/.debug/.build-id/fc/d0111443729957fa8ef9511ff5dc3e9a5ccf9d/elf"
> (lldb) p thread->process->dwfl->modulelist->debug.name
> (char *) $2 = 0x0000000000000000
> 
> In some cases it may later fill-in even the ->debug.name with "/debug" filename.

hi,
it fixes the issue for me, but it breaks the dwarf test:

72: DWARF unwind                                                    : FAILED!
[jolsa@krava perf]$ sudo ./perf test dwarf -v
72: DWARF unwind                                                    :
--- start ---
test child forked, pid 2084484
unwind: failed with 'No such file or directory'
got wrong number of stack entries 0 != 8
test child finished with -1
---- end ----
DWARF unwind: FAILED!

thanks,
jirka


  reply	other threads:[~2020-11-23 22:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201103221709.GL3597846@krava>
2020-11-22 22:27 ` libdw dwarf unwind issue Jan Kratochvil
2020-11-23 22:12   ` Jiri Olsa [this message]
2020-11-28  4:07     ` Jan Kratochvil
2020-12-01 19:41       ` Jiri Olsa
2020-12-02 10:06         ` Jan Kratochvil
2020-12-02 10:56           ` Jiri Olsa

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=20201123221247.GC2003988@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=fche@redhat.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=levon@movementarian.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=milian.wolff@kdab.com \
    --cc=mjw@redhat.com \
    --cc=namhyung@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).