Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1599558rwd; Thu, 1 Jun 2023 19:09:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bgPa6Eyydd692EcWKdHv1ucrdFECwn3inqXeadEjFX0ECd62K/JFAB23aNqr6gZgCTQXH X-Received: by 2002:a92:d1c3:0:b0:33a:ee6b:8959 with SMTP id u3-20020a92d1c3000000b0033aee6b8959mr7806188ilg.5.1685671792352; Thu, 01 Jun 2023 19:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685671792; cv=none; d=google.com; s=arc-20160816; b=RvdO6tzgp8IoWm1JPPTo7nYlAeIZNFFH3NS4Dv4AoIluE7Ky4l9auFMXpxUrOZ/WzP BMqH8qR1JYwOngOEq+yilflys6EWPmAHk3bSxc3s08a6Ha0AbQ/jyXrjPseoRvrvCdeY K8K90lZe5IYL3klANT6evi6PjmxY6SUyhXAjjBKfj3peIVo+irNgCyopwiP/KBAibeco ntufSKRXVQpcEqKhDzg6hBhEhDqJx8KciT58Kih4d0WlHC2vTrQOqLDpkoISsmwr3NAs 1DsuiJBsakJp9SmpCPVYZtAQhnfAaETq0/+jAOtJ4B2j8n+/k13mfvfB6PXcOkcHGOWL mtfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=uyo+/yAZ3thPKStFkW2Ikyb+nHGklHAoFBRsEVcMkjk=; b=ilHtzqkc0lqtzY2gEySnEqXLMdz+67+4XoMYZHU+oB4kDvTa8UHLGppup6pwCIpMn8 M5DQnegFnheqV0izvmCRydactLSTGtOpADd6O1A8godF0ibSr+jsSxWUsaAzjvN2Znee 5eG8m9oANSSYsDjypXbPmmjkYqKxzD+O1iNikNnqbkbB19VmX4N6yexJdacR/bbHbK/W ipyNsTJkPSqQ1DCIV9obvw7CQL9AYvPRQw/AkalH5HvY8pUVFrl3IlAECF8kenLIuALk PQAvGeNPvm8o7lK6D2eu0kMWrRZnOl4CsclIuh6JyQYMGn3znz5W65TR0fTMKLNxjjOY gCUA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p27-20020a63741b000000b0052c9458bc03si186694pgc.278.2023.06.01.19.09.38; Thu, 01 Jun 2023 19:09:52 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233006AbjFBBk2 (ORCPT + 99 others); Thu, 1 Jun 2023 21:40:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233784AbjFBBkW (ORCPT ); Thu, 1 Jun 2023 21:40:22 -0400 X-Greylist: delayed 75 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 01 Jun 2023 18:40:12 PDT Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D77CCF2 for ; Thu, 1 Jun 2023 18:40:12 -0700 (PDT) X-QQ-mid: bizesmtp72t1685669910tvbasghm Received: from localhost.localdomain ( [113.120.117.19]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 02 Jun 2023 09:38:28 +0800 (CST) X-QQ-SSF: 01200000000000B0J000000A0000000 X-QQ-FEAT: Usw2mCIyiSCmTmTTQKIvcFB7LX5oNcuPR3xfSuGTL3k5cu4wy+6yuW3z8lWlZ 4pvlW6LlKfEEBnsGdWdk0sw9boOAHHsxcs41NsTu1v3tvHsOkdqLXY9mi7OlGsKqX7o/zXS uqMwsw1j1iNoFbYWwCyw+bxX2C5xYNW1mhy+XmVDtj/0wNqjY0C1UzNW1UhC7H8K3fV/C0h jfdraxQfkVcvd+xcPcYVcpFFjFKerF4zZTseUj2HZXc1OB41MLRuWwCVFO/Bru577lZvzfE 5j2CZKXSaDbc2kqhHu2UW0xbeQxK7YMDZWQITa3xf4yIkfCATgVGs2D6rQLiwKkkca876yV gS4d/f0bd9LFfX+fEXAyywoy5xFeA== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10485070722005561613 From: Jialu Xu To: cmllamas@google.com Cc: gregkh@linuxfoundation.org, cristian.ciocaltea@collabora.com, masahiroy@kernel.org, vipinsh@google.com, linux-kernel@vger.kernel.org Subject: Re: Re: [PATCH] scripts/tags.sh: improve compiled sources generation Date: Fri, 2 Jun 2023 09:38:04 +0800 Message-Id: <20230602013804.940679-1-xujialu@vimux.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:vimux.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_PBL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 Here is a test log of `time make COMPILED_SOURCE=1 cscope` # git show commit 71f226c00c8a87de4698eda7d2a25e9b602d08e2 (HEAD -> tags.sh) Author: Jialu Xu Date: Sat May 6 16:52:13 2023 +0800 scripts/tags.sh: improve compiled sources generation Use grep instead of sed for all compiled sources generation, it is three times more efficient. diff --git a/scripts/tags.sh b/scripts/tags.sh index ea31640b26715..938dba219534a 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -98,7 +98,7 @@ all_compiled_sources() { echo include/generated/autoconf.h find $ignore -name "*.cmd" -exec \ - sed -n -E 's/^source_.* (.*)/\1/p; s/^ (\S.*) \\/\1/p' {} \+ | + grep -Poh '(?<=^ )\S+|(?<== )\S+[^\\](?=$)' {} \+ | awk '!a[$0]++' } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | sort -u # time make COMPILED_SOURCE=1 cscope GEN cscope real 0m3.869s user 0m4.254s sys 0m0.389s # time make COMPILED_SOURCE=1 cscope GEN cscope real 0m3.880s user 0m4.202s sys 0m0.428s # git revert HEAD [tags.sh 4dc58acca6240] Revert "scripts/tags.sh: improve compiled sources generation" 1 file changed, 1 insertion(+), 1 deletion(-) # git show commit 4dc58acca6240364a2303b9d9a4f55db159d60c4 (HEAD -> tags.sh) Author: Jialu Xu Date: Fri Jun 2 08:06:09 2023 +0800 Revert "scripts/tags.sh: improve compiled sources generation" This reverts commit 71f226c00c8a87de4698eda7d2a25e9b602d08e2. diff --git a/scripts/tags.sh b/scripts/tags.sh index 938dba219534a..ea31640b26715 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -98,7 +98,7 @@ all_compiled_sources() { echo include/generated/autoconf.h find $ignore -name "*.cmd" -exec \ - grep -Poh '(?<=^ )\S+|(?<== )\S+[^\\](?=$)' {} \+ | + sed -n -E 's/^source_.* (.*)/\1/p; s/^ (\S.*) \\/\1/p' {} \+ | awk '!a[$0]++' } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | sort -u # time make COMPILED_SOURCE=1 cscope GEN cscope real 0m15.855s user 0m16.308s sys 0m0.536s # time make COMPILED_SOURCE=1 cscope GEN cscope real 0m16.043s user 0m16.489s sys 0m0.493s