Re: [PATCH 0/5] alpha/perf: add ProfileMe sampling
From: Peter Zijlstra
Date: Fri Oct 30 2026 - 05:40:13 EST
On Fri, Oct 30, 2026 at 12:00:41AM -0400, Matt Turner wrote:
> On Thu, Oct 29, 2026 at 11:34 AM Matt Turner <mattst88@xxxxxxxxx> wrote:
> >
> > On Thu, Oct 29, 2026 at 5:11 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > >
> > > On Wed, Oct 28, 2026 at 02:09:29PM -0400, Matt Turner wrote:
> > > > The 21264 from EV67 on, and the 21364, have a second performance counter
> > > > mode, ProfileMe, alongside the Aggregate mode that the driver uses today.
> > > > An Aggregate mode sample reports the PC where the overflow interrupt was
> > > > taken. On an EV7 that is anywhere from 15 instructions before to 12
> > > > after the one that overflowed the counter, which makes perf annotate
> > > > output close to useless. In ProfileMe mode the CPU picks one fetched
> > > > instruction, follows it down the pipeline, and reports its PC along with
> > > > what happened to it: whether it retired, whether it trapped and why,
> > > > whether it was a mispredicted branch, stalled before map, or was killed
> > > > on a wrong path, and what PCTR1 counted while it was in flight.
> > >
> > > Isn't this the thing that ended up as AMD's IBS?
> >
> > I have no idea, but it wouldn't surprise me too much :)
>
> Looking a bit further, it does seem so. ProfileMe was published by Dean
> et al. at MICRO-30 in 1997, and IBS works the same way: tag one
> instruction, follow it down the pipeline, and report what happened to
> it.
Right, I thought I remembered something like that.
Anyway, I was thinking that perhaps there was something to share with
the existing IBS work, but the AI overlords abused me of that idea quite
quickly. While they are very similar in spirit, they are very distinct
in practice.
Carry on the legacy compute :-)