Re: [PATCH v4 5/7] alpha/perf: implement ProfileMe sampling
From: Matt Turner
Date: Tue Nov 03 2026 - 15:36:20 EST
On Tue, Nov 3, 2026 at 2:41 AM Magnus Lindholm <linmag7@xxxxxxxxx> wrote:
> One remaining question, should we accept precise_ip=3? For a PAL-mode
> PMPC we report the interrupted PC, which can differ from the profiled
> instruction. Should we reject level 3, or skip those fallback samples
> when level 3 is requested? What do you think?
Good catch. I think rejecting it is right. Level 3 means "must have 0
skid", and we can't promise that while the PALmode samples, and a user
PMPC in a kernel thread, keep the interrupted PC. Dropping those samples
at level 3 would hide ITB misses and redirects completely, which seems
worse than having a little skid on a few samples.
AMD IBS refuses precise_ip > 2 for the same reason (its fallback when the
RIP is invalid looks just like ours), and perf's :P falls back to 2 on
its own. So cycles:P and perf record's default event still get ProfileMe.
On my ES47, cycles:ppp now fails and cycles:P records with precise_ip 2.
v5 refuses it with -EOPNOTSUPP.
Thanks,
Matt