Re: [PATCH 0/5] alpha/perf: add ProfileMe sampling

From: Matt Turner

Date: Fri Oct 30 2026 - 00:01:04 EST


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.