Messages in this thread | | | Date | Thu, 5 Sep 2013 19:12:55 +0200 | From | Ingo Molnar <> | Subject | Re: perf, x86: Add parts of the remaining haswell PMU functionality |
| |
* Andi Kleen <andi@firstfloor.org> wrote:
> The correct way is to implement it like TopDown level 1, but I don't > know how to put that into the kernel.
Create an event group, with some callbacks to do the additions/subtractions to get at the right figures? (if it's plain linear arithmetics then that could be encoded in some simple operation flags as well, executed and calculated when the group count is accessed.)
That's something that would be useful to have in the kernel anyway, to abstract away simple concepts that are not so simple to measure.
> 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.
Yeah, would be nice to hide this mostly transparently, behind a group of events or so.
Thanks,
Ingo
| |