From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbcFUIBC (ORCPT ); Tue, 21 Jun 2016 04:01:02 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:40312 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209AbcFUIA6 convert rfc822-to-8bit (ORCPT ); Tue, 21 Jun 2016 04:00:58 -0400 From: Vineet Gupta To: Heiko Carstens , Andrew Morton CC: "linux-kernel@vger.kernel.org" , "Vineet Gupta" Subject: Re: [PATCH] scripts/bloat-o-meter: fix percent change output Thread-Topic: [PATCH] scripts/bloat-o-meter: fix percent change output Thread-Index: AQHRy5Aq0Akit3EPw0eKBUZY95Z88w== Date: Tue, 21 Jun 2016 08:00:05 +0000 Message-ID: References: <1466494811-80382-1-git-send-email-heiko.carstens@de.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.144.199.104] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Heiko, On Tuesday 21 June 2016 01:10 PM, Heiko Carstens wrote: > commit b21e91c305bc "scripts/bloat-o-meter: print percent change" > introduced an additional line to the output of the bloat-a-meter > script which shows the percent change. However it uses integer instead > of floating point arithmetics. > > Let's enforce floating point arithmetics to improve the output (note > "chg"): There's already a (slightly better) patch in flight to same effect: http://marc.info/?l=linux-kernel&m=146598033302242 -Vineet > Before: > > add/remove: 0/0 grow/shrink: 2/0 up/down: 24/0 (24) > function old new delta > condev_setup 96 114 +18 > vermagic 58 64 +6 > Total: Before=24794284, After=24794308, chg 0.000000% > > After: > > add/remove: 0/0 grow/shrink: 2/0 up/down: 24/0 (24) > function old new delta > condev_setup 96 114 +18 > vermagic 58 64 +6 > Total: Before=24794284, After=24794308, chg 0.000097% > > Cc: Vineet Gupta > Signed-off-by: Heiko Carstens > --- > scripts/bloat-o-meter | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter > index 0254f3ba0dba..5a5d383004f5 100755 > --- a/scripts/bloat-o-meter > +++ b/scripts/bloat-o-meter > @@ -68,4 +68,4 @@ for d, n in delta: > if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d)) > > print("Total: Before=%d, After=%d, chg %f%%" % \ > - (otot, ntot, (ntot - otot)*100/otot)) > + (otot, ntot, (ntot - otot)*100.0/otot))