From: sashiko-bot@kernel.org
To: "Stian Halseth" <stian@itx.no>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] perf/core: Let an arch prepare the user stack before it is dumped
Date: Tue, 22 Sep 2026 14:03:47 +0000 [thread overview]
Message-ID: <20260922140348.46C491F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922135653.1622301-2-stian@itx.no>
> PERF_SAMPLE_STACK_USER copies the user stack as it is in memory, which
> assumes the whole call chain is there. On sparc the sampled window's
> %l and %i registers, including the frame pointer and return address an
> unwinder starts from, may still be in the register file: they only
> reach the stack when a window spills. perf_callchain_user() already
> handles this for the callchain by calling flushw_user() first; the user
> stack dump has no equivalent arch entry point.
>
> Add perf_arch_prepare_ustack(), a no-op by default, called from
> perf_prepare_sample() before the dump size is computed, so an arch can
> write back whatever part of the user's stack state it still holds in
> registers. Doing this in the arch PMU interrupt handler would not do:
> software events such as cpu-clock reach perf_event_overflow() without
> passing through it.
>
> Signed-off-by: Stian Halseth <stian@itx.no>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922135653.1622301-1-stian@itx.no?part=1
next prev parent reply other threads:[~2026-09-22 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 13:56 [RFC PATCH 0/2] perf: user stack dump on sparc64 needs an arch hook Stian Halseth
2026-09-22 13:56 ` [RFC PATCH 1/2] perf/core: Let an arch prepare the user stack before it is dumped Stian Halseth
2026-09-22 14:03 ` sashiko-bot [this message]
2026-09-22 13:56 ` [RFC PATCH 2/2] sparc64: Support PERF_SAMPLE_REGS_USER and PERF_SAMPLE_STACK_USER Stian Halseth
2026-09-22 14:18 ` sashiko-bot
2026-09-22 14:36 ` Stian Halseth
2026-09-22 17:04 ` [RFC PATCH 0/2] perf: user stack dump on sparc64 needs an arch hook Magnus Lindholm
2026-09-22 20:02 ` Stian Halseth
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=20260922140348.46C491F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=stian@itx.no \
/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