From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755392AbcCBPfP (ORCPT ); Wed, 2 Mar 2016 10:35:15 -0500 Received: from one.firstfloor.org ([193.170.194.197]:60364 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755323AbcCBPfM (ORCPT ); Wed, 2 Mar 2016 10:35:12 -0500 Date: Wed, 2 Mar 2016 16:35:07 +0100 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 5/7] perf, tools, stat: Implement --metric-only mode Message-ID: <20160302153506.GX5083@two.firstfloor.org> References: <1456858672-21594-1-git-send-email-andi@firstfloor.org> <1456858672-21594-6-git-send-email-andi@firstfloor.org> <20160302115750.GA28054@krava.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160302115750.GA28054@krava.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > @@ -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@linux.intel.com -- Speaking for myself only.