Re: [RFC 00/47] perf stat: Add scripting support

Andi Kleen
2015-07-21T14:43:18Z

On Tue, Jul 21, 2015 at 02:31:20PM +0200, Jiri Olsa wrote:
> hi,
> sending RFC on another attempt for stat scripting.
>
> The initial attempt defined its own formula lang and allowed
> triggering user's script on the end of the stat command:
> http://marc.info/?l=linux-kernel&m=136742146322273&w=2
>
> This patchset abandons the idea of new formula language
> and rather adds support to:
> - store stat data into perf.data file
> - add python support to process stat events
>
> Basically it allows to store stat data into perf.data and
> post process it with python scripts in a similar way we
> do for sampling data.

I suspect there is some overlap with Kan's patchkit to put
uncore data into perf.data too.

The basic direction seems good just from reading the intro
(haven't read the code so far). I've been thinking about
doing something similar to do native topdown support in perf.
This would require evaluating formulas which are depending
on the CPU.

-Andi