Commit Graph

14 Commits

Author SHA1 Message Date
Paul Eggert 581c785bf3 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.

I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah.  I don't
know why I run into these diagnostics whereas others evidently do not.

remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
2022-01-01 11:40:24 -08:00
Naohiro Tamura 2fd36391be benchtests: Remove redundant assert.h
This patch removed redundant "#include <assert.h>" from
bench-memset-large.c and bench-memset-walk.c.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2021-09-13 09:08:26 +05:30
Paul Eggert 2b778ceb40 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
2021-01-02 12:17:34 -08:00
Joseph Myers d614a75396 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Paul Eggert 5a82c74822 Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:

sed -ri '
  s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
  s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
  $(find $(git ls-files) -prune -type f \
      ! -name '*.po' \
      ! -name 'ChangeLog*' \
      ! -path COPYING ! -path COPYING.LIB \
      ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
      ! -path manual/texinfo.tex ! -path scripts/config.guess \
      ! -path scripts/config.sub ! -path scripts/install-sh \
      ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
      ! -path INSTALL ! -path  locale/programs/charmap-kw.h \
      ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
      ! '(' -name configure \
            -execdir test -f configure.ac -o -f configure.in ';' ')' \
      ! '(' -name preconfigure \
            -execdir test -f preconfigure.ac ';' ')' \
      -print)

and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:

  chmod a+x sysdeps/unix/sysv/linux/riscv/configure
  # Omit irrelevant whitespace and comment-only changes,
  # perhaps from a slightly-different Autoconf version.
  git checkout -f \
    sysdeps/csky/configure \
    sysdeps/hppa/configure \
    sysdeps/riscv/configure \
    sysdeps/unix/sysv/linux/csky/configure
  # Omit changes that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
  git checkout -f \
    sysdeps/powerpc/powerpc64/ppc-mcount.S \
    sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
  # Omit change that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
  git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 02:43:31 -07:00
Wilco Dijkstra 3c05dd79d0 Use generic memset/memcpy/memmove in benchtests
Use the generic C memset/memcpy/memmove in benchtests since comparing
against a slow byte-oriented implementation makes no sense.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

2019-08-29  Wilco Dijkstra  <wdijkstr@arm.com>

	* benchtests/bench-memcpy.c (simple_memcpy): Remove.
	(generic_memcpy): Include generic C memcpy.
	* benchtests/bench-memmove.c (simple_memmove): Remove.
	(generic_memmove): Include generic C memmove.
	* benchtests/bench-memset.c (simple_memset): Remove.
	(generic_memset): Include generic C memset.
	* benchtests/bench-memset-large.c (simple_memset): Remove.
	(generic_memset): Include generic C memset.
	* benchtests/bench-memset-walk.c (simple_memset): Remove.
	(generic_memset): Include generic C memset.
	* string/memcpy.c (MEMCPY): Add defines to enable redirection.
	* string/memset.c (MEMSET): Likewise.
	* sysdeps/x86_64/memcopy.h: Remove empty file.
2019-08-30 17:21:35 +01:00
Wilco Dijkstra 46ae07324b Improve string benchtest timing
Improve string benchtest timing.  Many tests run for 0.01s which is way too
short to give accurate results.  Other tests take over 40 seconds which is
way too long.  Significantly increase the iterations of the short running
tests.  Reduce number of alignment variations in the long running memcpy walk
tests so they take less than 5 seconds.

As a result most tests take at least 0.1s and all finish within 5 seconds.

	* benchtests/bench-memcpy-random.c (do_one_test): Use medium iterations.
	* benchtests/bench-memcpy-walk.c (test_main): Reduce alignment tests.
	* benchtests/bench-memmem.c (do_one_test): Use small iterations.
	* benchtests/bench-memmove-walk.c (test_main): Reduce alignment tests.
	* benchtests/bench-memset-walk.c (test_main): Reduce alignment tests.
	* benchtests/bench-strcasestr.c (do_one_test): Use small iterations.
	* benchtests/bench-string.h (INNER_LOOP_ITERS): Increase iterations.
	(INNER_LOOP_ITERS_MEDIUM): New define.
	(INNER_LOOP_ITERS_SMALL): New define.
	* benchtests/bench-strpbrk.c (do_one_test): Use medium iterations.
	* benchtests/bench-strsep.c (do_one_test): Use small iterations.
	* benchtests/bench-strspn.c (do_one_test): Use medium iterations.
	* benchtests/bench-strstr.c (do_one_test): Use small iterations.
	* benchtests/bench-strtok.c (do_one_test): Use small iterations.
