Re: [PATCH 2/6] perf, tools, stat: Abstract stat metrics printing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 09:03:17AM -0700, Andi Kleen wrote: > > - introduce the print_metrics interface for perf_stat__print_shadow_stats > > - introduce printout function > > - introduce support for printing metrics in csv in interval mode > > That's already a separate patch. > > > - and

Re: [PATCH 2/6] perf, tools, stat: Abstract stat metrics printing

2015-09-08 Thread Andi Kleen
> - introduce the print_metrics interface for perf_stat__print_shadow_stats > - introduce printout function > - introduce support for printing metrics in csv in interval mode That's already a separate patch. > - and enable i > > > or any other way you find feasible *easy to review*.. I

Re: [PATCH 2/6] perf, tools, stat: Abstract stat metrics printing

2015-09-07 Thread Jiri Olsa
On Fri, Sep 04, 2015 at 03:45:13PM -0700, Andi Kleen wrote: > From: Andi Kleen > > Abstract the printing of shadow metrics. Instead of every > metric calling fprintf directly and taking care of indentation, > use two call backs: one to print metrics and another to > start a new line. > > This wi

Re: [PATCH 2/6] perf, tools, stat: Abstract stat metrics printing

2015-09-07 Thread Jiri Olsa
On Fri, Sep 04, 2015 at 03:45:13PM -0700, Andi Kleen wrote: SNIP > @@ -695,11 +743,7 @@ static void print_counter_aggr(struct perf_evsel > *counter, char *prefix) > } > > uval = avg * counter->scale; > - > - if (nsec_counter(counter)) > - nsec_printout(-1, 0, counte

[PATCH 2/6] perf, tools, stat: Abstract stat metrics printing

2015-09-04 Thread Andi Kleen
From: Andi Kleen Abstract the printing of shadow metrics. Instead of every metric calling fprintf directly and taking care of indentation, use two call backs: one to print metrics and another to start a new line. This will allow adding metrics to CSV mode and also using them for other purposes.