From patchwork Mon Nov 14 11:43:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 19770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2098584wru; Mon, 14 Nov 2022 03:50:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf79pIu6U2GF33G7JZtm26seguuF8g8JDCupDb5b1NxdbYWxck52olN3ESpRZ8lnp4ANAuho X-Received: by 2002:a17:906:b755:b0:78d:b8b3:f027 with SMTP id fx21-20020a170906b75500b0078db8b3f027mr9718582ejb.439.1668426620870; Mon, 14 Nov 2022 03:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426620; cv=none; d=google.com; s=arc-20160816; b=JxgiktmKlE4TPGv8pcgbS58YqrfYlR7w0M/h27xOne7Kw2fJJCwAn0D1etitvtmMet 5nNMcC+wZ46s5SEuQO08I/2dzoopmNjipXxQC4SiuzftIvq94aoYOSpFguSoe0CrUyAH f6nzEFhhkgiRp2OEZKQU+EU5d3nQpANF0xoKVZ9Kya6QnsjZFzzfFnWSAZ2/ToZ5MwK2 dgkA8/29nt6X6iFTsnAPmfmsbbn783NHCDapJjdcxmbqq8NXCfyTny3BANDDZBIqX/nb TOEnQ1FXgeCVkiUaMGWDiylx6b72P7tGHD7KvAwwcXcZze0Q+jh4lpVsatgdr/L2mfPt jwKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=K45gGdRp5MOmi5LrYe/52NKixQYdpA0Sf5b2sxz0zLQ=; b=iCUA+7inf7G9UCMBy0teCyzFz6O3Wv+tNTJjIaeo4M1ZANC94WsH0HrAJz0c5tcVzG LfS6wGs3eQBsu8IF6PWVg9XYwClU8fzfCaeJkFAA2F0oJEnvxy4KM37cphTWSWsUStGj 0rdKqcma8HXOVx3RHaJGgLirPSCABrqpz6fk+FQXkPlSedO79bVQc98LCaLh5udmoDRw tglrUKr45gw5ZoImGVeJ4XA/5D9Tn5f7YttHET+rHhdbjKf427aKYCpeJOMFK48EPmJX 3CthVmBIE7FM2/R5qnABbCS2MWvmgdvDsNfXtL8eUfWxQA/CAqMpZjm8TPuUTKSWojgc /Z8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eNTVR7Yx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz6-20020a170906bb0600b007a8c58b51a1si7766084ejb.179.2022.11.14.03.49.55; Mon, 14 Nov 2022 03:50:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eNTVR7Yx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236925AbiKNLtQ (ORCPT + 99 others); Mon, 14 Nov 2022 06:49:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236791AbiKNLso (ORCPT ); Mon, 14 Nov 2022 06:48:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05AA122BCB; Mon, 14 Nov 2022 03:45:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B5E0FB80E6C; Mon, 14 Nov 2022 11:45:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F72EC433D7; Mon, 14 Nov 2022 11:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426344; bh=G+vw37jjgRCPwdc1JxfhASj9yJQMYjGyuVjD7aOBanE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eNTVR7Yx8lZnY0lqCRyi5JIDpYvNn2+K4wTQzUi5xXUVgDX06l8t75Ij7EeS8NQlZ o06lTGdDbvZHpYMT522j6EAJwd06l5nk1A7aNKe/tvWylCIsMdnE4KM+MTEalUJRzI ayuXBvGeo9yYSyVLjfdNsFq03GLKfLBDxCQdPwFKwk1g+8y0oTLsjLruT9Q0Sw7xHT qPNVVdhkm6DKE/RlJDKRg+AcDo61w7nHGAkorUnJttKILR7M3vUgjwJzVqc814df+2 JOcdH2JCbjj+mVGZQyq0t+w1L2DXuin1C9565yCq5EFq0jwP4qFGVTDa0cZzh//G7T /KxlRioeirYBQ== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Masahiro Yamada , Michal Marek , Nick Desaulniers , linux-kbuild@vger.kernel.org, Martin Liska , Jiri Slaby Subject: [PATCH 44/46] scripts/bloat-o-meter, lto: handle gcc LTO Date: Mon, 14 Nov 2022 12:43:42 +0100 Message-Id: <20221114114344.18650-45-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749472112261225555?= X-GMAIL-MSGID: =?utf-8?q?1749472112261225555?= From: Andi Kleen gcc LTO can add .lto_priv postfixes to symbols. Ignore those in bloat-o-meter to allow comparison of non-LTO with LTO kernels. Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: linux-kbuild@vger.kernel.org Signed-off-by: Andi Kleen Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- 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 f9553f60a14a..ab994b3bf6e2 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -45,7 +45,7 @@ def getsizes(file, format): if name == "linux_banner": continue if name == "vermagic": continue # statics and some other optimizations adds random .NUMBER - name = re_NUMBER.sub('', name) + name = re_NUMBER.sub('', name).replace(".lto_priv", "") sym[name] = sym.get(name, 0) + int(size, 16) return sym