Re: [PATCH 5/7] perf, tools, stat: Implement --metric-only mode

From: Andi Kleen
Date: Wed Mar 02 2016 - 10:35:20 EST


> > @@ -1229,6 +1397,8 @@ static void print_counters(struct timespec *ts, int argc, const char **argv)
> > case AGGR_GLOBAL:
> > evlist__for_each(evsel_list, counter)
> > print_counter_aggr(counter, prefix);
> > + if (metric_only)
> > + fputc('\n', stat_config.output);
>
> this new line printing based on metric_only is all over the place..
> could we sorted out new lines in the print callbacks? this makes
> my head hurt ;-)

I don't see how a print callback could handle it. It has no idea
where the event list ends. Only the high level display function
knows that, and it prints the newlines.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.