about summary refs log tree commit diff
path: root/benchtests/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* benchtests: Reformat Makefile.Carlos O'Donell2023-05-181-15/+32
| | | | | | | | | Reflow all long lines adding comment terminators. Sort all reflowed text using scripts/sort-makefile-lines.py. No regressions running microbenchmarks. No code generation changes observed in binary artifacts. No regressions on x86_64 and i686.
* benchtests: Add fmodf benchmarkAdhemerval Zanella Netto2023-04-031-0/+1
| | | | | | | | | 1. Subnormals: 128 inputs. 2. Normal numbers with large exponent difference (|x/y| > 2^8): 1024 inputs between FLT_MIN and FLT_MAX; 3. Close exponents (ey >= -103 and |x/y| < 2^8): 1024 inputs with exponents between -10 and 10. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
* benchtests: Add fmod benchmarkAdhemerval Zanella Netto2023-04-031-0/+1
| | | | | | | | | | | Add three different dataset, from random floating point numbers: 1. Subnormals: 128 inputs. 2. Normal numbers with large exponent difference (|x/y| > 2^52): 1024 inputs between DBL_MIN and DBL_MAX; 3. Close exponents (ey >= -907 and |x/y| < 2^52): 1024 inputs with exponents between -10 and 10. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Disable use of -fsignaling-nans if compiler does not support itAdhemerval Zanella2022-11-011-3/+3
| | | | Reviewed-by: Fangrui Song <maskray@google.com>
* Benchtests: Add bench for pthread_spin_{try}lock and mutex_trylockNoah Goldstein2022-10-031-1/+9
| | | | | Reuses infrastructure from previous pthread_mutex_lock benchmarks to test other performance sensitive functions.
* benchtests: Add arc4random benchtestAdhemerval Zanella Netto2022-07-221-1/+4
| | | | | | | | It shows both throughput (total bytes obtained in the test duration) and latecy for both arc4random and arc4random_buf with different sizes. Checked on x86_64-linux-gnu, aarch64-linux, and powerpc64le-linux-gnu.
* benchtests: Add benchtests for dl_elf_hash, dl_new_hash and nss_hashNoah Goldstein2022-05-231-4/+21
| | | | | | Benchtests are for throughput and include random / fixed size benchmarks. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* benchtests: Add wcrtomb microbenchmarkSiddhesh Poyarekar2022-05-061-0/+1
| | | | | | | | Add a simple benchmark that measures wcrtomb performance with various locales with 1-4 byte characters. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* benchtests: Better libmvec integrationSiddhesh Poyarekar2022-04-291-15/+17
| | | | | | | | Improve libmvec benchmark integration so that in future other architectures may be able to run their libmvec benchmarks as well. This now allows libmvec benchmarks to be run with `make BENCHSET=bench-math`. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* benchtests: Add UNSUPPORTED benchmark statusSiddhesh Poyarekar2022-04-291-5/+18
| | | | | | | | | | | | The libmvec benchmarks print a message indicating that a certain CPU feature is unsupported and exit prematurelyi, which breaks the JSON in bench.out. Handle this more elegantly in the bench makefile target by adding support for an UNSUPPORTED exit status (77) so that bench.out continues to have output for valid tests. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* benchtests: Add pthread-mutex-locks benchWangyang Guo2022-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | Benchmark for testing pthread mutex locks performance with different threads and critical sections. The test configuration consists of 3 parts: 1. thread number 2. critical-section length 3. non-critical-section length Thread number starts from 1 and increased by 2x until num of CPU cores (nprocs). An additional over-saturation case (1.25 * nprocs) is also included. Critical-section is represented by a loop of shared do_filler(), length can be determined by the loop iters. Non-critical-section is similiar to the critical-section, except it's based on non-shared do_filler(). Currently, adaptive pthread_mutex lock is tested.
* benchtests: Use "=" instead of ":=" [BZ #28970]H.J. Lu2022-03-161-2/+4
| | | | | | Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches to bench and benchset. This fixes BZ #28970. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* benchtests: Generate .d dependency files [BZ #28922]H.J. Lu2022-02-251-2/+6
| | | | | | 1. Add all .o files to extra-objs. 2. Include ../Rules after extra-objs has been set. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* benchtests: Add benches for memset with 0 valueH.J. Lu2022-02-231-0/+3
| | | | | | | | | memset with zero as the value to set is by far the majority value (99%+ for Python3 and GCC). Add bench-memset-zero-large.c, bench-memset-zero-walk.c and bench-memset-zero.c to measure memset implementations for zeroing. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* benchtests: Add benches for bzeroH.J. Lu2022-02-081-0/+3
| | | | Add bench-bzero-large.c, bench-bzero-walk.c and bench-bzero.c.
* benchtests: Sort benches in MakefileH.J. Lu2022-02-071-19/+110
| | | | Put one bench per line and sort them.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "benchtests: Add acosf function to bench-math"Sunil K Pandey2021-11-051-1/+0
| | | | This reverts commit 79d0fc65395716c1d95931064c7bf37852203c66.
* benchtests: Add hypotfAdhemerval Zanella2021-11-011-0/+1
| | | | | | | Based on random input arguments. About 85% tuples have exponents of the two arguments close together (+-1 range). Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* benchtests: Add acosf function to bench-mathSunil K Pandey2021-10-291-0/+1
| | | | | | | | | | | | | | | | | | Add acosf function to bench-math and copy acosf-inputs to benchtests. Motivation for this patch is to prepare for upcoming libmvec new functions. Float and double version of libmvec functions stays together. acosf-inputs file generated from acos-inputs file using following scaling formula: f = d * (FLT_MAX/DBL_MAX) Where d is input(double) and f is output(float). If scaled float value is duplicate in new input file, nextafterf() function used to find next float value, ensuring no duplicates. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* Benchtests: Add benchtests for __memcmpeqNoah Goldstein2021-10-271-1/+1
| | | | | | No bug. This commit adds __memcmpeq benchmarks. The benchmarks just use the existing ones in memcmp. This will be useful for testing implementations of __memcmpeq that do not just alias memcmp.
* bench-math: Sort and put each bench per lineH.J. Lu2021-10-231-6/+62
| | | | | | Sort and put each math bench per line to prepare for new math benches. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* benchtests: Building benchmarks as static executablesH.J. Lu2021-10-041-7/+19
| | | | | | | | | | | | Building benchmarks as static executables: ========================================= To build benchmarks as static executables, on the build system, run: $ make STATIC-BENCHTESTS=yes bench-build You can copy benchmark executables to another machine and run them without copying the source nor build directories.
* add workload traces for cbrtlPaul Zimmermann2021-05-101-0/+4
| | | | | | These workload traces cover the whole "long double" range. This patch was prepared with the help of Adhemerval Zanella. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* add workload traces for missing functions (double format)Paul Zimmermann2021-03-291-4/+5
| | | | | | | | | | This patch adds workload traces for all double format functions where such files are missing. For each function, a set of 1000 random values is generated at random using SageMath, such that the output values are meaningful (for example avoiding too large inputs for exp10 where the output would be +Inf). More details about the generated values are given at the beginning of each file. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* benchtests: Add ilogb* testsRaphael Moreira Zinsly2021-03-161-2/+2
| | | | Add a benchtest to ilogb, ilogbf and ilogbf128 based on the logb* benchtests.
* benchtests: Do not build bench-timing-type with MODULE_NAME=libcArjun Shankar2021-01-261-7/+7
| | | | | | | | | Since commit 2682695e5c7a, `make bench-build' with `--enable-static-pie' fails due to bench-timing-type being incorrectly built with MODULE_NAME set to `libc'. This commit sets MODULE_NAME to nonlib, thus fixing the build failure. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | 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
* New benchtest: pthread locksDJ Delorie2020-10-211-1/+2
| | | | | | | | Performance benchmarks for various posix locks: mutex, rwlock, spinlock, condvar, and semaphore. Each test is performed with an empty loop body or with a computationally "interesting" (i.e. difficult to optimize away, and used just to allow lock code to be "hidden" in the filler's CPU cycles).
* benchtests: Run _Float128 tests only on architectures that support itArjun Shankar2020-09-231-1/+5
| | | | | | | | | | __float128 is a non-standard name and is not available on some architectures (like aarch64 or s390x) even though they may support the standard _Float128 type. Other architectures (like armv7) don't support quad-precision floating-point operations at all. This commit replaces benchtests references to __float128 with _Float128 and runs the corresponding tests only on architectures that support it.
* benchtests: Add "workload" traces for sinf128Paul Zimmermann2020-09-101-1/+1
| | | | | This patch adds workload traces for sinf128 in binary32. The trace is made of 1000 random numbers, generated with SageMath.
* benchtests: Add "workload" traces for powf128Paul Zimmermann2020-09-101-1/+1
| | | | | This patch adds workload traces for pow in binary128. The trace is made of 1000 random numbers, generated with SageMath.
* benchtests: Add "workload" traces for expf128Paul Zimmermann2020-09-101-1/+1
| | | | | This patch adds workload traces for exp in binary128. The trace is made of 1000 random numbers, generated with SageMath.
* benchtests: Add exp10f benchmarkAdhemerval Zanella2020-06-191-1/+2
| | | | | | It is based on expf one by converting each line with the formula: new_val = (float) log10 (exp ((double) old_val))
* benchtests: Restore the clock_gettime optionH.J. Lu2020-06-051-0/+6
| | | | | | | | | | | | | | commit 7621e38bf3c58b2d0359545f1f2898017fd89d05 Author: Wilco Dijkstra <Wilco.Dijkstra@arm.com> Date: Tue Jan 29 17:43:45 2019 +0000 Add generic hp-timing support removed the clock_gettime option. Restore the clock_gettime option for some x86 CPUs on which value from RDTSC may not be incremented at a fixed rate. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add benchtests for roundeven and roundevenf.Shen-Ta Hsieh2020-03-271-2/+4
| | | | | This patch adds benchtests for the roundeven and roundevenf functions. The inputs are copied from trunc-inputs.
* Run bench-timing-type with newly built libc.Joseph Myers2020-01-201-1/+4
| | | | | benchtests/timing-type is built with the newly built libc, so should be run with it like actual tests and benchmarks.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* benchtests: Add logb{f} benchmarkAdhemerval Zanella2019-07-081-1/+1
| | | | | | | | * benchtests/Makefile (bench-math): Add logb. * benchtests/logb-inputs: New file. * benchtests/logbf-inputs: New file. Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
* benchtests: hypot benchmarkAdhemerval Zanella2019-07-081-1/+1
| | | | | | | | | | Inputs are based on argument reductions from generic and powerpc implementation. * benchtests/Makefile (bench-math): Add hypot. * benchtests/hypot-inputs: New file. Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
* benchtests: Add isnan/isinf/isfinite benchmarkAdhemerval Zanella2019-06-121-1/+4
| | | | | | | | | | | * benchtests/Makefile (bench-math): Add isnan, isinf, and isfinite. (CFLAGS-bench-isnan.c, CFLAGS-bench-isinf.c, CFLAGS-bench-isfinite.c): New rule. * benchtests/isnan-input: New file. * benchtests/isinf-input: New file. * benchtests/isfinite-input: New file. Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
* benchtests: Enable BIND_NOW if configured with --enable-bind-nowFlorian Weimer2019-04-251-2/+10
| | | | | | | | | | | Benchmarks should reflect distribution build policies, so it makes sense to honor the BIND_NOW configuration for them. This commit keeps using $(+link-tests), so that the benchmarks are linked according to the --enable-hardcoded-path-in-tests configure option. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Reduce benchtests timeWilco Dijkstra2019-04-241-2/+2
| | | | | | | | | | | Reduce the total time taken by benchtests. The malloc thread test takes 4 minutes to run which is significantly more than most other tests. Reduce this to a more reasonable 40 seconds. The math tests take 10 seconds each, eventhough all they do is loop on the same input. Anything more than 1 second runtime is way overkill, so set the limit to 1 second. * benchtests/Makefile (BENCH_DURATION): Set to 1 second. * benchtests/bench-malloc-thread.c (BENCH_DURATION): Set to 10 seconds.
* Add generic hp-timing supportWilco Dijkstra2019-03-221-6/+0
| | | | | | | | | | | | | | | | | Add missing generic hp_timing support. It uses clock_gettime (CLOCK_MONOTONIC) which has unspecified starting time, nano-second accuracy, and should faster on architectures that implementes the symbol as vDSO. Checked on aarch64-linux-gnu, x86_64-linux-gnu, and i686-linux-gnu. I also checked the builds for all afected ABIs. * benchtests/Makefile (USE_CLOCK_GETTIME) Remove. * benchtests/README: Update description. * benchtests/bench-timing.h: Default to hp-timing. * sysdeps/generic/hp-timing.h (HP_TIMING_DIFF, HP_TIMING_ACCUM_NT, HP_TIMING_PRINT): Remove. (HP_TIMING_NOW): Add generic implementation. (hp_timing_t): Change to uint64_t.
* Add malloc micro benchmarkWilco Dijkstra2019-02-141-5/+13
| | | | | | | | | | | | | Add a malloc micro benchmark to enable accurate testing of the various paths in malloc and free. The benchmark does a varying number of allocations of a given block size, then frees them again. It tests 3 different scenarios: single-threaded using main arena, multi-threaded using thread-arena, main arena with SINGLE_THREAD_P false. * benchtests/Makefile: Add malloc-simple benchmark. * benchtests/bench-malloc-simple.c: New benchmark.
* String benchtest cleanupWilco Dijkstra2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continue cleanup of the string benchtests. Remove simplistic byte-oriented versions with faster generic implementations. Remove bcopy/bzero benchmarks (bcopy/bzero are obsolete and never emitted by compilers). Remove builtin versions of memcpy, memset and strlen. Remove all remaining "stupid" implementations given they are always slower than the "simple" variants and thus don't add anything useful. * benchtests/bench-strcasecmp.c (stupid_strcasecmp): Remove. * benchtests/bench-strcasestr.c (stupid_strcasestr): Remove. * benchtests/bench-strchr.c (stupid_strchr): Remove. * benchtests/bench-strcmp.c (stupid_strcmp): Remove. * benchtests/bench-strcspn.c (stupid_strcspn): Remove. * benchtests/bench-strlen.c (builtin_strlen): Remove. * benchtests/bench-strncasecmp.c (stupid_strncasecmp): Remove. * benchtests/bench-strncmp.c (stupid_strncmp): Remove. * benchtests/bench-strpbrk.c (stupid_strpbrk): Remove. * benchtests/bench-strspn.c (stupid_strspn): Remove. * benchtests/Makefile: Remove bench-bcopy.c and bench-bzero.c. * benchtests/bench-bcopy.c: Delete file. * benchtests/bench-bzero.c: Likewise. * benchtests/bench-memccpy.c (stupid_memccpy): Remove. (simple_memccpy): Remove. (generic_memccpy): Add function. * benchtests/bench-memcpy.c: (builtin_memcpy): Remove. * benchtests/bench-memmove.c (simple_bcopy): Remove. * benchtests/bench-mempcpy.c (simple_mempcpy): Remove. (generic_mempcpy): Add new function. * benchtests/bench-memset.c (simple_bzero): Remove. (builtin_bzero): Remove. (builtin_memset): Remove. * benchtests/bench-rawmemchr.c (simple_rawmemchr): Remove. (generic_rawmemchr): Add new function.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * 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.
* Patch to require Python 3.4 or later to build glibc.Joseph Myers2018-10-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes Python 3.4 or later a required tool for building glibc, so allowing changes of awk, perl etc. code used in the build and test to Python code without any such changes needing makefile conditionals or to handle older Python versions. This patch makes the configure test for Python check the version and give an error if Python is missing or too old, and removes makefile conditionals that are no longer needed. It does not itself convert any code from another language to Python, and does not remove any compatibility with older Python versions from existing scripts. Tested for x86_64. * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set critic_missing for versions before 3.4. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document requirement for Python to build glibc. * INSTALL: Regenerated. * Rules [PYTHON]: Make code unconditional. * benchtests/Makefile [PYTHON]: Likewise. * conform/Makefile [PYTHON]: Likewise. * manual/Makefile [PYTHON]: Likewise. * math/Makefile [PYTHON]: Likewise.