From: Nick Alcock <nick.alcock@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] Change stack_skip to 3
Date: Fri, 23 Jan 2026 19:05:57 +0000 [thread overview]
Message-ID: <875x8s40a2.fsf@esperi.org.uk> (raw)
In-Reply-To: <20260121235154.4600-1-eugene.loh@oracle.com> (eugene loh's message of "Wed, 21 Jan 2026 18:51:54 -0500")
On 21 Jan 2026, eugene loh told this:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> For most probes, bpf_get_stack() strips off artificial BPF JIT stack
> frames. In a few cases -- like fprobes and rawtp -- we have to skip
> the first few frames manually. Typically, we should skip 3 frames
> (trampoline, clause, and the bpf_get_stack call itself). Further,
> our BPF functions like
> get_bvar_caller()
> get_bvar_stackdepth()
> get_bvar_ucaller()
> get_bvar_ustackdepth()
> skip an additional frame to account for that call.
>
> Change stack_skip to 3 for the dt_fbt_fprobe and dt_rawtp providers.
>
> This raises the thorny question of testing. Until recently, the
> stack_skip value we had been using -- 4, not 3 -- worked since it was
> chosen empirically: there was a bug in the kernel that added an extra
> frame. But now, the kernel situation is muddled. The bug has been
> fixed in recent kernels, but only for x86. See
>
> https://github.com/torvalds/linux/commit/6d08340d1e354787d6c65a8c3cdd4d41ffb8a5ed
> Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()"
>
> A broader fix, for non-x86, is also expected. See the thread that
> starts at:
> https://lore.kernel.org/all/a38fed68-67bc-98ce-8e12-743342121ae3@oracle.com/
>
> So, for now, XFAIL tests on "unfixed" (older) kernels.
>
> Orabug: 38776929
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
(verified that it fixes these tests and doesn't break older kernels,
which XFAIL with the appropriate message.)
--
NULL && (void)
prev parent reply other threads:[~2026-01-23 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 23:51 [PATCH] Change stack_skip to 3 eugene.loh
2026-01-23 19:05 ` Nick Alcock [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=875x8s40a2.fsf@esperi.org.uk \
--to=nick.alcock@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.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