Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-21 Thread Jiri Olsa
On Tue, Nov 21, 2017 at 09:07:14AM -0800, Andi Kleen wrote: > On Tue, Nov 21, 2017 at 10:28:06AM +0100, Jiri Olsa wrote: > > On Mon, Nov 20, 2017 at 08:03:06AM -0800, Andi Kleen wrote: > > > > > Yes it is. > > > > > > > > > > It's for the complete sampling period because it is computed > > > > > o

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-21 Thread Andi Kleen
On Tue, Nov 21, 2017 at 10:28:06AM +0100, Jiri Olsa wrote: > On Mon, Nov 20, 2017 at 08:03:06AM -0800, Andi Kleen wrote: > > > > Yes it is. > > > > > > > > It's for the complete sampling period because it is computed > > > > over the delta from the last sample to the previous sample. > > > > > >

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-21 Thread Jiri Olsa
On Mon, Nov 20, 2017 at 08:03:06AM -0800, Andi Kleen wrote: > > > Yes it is. > > > > > > It's for the complete sampling period because it is computed > > > over the delta from the last sample to the previous sample. > > > > > > There isn't really a metric at a point, it is always over a interval.

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-20 Thread Andi Kleen
> > Yes it is. > > > > It's for the complete sampling period because it is computed > > over the delta from the last sample to the previous sample. > > > > There isn't really a metric at a point, it is always over a interval. > > agreed, it's the count we meassured from the last sample.. but the

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-20 Thread Jiri Olsa
On Mon, Nov 20, 2017 at 07:35:05AM -0800, Andi Kleen wrote: > On Mon, Nov 20, 2017 at 10:04:19AM +0100, Jiri Olsa wrote: > > On Fri, Nov 17, 2017 at 01:43:00PM -0800, Andi Kleen wrote: > > > > SNIP > > > > > --- > > > tools/perf/Documentation/perf-script.txt | 10 +++- > > > tools/perf/builtin-s

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-20 Thread Andi Kleen
On Mon, Nov 20, 2017 at 10:04:19AM +0100, Jiri Olsa wrote: > On Fri, Nov 17, 2017 at 01:43:00PM -0800, Andi Kleen wrote: > > SNIP > > > --- > > tools/perf/Documentation/perf-script.txt | 10 +++- > > tools/perf/builtin-script.c | 97 > > +++- > > tools/p

Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-20 Thread Jiri Olsa
On Fri, Nov 17, 2017 at 01:43:00PM -0800, Andi Kleen wrote: SNIP > --- > tools/perf/Documentation/perf-script.txt | 10 +++- > tools/perf/builtin-script.c | 97 > +++- > tools/perf/util/metricgroup.c| 4 ++ > 3 files changed, 108 insertions(

[PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script

2017-11-17 Thread Andi Kleen
From: Andi Kleen Add support for computing perf stat style metrics in perf script. When using leader sampling we can get metrics for each sampling period by computing formulas over the values of the different group members. This allows things like fine grained IPC tracking through sampling, muc