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

From: Liang, Kan
Date: Mon Jul 27 2015 - 08:46:55 EST


>
> On Tue, Jul 21, 2015 at 04:43:08PM +0200, Andi Kleen wrote:
> > 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.
>
> hum, haven't seen this, was it posted already?
>
Not yet.
But I think the proposal is different as yours.
It intends to regularly read (10-20ms interval) counter during perf sampling.
So I modified the perf record, added a timer to read counter regularly, and
wrote the delta results into perf.data.
We want to do that is because we can read memory bandwidth from uncore
event during cpu PMU event is sampling. The sophisticated bandwidth
analysis requires fine granularity.
We cannot use sample read, because we need stable interval.
We tried to run perf record and perf stat together by script. But the script
way have various issue and complex to parses the output.
So I propose to change the perf record and regularly write the counter
value into perf.data
I will send them to review soon.

Thanks,
Kan
--
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/