mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: Jialu Xu <xujialu@vimux.org>
Cc: gregkh@linuxfoundation.org, cristian.ciocaltea@collabora.com,
	masahiroy@kernel.org, vipinsh@google.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/tags.sh: improve compiled sources generation
Date: Thu, 1 Jun 2023 17:35:49 +0000	[thread overview]
Message-ID: <ZHjW9RJ/jinVe5F/@google.com> (raw)
In-Reply-To: <20230601010402.71040-1-xujialu@vimux.org>

On Thu, Jun 01, 2023 at 09:04:02AM +0800, Jialu Xu wrote:
> Use grep instead of sed for all compiled sources generation, it is three
> times more efficient.

Although I'm not sure how you obtained a 3x efficiency it did make
things faster for me. I suppose there are several factors involved.
I used defconfig for arm64 and got the following results:
	real    1m50.790s
	real    1m27.907s (with patch)

Tested-by: Carlos Llamas <cmllamas@google.com>

> 
> Signed-off-by: Jialu Xu <xujialu@vimux.org>
> ---
>  scripts/tags.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index ea31640b2671..938dba219534 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
> -- 
> 2.30.2
> 

  reply	other threads:[~2023-06-01 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  1:04 Jialu Xu
2023-06-01 17:35 ` Carlos Llamas [this message]
2023-06-02  1:38   ` Jialu Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZHjW9RJ/jinVe5F/@google.com \
    --to=cmllamas@google.com \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=vipinsh@google.com \
    --cc=xujialu@vimux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®