All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Milian Wolff <milian.wolff@kdab.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	"linux-kernel@vger.kernel.org" <Linux-kernel@vger.kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Yao Jin <yao.jin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: perf report: fix off-by-one for non-activation frames
Date: Sat, 17 Jun 2017 16:56:57 +0900	[thread overview]
Message-ID: <CAM9d7cjqZpuxPmARtp_Zy_PhZ+Gpt7Px_ecsLe=dhguNsYW1Bw@mail.gmail.com> (raw)
In-Reply-To: <31894796.cyPb9Arfxd@agathebauer>

On Sat, Jun 17, 2017 at 4:54 AM, Milian Wolff <milian.wolff@kdab.com> wrote:
> On Freitag, 16. Juni 2017 13:57:44 CEST Jan Kratochvil wrote:
>> On Fri, 16 Jun 2017 13:51:37 +0200, Milian Wolff wrote:
>> > > perf-4.12.0-0.rc5.git0.1.fc27.x86_64
>> > >
>> > >                   39e32e gdb_main (/usr/libexec/gdb)
>> > >                   10b6fa main (/usr/libexec/gdb)
>> > >
>> > >    0x000055555565f6f6 <+54>:    callq  0x5555558f17a0
>> > >    <gdb_main(captured_main_args*) 0x000055555565f6fb <+59>:    mov
>> > >    0x18(%rsp),%rcx
>>
>> [...]
>>
>> > Excuse me, but I'm having trouble following you. The non-GDB backtraces
>> > you
>> > are pasting do not show srcline information. So what exactly is broken?
>>
>> There is broken that perf now reports address 10b6fa (corresponding to
>> relocated address 0x000055555565f6fa) but there is no instruction on address
>> 0x000055555565f6fa.  If you 'objdump -d' it you cannot find any instruction
>> on adress 0x000055555565f6fa (or on address 0x10b6fa).  There is
>> instruction on address 0x000055555565f6fb.
>>
>> > Maybe paste the perf output you get now and highlight what you'd expect
>> > instead?
>>
>> Actual:
>>                   39e32e gdb_main (/usr/libexec/gdb)
>>                   10b6fa main (/usr/libexec/gdb)
>> Expected:
>>                   39e32f gdb_main (/usr/libexec/gdb)
>>                   10b6fb main (/usr/libexec/gdb)
>>
>> I agree perf needs to calculate with 39e32e and 10b6fa.  But it should
>> display to user 39e32f and 10b6fb.
>
> Hmmm this will require some more changes throughout the stack then. I.e. we'll
> have to remember the "isactivation" flag along with the original IP, and only
> apply the offset then when we query for inliners or srcline information. Maybe
> I can pull that off somehow in the patch series I'm working on currently,
> which refactors the whole inline/srcline/callchain logic anyways.
>
> I don't see an easy way to fix the behavior. Does anyone else? So how do we
> deal with this situation in the interim? I'd prefer we keep the current
> "broken" state, as I consider it less broken than what we had before... I
> guess some of the core perf developers should decide how to handle this.

Not sure whether it needs be fixed or not.  If we fix it, srcline and
address would not match so it can give its own confusion to users.
Ideally it should display an addressof the instruction before the
address IMHO.

Thanks,
Namhyung

  reply	other threads:[~2017-06-17  7:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 15:04 [PATCH] perf report: fix off-by-one for non-activation frames Milian Wolff
2017-05-15 15:13 ` Milian Wolff
2017-05-15 15:13   ` Milian Wolff
2017-05-16  1:57   ` Namhyung Kim
2017-05-16  9:00     ` Milian Wolff
2017-06-16  6:14 ` Jan Kratochvil
2017-06-16 11:51   ` Milian Wolff
2017-06-16 11:57     ` Jan Kratochvil
2017-06-16 19:54       ` Milian Wolff
2017-06-17  7:56         ` Namhyung Kim [this message]
2017-06-17  8:04           ` Jan Kratochvil
2017-06-17 11:13             ` Milian Wolff
2017-06-19 18:59               ` Arnaldo Carvalho de Melo
2017-07-04  7:59                 ` Milian Wolff

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='CAM9d7cjqZpuxPmARtp_Zy_PhZ+Gpt7Px_ecsLe=dhguNsYW1Bw@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=milian.wolff@kdab.com \
    --cc=yao.jin@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.