From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752944AbcAVJlq (ORCPT ); Fri, 22 Jan 2016 04:41:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40583 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbcAVJlf (ORCPT ); Fri, 22 Jan 2016 04:41:35 -0500 Date: Fri, 22 Jan 2016 10:41:32 +0100 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, Andi Kleen Subject: Re: [PATCH 1/9] perf, tools, stat: Abstract stat metrics printing Message-ID: <20160122094132.GA27246@krava.brq.redhat.com> References: <1453256812-24006-1-git-send-email-andi@firstfloor.org> <1453256812-24006-2-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453256812-24006-2-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2016 at 06:26:44PM -0800, 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 will allow adding metrics to CSV mode and also > using them for other purposes. > > The computation of padding is now done in the central > callback, instead of every metric doing it manually. > This makes it easier to add new metrics. > > v2: Refactor functions, printout now does more. Move > shadow printing. Improve fallback callbacks. Don't > use void * callback data. > v3: Remove unnecessary hunk. Add typedef for new_line > v4: Remove unnecessary hunk. Don't print metrics for CSV/interval > mode yet. Move printout change to separate patch. > v5: Fix bisect bugs. Avoid bogus frontend cycles printing. > Fix indentation in different aggregation modes. > v6: Delay newline handling > Signed-off-by: Andi Kleen Acked-by: Jiri Olsa thanks, jirka