mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jialu Xu <xujialu@vimux.org>
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	[thread overview]
Message-ID: <20230602013804.940679-1-xujialu@vimux.org> (raw)
In-Reply-To: <ZHjW9RJ/jinVe5F/@google.com>

Here is a test log of `time make COMPILED_SOURCE=1 cscope`

  # git show
  commit 71f226c00c8a87de4698eda7d2a25e9b602d08e2 (HEAD -> tags.sh)
  Author: Jialu Xu <xujialu@vimux.org>
  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 <xujialu@vimux.org>
  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


      reply	other threads:[~2023-06-02  1:40 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
2023-06-02  1:38   ` Jialu Xu [this message]

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=20230602013804.940679-1-xujialu@vimux.org \
    --to=xujialu@vimux.org \
    --cc=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 \
    /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®