Re: perf, x86: Add parts of the remaining haswell PMU functionality

From: Andi Kleen
Date: Thu Sep 05 2013 - 11:10:40 EST


On Thu, Sep 05, 2013 at 03:15:02PM +0200, Ingo Molnar wrote:
>
> * Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> > One thing I'm not seeing in the current Haswell code is the config set
> > up for PERF_COUNT_HW_STALLED_CYCLES_FRONTEND/BACKEND. Both SB and IB has
> > them configured.
>
> Ping? Consider this a regression report.

AFAIK they don't work. You only get the correct answer
in some situations, but in others it either overestimates
frontend or underestimates backend badly.

The correct way is to implement it like TopDown level 1,
but I don't know how to put that into the kernel.

http://software.intel.com/en-us/articles/how-to-tune-applications-using-a-top-down-characterization-of-microarchitectural-issues

It requires running 4 counters and computing some equations.

My toplev tool in http://github.com/andikleen/pmu-tools
has a implementation on top of perf.

I could put it into perf stat if you want, but it would
be somewhat Intel specific.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/