public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] [gdb/contrib] Combine sed invocations in words.sh script
Date: Fri, 22 Nov 2019 15:55:00 -0000	[thread overview]
Message-ID: <f618007364b84739f6f8663c1c634fb47bbc6732@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT f618007364b84739f6f8663c1c634fb47bbc6732 ***

commit f618007364b84739f6f8663c1c634fb47bbc6732
Author:     Tom de Vries <tdevries@suse.de>
AuthorDate: Fri Nov 22 16:23:22 2019 +0100
Commit:     Tom de Vries <tdevries@suse.de>
CommitDate: Fri Nov 22 16:23:22 2019 +0100

    [gdb/contrib] Combine sed invocations in words.sh script
    
    Currently running words.sh on all the c source and header files in the repo
    takes ~16s in user time:
    ...
    $ time ./gdb/contrib/words.sh \
        $(find -type f -name "*.c" -o -name "*.h") \
        >/dev/null
    
    real    0m7,787s
    user    0m16,349s
    sys     0m0,367s
    ...
    
    Rewrite the sed invocations using the -e option from this:
    ...
       | sed <sedprog1>
       | sed <sedprog2>
    ...
    into this:
    ...
       | sed \
           -e <sedprog1>
           -e <sedprog2>
    ...
    and reduce user time to ~11s:
    ...
    $ time ./gdb/contrib/words.sh \
        $(find -type f -name "*.c" -o -name "*.h") \
        >/dev/null
    
    real    0m7,243s
    user    0m11,220s
    sys     0m0,205s
    ...
    
    gdb/ChangeLog:
    
    2019-11-22  Tom de Vries  <tdevries@suse.de>
    
            * contrib/words.sh: Combine sed invocations.
    
    Change-Id: Ib08453f3712f32ed02d9f503ee960711ebb9421b

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 81c6690602..25c63c7658 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-11-22  Tom de Vries  <tdevries@suse.de>
+
+	* contrib/words.sh: Combine sed invocations.
+
 2019-11-21  Christian Biesinger  <cbiesinger@google.com>
 
 	* Makefile.in: Update.
diff --git a/gdb/contrib/words.sh b/gdb/contrib/words.sh
index ae38539a7f..8c4fdd072f 100755
--- a/gdb/contrib/words.sh
+++ b/gdb/contrib/words.sh
@@ -114,12 +114,13 @@ export LC_ALL=C
 awk \
     -f "$awkfile" \
     -- "$@" \
-    | sed 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
-    | sed 's/\[/\n/g' \
-    | sed 's/\]/\n/g' \
-    | sed 's/[0-9][0-9]*/\n/g' \
+    | sed \
+	  -e 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
+	  -e 's/\[/\n/g' \
+	  -e 's/\]/\n/g' \
+	  -e 's/[0-9][0-9]*/\n/g' \
+	  -e 's/[ \t]*//g' \
     | tr '[:upper:]' '[:lower:]' \
-    | sed 's/[ \t]*//g' \
     | sort \
     | uniq -c \
     | awk "{ if (($minfreq == 0 || $minfreq <= \$1) \


             reply	other threads:[~2019-11-22 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 15:55 gdb-buildbot [this message]
2019-11-22 15:55 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-11-22 16:40 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-11-28  2:38 ` Failures on Fedora-i686, " gdb-buildbot
2019-11-28  2:41 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-11-28  2:42 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-11-28  2:42 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-11-28  3:51 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-11-28  3:57 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-11-28  3:59 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot

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=f618007364b84739f6f8663c1c634fb47bbc6732@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).