2019-05-21 15:19:06 +01:00
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Wilco Dijkstra 90d3320d7f Refactor string benchtests
Refactor string benchtests by moving duplicated defines into
bench-string.h.

	* benchtests/bench-memchr.c: Cleanup defines.
	* benchtests/bench-memcmp.c: Likewise.
	* benchtests/bench-memset.c: Likewise.
	* benchtests/bench-memset-large.c: Likewise.
	* benchtests/bench-memset-walk.c: Likewise.
	* benchtests/bench-stpcpy.c: Likewise.
	* benchtests/bench-stpncpy.c: Likewise.
	* benchtests/bench-strcat.c: Likewise.
	* benchtests/bench-strchr.c: Likewise.
	* benchtests/bench-strcmp.c: Likewise.
	* benchtests/bench-strcpy.c: Likewise.
	* benchtests/bench-strcspn.c: Likewise.
	* benchtests/bench-string.h: Likewise.
	* benchtests/bench-strlen.c: Likewise.
	* benchtests/bench-strncat.c: Likewise.
	* benchtests/bench-strncmp.c: Likewise.
	* benchtests/bench-strncpy.c: Likewise.
	* benchtests/bench-strnlen.c: Likewise.
	* benchtests/bench-strpbrk.c: Likewise.
	* benchtests/bench-strrchr.c: Likewise.
	* benchtests/bench-strspn.c: Likewise.
2018-12-21 18:52:40 +00:00
Siddhesh Poyarekar 014efdd7ea benchtests: Clean up the alloc_bufs
Drop realloc_bufs in favour of making alloc_bufs transparently
reallocate the buffers if it had allocated before.  Also consolidate
computation of buffer lengths so that they don't get repeated on every
reallocation.

	* benchtests/bench-string.h (buf1_size, buf2_size): New
	variables.
	(init_sizes): New function.
	(test_init): Use it.
	(alloc_buf, exit_error): New functions.
	(alloc_bufs): Use ALLOC_BUF.
	(realloc_bufs): Remove.
	* benchtests/bench-memcmp.c (do_test): Adjust.
	* benchtests/bench-memset-large.c (do_test): Likewise.
	* benchtests/bench-memset-walk.c (do_test): Likewise.
	* benchtests/bench-memset.c (do_test): Likewise.
	* benchtests/bench-strncmp.c (do_test): Likewise.
2018-08-08 00:44:56 +05:30
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Siddhesh Poyarekar eb332f9feb benchtests: Bump start size since smaller sizes are noisy
Numbers for very small sizes (< 128B) are much noisier for non-cached
benchmarks like the walk benchmarks, so don't include them.

	* benchtests/bench-memcpy-walk.c (START_SIZE): Set to 128.
	* benchtests/bench-memmove-walk.c (START_SIZE): Likewise.
	* benchtests/bench-memset-walk.c (START_SIZE): Likewise.
2017-11-20 18:03:32 +05:30
Siddhesh Poyarekar 4d7632ff68 benchtests: Fix walking sizes and directions for *-walk benchmarks
Make the walking benchmarks walk only backwards since copying both
ways is biased in favour of implementations that use non-temporal
stores for larger sizes; falkor is one of them.  This also fixes up
bugs in computation of the result which ended up multiplying the
length with the timing result unnecessarily.

	* benchtests/bench-memcpy-walk.c (do_one_test): Copy only
	backwards.  Fix timing computation.
	* benchtests/bench-memmove-walk.c (do_one_test): Likewise.
	* benchtests/bench-memset-walk.c (do_one_test): Walk backwards
	on memset by N at a time.  Fix timing computation.
2017-11-20 18:03:32 +05:30
Siddhesh Poyarekar 36bb8edf51 benchtests: Memory walking benchmark for memset
This benchmark is an attempt to eliminate cache effects from string
benchmarks.  The benchmark walks backward through a large memory area
and sets different sizes of memory and alignments one at a time
instead of looping around in the same memory area.  This is a good
metric to have alongside the simple memset benchmark (which is only
really useful for smaller sizes) especially for larger sizes where the
likelihood of the call being done only once is pretty high.

	* benchtests/bench-memset-walk.c: New file.
	* benchtests/Makefile (string-benchset): Add it.
2017-10-05 22:20:23 +05:30