Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp393331ybg; Wed, 3 Jun 2020 03:37:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxKyYheu5/HMzDFQKlbC9XLTZ8K902611Z5yVk+H5y78MXSvx9nYkbpgQxT79t2mRhdfO+ X-Received: by 2002:a17:907:2636:: with SMTP id aq22mr26641538ejc.384.1591180658485; Wed, 03 Jun 2020 03:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591180658; cv=none; d=google.com; s=arc-20160816; b=xMbSXKA48cKU+ZP6Vbt7LTY2NFpE7X+K41hv91zI4w4RpowUmyzp91nvzI47q2GsqH ZlZA1PZb8uIgfQnCm5h6JP0TY8WIvkpr7j8RVBPty8IgypGPnOmUxfb99cHYPBa5i2T0 t8YODS2/RDCVTz3QhqbfrXiopR3K73PaSTeAksl/Eucja29IFsZpkJ6c5wkP/J9eL8Dy slI3W/6FTBKIgC5KKKKEJfQc5JL+6cLGs2RlLFy+HcQi9f2mxl+qZjjmyuNr813ZvsMb QtK6LqkvNKvn1rcLEAt/i4kvRfViAwjGO+z8AEzu7EVN8yTiaoxe0UlMoLY5UAC02fUY T3Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=EPfH1NH92pXAU3Vt1HkKkiHVPXCiisTlnsBbB7Ep2yc=; b=Oii4PLMc2HU/8IYaqI66evD8h9iikUn0ztu7fHTP2KY7P6nQ4NHSGHm4kMSn1JKKIR 1syNWx8qHGKAkY/AMls3qh9EuI89dohuGO+Jtr7vwxMGaz6rDEAXjAbr4eYSqChvXxht 8Pdo/iWBt5nn2OjHS3XsQ2zMgxJD6lI24YlB3+ufGcqJrtEyO79JLbKl36nKMF0dyU+2 ykhwSBO75TNDmsN3FT36k3VAypr4FlYhVdWhw+FpkB9oG8JhLn3bJcNv8GfY2VUMv6xD SCDBPE+BPUinoTZAFoUASuCmkW/GRWi4X+/llbKK5kEdvisrm1qWCfF378cVPVP1RoAB aJcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si916104eja.116.2020.06.03.03.37.14; Wed, 03 Jun 2020 03:37:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726023AbgFCKfT (ORCPT + 99 others); Wed, 3 Jun 2020 06:35:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:38086 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgFCKfS (ORCPT ); Wed, 3 Jun 2020 06:35:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DC09CAC40; Wed, 3 Jun 2020 10:35:20 +0000 (UTC) From: Nikolay Borisov To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, Nikolay Borisov Subject: [RESEND PATCH] bloat-o-meter: Support comparing library archives Date: Wed, 3 Jun 2020 13:35:13 +0300 Message-Id: <20200603103513.3712-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Library archives (.a) usually contain multiple object files so their output of nm --size-sort contains lines like: 00000000000003a8 t run_test extent-map-tests.o: bloat-o-meter currently doesn't handle them which results in errors when calling .split() on them. Fix this by simply ignoring them. This enables diffing subsystems which generate built-in.a files. Signed-off-by: Nikolay Borisov --- Resending and CCing Andrew this time. scripts/bloat-o-meter | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index 8c965f6a9881..d7ca46c612b3 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -26,6 +26,8 @@ re_NUMBER = re.compile(r'\.[0-9]+') sym = {} with os.popen("nm --size-sort " + file) as f: for line in f: + if line.startswith("\n") or ":" in line: + continue size, type, name = line.split() if type in format: # strip generated symbols -- 2.17.1