From: Sasha Levin <sashal@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Matthieu Baerts <matttbe@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Carlos Llamas <cmllamas@google.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] decode_stacktrace: Support heuristic caller address search
Date: Thu, 5 Mar 2026 15:38:39 -0500 [thread overview]
Message-ID: <aanpz-SvqEhuf5y0@laps> (raw)
In-Reply-To: <20260306013241.4b0c7502d8db152f27f434b1@kernel.org>
On Fri, Mar 06, 2026 at 01:32:41AM +0900, Masami Hiramatsu wrote:
>On Thu, 5 Mar 2026 10:51:47 -0500
>Sasha Levin <sashal@kernel.org> wrote:
>> DWARF line tables map address *ranges* to source lines, so any address
>> within the CALL instruction resolves to the correct source line.
>> return_addr-1 is guaranteed to land inside the CALL instruction (it's
>> the last byte of it), so a single addr2line call is sufficient.
>
>Ah, got it, OK. I also confirmed "addr-1" works. But if there is no lineinfo
>entry for the call instruction, shouldn't we check more instructions before
>the call?
There's no such thing as "no lineinfo entry for the call instruction" - DWARF
line tables are range-based, not discrete points. Each row covers all addresses
up to the next row, so every address within a function resolves to some source
line. addr-1 lands inside the CALL instruction and will always resolve to same
line as the CALL itself.
We show "??:0" because the address we passed falls outside of any DWARF
compilation unit altogether.
--
Thanks,
Sasha
prev parent reply other threads:[~2026-03-05 20:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 5:12 Masami Hiramatsu (Google)
2026-03-05 14:56 ` Matthieu Baerts
2026-03-05 16:11 ` Masami Hiramatsu
2026-03-05 15:51 ` Sasha Levin
2026-03-05 16:32 ` Masami Hiramatsu
2026-03-05 20:38 ` Sasha Levin [this message]
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=aanpz-SvqEhuf5y0@laps \
--to=sashal@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cmllamas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=matttbe@kernel.org \
--cc=mhiramat@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
Powered by JetHome