summaryrefslogtreecommitdiff
path: root/benchtests
AgeCommit message (Collapse)Author
2016-01-13Use $(PYTHON) to run benchtests python files.Carlos O'Donell
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-12-09benchtests: ffs and ffsll are string functions, not mathSiddhesh Poyarekar
The ffs and ffsll functions were listed as math functions when they are actually defined in strings.h and string.h respectively. Shuffle around the Makefile variables a bit and make a separate space for ffs and ffsll.
2015-12-09benchtests: Add inputs from sin and cos to sincosSiddhesh Poyarekar
The sincos benchmark has only about a dozen inputs that don't measure the impact of changes to various passes. Since much of the code properties are inherited from sin and cos, copy those inputs in to get more comprehensive coverage.
2015-11-17benchtests: Mark output variables as usedSiddhesh Poyarekar
Prevent function calls that don't return anything from being optimized out by the compiler by marking its input variables as used. This prevents the sincos function call from being optimized out in the benchmark.
2015-09-18Add a new benchmark for isinf/isnan/isnormal/isfinite/fpclassify. The test ↵Wilco Dijkstra
uses 2 arrays with 1024 doubles, one with 99% finite FP numbers (10% zeroes, 10% negative) and 1% inf/NaN, the other with 50% inf, and 50% Nan. ChangeLog: 2015-09-18 Wilco Dijkstra <wdijkstr@arm.com> * benchtests/Makefile: Add bench-math-inlines, link with libm. * benchtests/bench-math-inlines.c: New benchmark. * benchtests/bench-util.h: New file. * benchtests/bench-util.c: New file. * benchtests/bench-skeleton.c: Add include of bench-util.c/h.
2015-08-26S390: Optimize wmemcmp.Stefan Liebler
This patch provides optimized version of wmemcmp with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/wmemcmp-c.c: New File. * sysdeps/s390/multiarch/wmemcmp-vx.S: Likewise. * sysdeps/s390/multiarch/wmemcmp.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add wmemcmp functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for wmemcmp. * benchtests/bench-wmemcmp.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wmemcmp.
2015-08-26S390: Optimize wmemset.Stefan Liebler
This patch provides optimized version of wmemset with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/wmemset-c.c: New File. * sysdeps/s390/multiarch/wmemset-vx.S: Likewise. * sysdeps/s390/multiarch/wmemset.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add wmemset functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for wmemset. * wcsmbs/wmemset.c: Use WMEMSET if defined. * string/test-memset.c: Add wmemset support. * wcsmbs/test-wmemset.c: New File. * wcsmbs/Makefile (strop-tests): Add wmemset. * benchtests/bench-memset.c: Add wmemset support. * benchtests/bench-wmemset.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wmemset.
2015-08-26S390: Optimize memchr, rawmemchr and wmemchr.Stefan Liebler
This patch provides optimized versions of memchr, rawmemchr and wmemchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/memchr-vx.S: New File. * sysdeps/s390/multiarch/memchr.c: Likewise. * sysdeps/s390/multiarch/rawmemchr-c.c: Likewise. * sysdeps/s390/multiarch/rawmemchr-vx.S: Likewise. * sysdeps/s390/multiarch/rawmemchr.c: Likewise. * sysdeps/s390/multiarch/wmemchr-c.c: Likewise. * sysdeps/s390/multiarch/wmemchr-vx.S: Likewise. * sysdeps/s390/multiarch/wmemchr.c: Likewise. * sysdeps/s390/s390-32/multiarch/memchr.c: Likewise. * sysdeps/s390/s390-64/multiarch/memchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memchr, wmemchr and rawmemchr functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for memchr, rawmemchr and wmemchr. * wcsmbs/wmemchr.c: Use WMEMCHR if defined. * string/test-memchr.c: Add wmemchr support. * wcsmbs/test-wmemchr.c: New File. * wcsmbs/Makefile (strop-tests): Add wmemchr. * benchtests/bench-memchr.c: Add wmemchr support. * benchtests/bench-wmemchr.c: New File. * benchtests/Makefile (wcsmbs-bench): wmemchr.
2015-08-26S390: Optimize strcspn and wcscspn.Stefan Liebler
This patch provides optimized versions of strcspn and wcscspn with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strcspn-c.c: New File. * sysdeps/s390/multiarch/strcspn-vx.S: Likewise. * sysdeps/s390/multiarch/strcspn.c: Likewise. * sysdeps/s390/multiarch/wcscspn-c.c: Likewise. * sysdeps/s390/multiarch/wcscspn-vx.S: Likewise. * sysdeps/s390/multiarch/wcscspn.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcspn and wcscspn functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strcspn, wcscspn. * wcsmbs/wcscspn.c: Use WCSCSPN if defined. * string/test-strcspn.c: Add wcscspn support. * wcsmbs/test-wcscspn.c: New File. * wcsmbs/Makefile (strop-tests): Add wcscspn. * benchtests/bench-strcspn.c: Add wcscspn support. * benchtests/bench-wcscspn.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcscspn.
2015-08-26S390: Optimize strpbrk and wcspbrk.Stefan Liebler
This patch provides optimized versions of strpbrk and wcspbrk with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strpbrk-c.c: New File. * sysdeps/s390/multiarch/strpbrk-vx.S: Likewise. * sysdeps/s390/multiarch/strpbrk.c: Likewise. * sysdeps/s390/multiarch/wcspbrk-c.c: Likewise. * sysdeps/s390/multiarch/wcspbrk-vx.S: Likewise. * sysdeps/s390/multiarch/wcspbrk.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strpbrk and wcspbrk functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strpbrk, wcspbrk. * wcsmbs/wcspbrk.c: Use WCSPBRK if defined. * string/test-strpbrk.c: Add wcspbrk support. * wcsmbs/test-wcspbrk.c: New File. * wcsmbs/Makefile (strop-tests): Add wcspbrk. * benchtests/bench-strpbrk.c: Add wcspbrk support. * benchtests/bench-wcspbrk.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcspbrk.
2015-08-26S390: Optimize strspn and wcsspn.Stefan Liebler
This patch provides optimized versions of strspn and wcsspn with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strspn-c.c: New File. * sysdeps/s390/multiarch/strspn-vx.S: Likewise. * sysdeps/s390/multiarch/strspn.c: Likewise. * sysdeps/s390/multiarch/wcsspn-c.c: Likewise. * sysdeps/s390/multiarch/wcsspn-vx.S: Likewise. * sysdeps/s390/multiarch/wcsspn.c: Likewise. * wcsmbs/wcsspn.c: Use WCSSPN if defined. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strspn and wcsspn functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strspn, wcsspn. * string/test-strspn.c: Add wcsspn support. * wcsmbs/test-wcsspn.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsspn. * benchtests/bench-strspn.c: Add wcsspn support. * benchtests/bench-wcsspn.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsspn.
2015-08-26S390: Optimize strrchr and wcsrchr.Stefan Liebler
This patch provides optimized versions of strrchr and wcsrchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strrchr-c.c: New File. * sysdeps/s390/multiarch/strrchr-vx.S: Likewise. * sysdeps/s390/multiarch/strrchr.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-c.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-vx.S: Likewise. * sysdeps/s390/multiarch/wcsrchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strrchr and wcsrchr functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strrchr, wcsrchr. * benchtests/bench-wcsrchr.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsrchr.
2015-08-26S390: Optimize strchrnul and wcschrnul.Stefan Liebler
This patch provides optimized versions of strchrnul and wcschrnul with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strchrnul-c.c: New File. * sysdeps/s390/multiarch/strchrnul-vx.S: Likewise. * sysdeps/s390/multiarch/strchrnul.c: Likewise. * sysdeps/s390/multiarch/wcschrnul-c.c: Likewise. * sysdeps/s390/multiarch/wcschrnul-vx.S: Likewise. * sysdeps/s390/multiarch/wcschrnul.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strchrnul and wcschrnul functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strchrnul, wcschrnul. * wcsmbs/wcschrnul.c: Use WCSCHRNUL if defined. * string/test-strchr.c: Add wcschrnul support. * wcsmbs/test-wcschrnul.c: New File. * wcsmbs/Makefile (strop-tests): Add wcschrnul. * benchtests/bench-strchr.c: Add wcschrnul support. * benchtests/bench-wcschrnul.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcschrnul.
2015-08-26S390: Optimize strchr and wcschr.Stefan Liebler
This patch provides optimized versions of strchr and wcschr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strchr-c.c: New File. * sysdeps/s390/multiarch/strchr-vx.S: Likewise. * sysdeps/s390/multiarch/strchr.c: Likewise. * sysdeps/s390/multiarch/wcschr-c.c: Likewise. * sysdeps/s390/multiarch/wcschr-vx.S: Likewise. * sysdeps/s390/multiarch/wcschr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strchr and wcschr functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strchr, wcschr. * string/strchr.c (STRCHR): Define and use macro. * benchtests/bench-wcschr.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcschr.
2015-08-26S390: Optimize strncmp and wcsncmp.Stefan Liebler
This patch provides optimized versions of strncmp and wcsncmp with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strncmp-c.c: New File. * sysdeps/s390/multiarch/strncmp-vx.S: Likewise. * sysdeps/s390/multiarch/strncmp.c: Likewise. * sysdeps/s390/multiarch/wcsncmp-c.c: Likewise. * sysdeps/s390/multiarch/wcsncmp-vx.S: Likewise. * sysdeps/s390/multiarch/wcsncmp.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncmp and wcsncmp functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strncmp, wcsncmp. * wcsmbs/wcsncmp.c (WCSNCMP): Define and use macro. * benchtests/bench-strncmp.c: Add wcsncmp support. * benchtests/bench-wcsncmp.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsncmp.
2015-08-26S390: Optimize strcmp and wcscmp.Stefan Liebler
This patch provides optimized versions of strcmp and wcscmp with the z13 vector instructions. The architecture specific string.h had a typo, which leads to ommiting the inline version in this file if __USE_STRING_INLINES is defined. Tested this inline version by tweaking test-strcmp.c. ChangeLog: * sysdeps/s390/multiarch/strcmp-vx.S: New File. * sysdeps/s390/multiarch/strcmp.c: Likewise. * sysdeps/s390/multiarch/wcscmp-c.c: Likewise. * sysdeps/s390/multiarch/wcscmp-vx.S: Likewise. * sysdeps/s390/multiarch/wcscmp.c: Likewise. * sysdeps/s390/s390-32/multiarch/strcmp.c: Likewise. * sysdeps/s390/s390-64/multiarch/strcmp.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcmp and wcscmp functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strcmp, wcscmp. * string/strcmp.c (STRCMP): Define and use macro. * benchtests/bench-wcscmp.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcscmp. * sysdeps/s390/bits/string.h: Fix typo: _HAVE_STRING_ARCH_strcmp instead of _HAVE_STRING_ARCH_memchr.
2015-08-26S390: Optimize strncat wcsncat.Stefan Liebler
This patch provides optimized versions of strncat and wcsncat with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strncat-c.c: New File. * sysdeps/s390/multiarch/strncat-vx.S: Likewise. * sysdeps/s390/multiarch/strncat.c: Likewise. * sysdeps/s390/multiarch/wcsncat-c.c: Likewise. * sysdeps/s390/multiarch/wcsncat-vx.S: Likewise. * sysdeps/s390/multiarch/wcsncat.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncat and wcsncat functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strncat, wcsncat. * wcsmbs/wcsncat.c (WCSNCAT): Define and use macro. * string/test-strncat.c: Add wcsncat support. * wcsmbs/test-wcsncat.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsncat. * benchtests/bench-strncat.c: Add wcsncat support. * benchtests/bench-wcsncat.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsncat.
2015-08-26S390: Optimize strcat and wcscat.Stefan Liebler
This patch provides optimized versions of strcat and wcscat with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strcat-c.c: New File. * sysdeps/s390/multiarch/strcat-vx.S: Likewise. * sysdeps/s390/multiarch/strcat.c: Likewise. * sysdeps/s390/multiarch/wcscat-c.c: Likewise. * sysdeps/s390/multiarch/wcscat-vx.S: Likewise. * sysdeps/s390/multiarch/wcscat.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcat and wcscat functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strcat, wcscat. * string/strcat.c (STRCAT): Define and use macro. * wcsmbs/wcscat.c: Use WCSCAT if defined. * string/test-strcat.c: Add wcscat support. * wcsmbs/test-wcscat.c: New File. * wcsmbs/Makefile (strop-tests): Add wcscat. * benchtests/bench-strcat.c: Add wcscat support. * benchtests/bench-wcscat.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcscat.
2015-08-26S390: Optimize stpncpy and wcpncpy.Stefan Liebler
This patch provides optimized versions of stpncpy and wcpncpy with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/stpncpy-c.c: New File. * sysdeps/s390/multiarch/stpncpy-vx.S: Likewise. * sysdeps/s390/multiarch/stpncpy.c: Likewise. * sysdeps/s390/multiarch/wcpncpy-c.c: Likewise. * sysdeps/s390/multiarch/wcpncpy-vx.S: Likewise. * sysdeps/s390/multiarch/wcpncpy.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpncpy and wcpncpy functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for stpncpy, wcpncpy. * wcsmbs/wcpncpy.c: Use WCPNCPY if defined. * string/test-stpncpy.c: Add wcpncpy support. * wcsmbs/test-wcpncpy.c: New File. * wcsmbs/Makefile (strop-tests): Add wcpncpy. * benchtests/bench-stpncpy.c: Add wcpncpy support. * benchtests/bench-wcpncpy.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcpncpy.
2015-08-26S390: Optimize strncpy and wcsncpy.Stefan Liebler
This patch provides optimized versions of strncpy and wcsncpy with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strncpy-vx.S: New File. * sysdeps/s390/multiarch/strncpy.c: Likewise. * sysdeps/s390/multiarch/wcsncpy-c.c: Likewise. * sysdeps/s390/multiarch/wcsncpy-vx.S: Likewise. * sysdeps/s390/multiarch/wcsncpy.c: Likewise. * sysdeps/s390/s390-32/multiarch/strncpy.c: Likewise. * sysdeps/s390/s390-64/multiarch/strncpy.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncpy and wcsncpy functions. * wcsmbs/wcsncpy.c: Use WCSNCPY if defined. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strncpy, wcsncpy. * string/test-strncpy.c: Add wcsncpy support. * wcsmbs/test-wcsncpy.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsncpy. * benchtests/bench-strncpy.c: Add wcsncpy support. * benchtests/bench-wcsncpy.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsncpy
2015-08-26S390: Optimize stpcpy and wcpcpy.Stefan Liebler
This patch provides optimized versions of stpcpy and wcpcpy with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/stpcpy-c.c: New File. * sysdeps/s390/multiarch/stpcpy-vx.S: Likewise. * sysdeps/s390/multiarch/stpcpy.c: Likewise. * sysdeps/s390/multiarch/wcpcpy-c.c: Likewise. * sysdeps/s390/multiarch/wcpcpy-vx.S: Likewise. * sysdeps/s390/multiarch/wcpcpy.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpcpy and wcpcpy functions. * string/stpcpy.c: Use STPCPY if defined. * wcsmbs/wcpcpy.c: Use WCPCPY if defined. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for stpcpy, wcpcpy. * string/test-stpcpy.c: Add wcpcpy support. * wcsmbs/test-wcpcpy.c: New File. * wcsmbs/Makefile (strop-tests): Add wcpcpy. * benchtests/bench-stpcpy.c: Add wcpcpy support. * benchtests/bench-wcpcpy.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcpcpy.
2015-08-26S390: Optimize strcpy and wcscpy.Stefan Liebler
This patch provides optimized versions of strcpy and wcscpy with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strcpy-vx.S: New File. * sysdeps/s390/multiarch/strcpy.c: Likewise. * sysdeps/s390/multiarch/wcscpy-c.c: Likewise. * sysdeps/s390/multiarch/wcscpy-vx.S: Likewise. * sysdeps/s390/multiarch/wcscpy.c: Likewise. * sysdeps/s390/s390-32/multiarch/strcpy.c: Likewise. * sysdeps/s390/s390-64/multiarch/strcpy.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcpy and wcscpy functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strcpy, wcscpy. * benchtests/bench-wcscpy.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcscpy.
2015-08-26S390: Optimize strnlen and wcsnlen.Stefan Liebler
This patch provides optimized versions of strnlen and wcsnlen with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strnlen-c.c: New File. * sysdeps/s390/multiarch/strnlen-vx.S: Likewise. * sysdeps/s390/multiarch/strnlen.c: Likewise. * sysdeps/s390/multiarch/wcsnlen-c.c: Likewise. * sysdeps/s390/multiarch/wcsnlen-vx.S: Likewise. * sysdeps/s390/multiarch/wcsnlen.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strnlen and wcsnlen functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strnlen, wcsnlen. * wcsmbs/wcsnlen.c: Use WCSNLEN if defined. * string/test-strnlen.c: Add wcsnlen support. * wcsmbs/test-wcsnlen.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsnlen. * benchtests/bench-strnlen.c: Add wcsnlen support. * benchtests/bench-wcsnlen.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsnlen.
2015-08-26S390: Optimize strlen and wcslen.Stefan Liebler
This patch provides optimized versions of strlen and wcslen with the z13 vector instructions. The helper macro IFUNC_VX_IMPL is introduced and is used to register all __<func>_c() and __<func>_vx() functions within __libc_ifunc_impl_list() to the ifunc test framework. ChangeLog: * sysdeps/s390/multiarch/Makefile: New File. * sysdeps/s390/multiarch/strlen-c.c: Likewise. * sysdeps/s390/multiarch/strlen-vx.S: Likewise. * sysdeps/s390/multiarch/strlen.c: Likewise. * sysdeps/s390/multiarch/wcslen-c.c: Likewise. * sysdeps/s390/multiarch/wcslen-vx.S: Likewise. * sysdeps/s390/multiarch/wcslen.c: Likewise. * string/strlen.c (STRLEN): Define and use macro. * sysdeps/s390/multiarch/ifunc-impl-list.c (IFUNC_VX_IMPL): New macro function. (__libc_ifunc_impl_list): Add ifunc test for strlen, wcslen. * benchtests/Makefile (wcsmbs-bench): New variable. (string-bench-all): Added wcsmbs-bench. * benchtests/bench-wcslen.c: New File.
2015-07-20Reflect renaming of bh_IN and tu_IN in SUPPORTED file [BZ #17475]Khem Raj
2015-06-19Fix benchtests build failure after 'add benchmark for strcoll'Stefan Liebler
This patch fixes implicit declaration of function strdup, strtok, strcoll, strchr and removes unused variable res. ChangeLog: * benchtests/bench-strcoll.c: Include string.h. (main): Remove unused variable res.
2015-06-01benchtest: script to compare two benchmarksSiddhesh Poyarekar
This script is a sample implementation that uses import_bench to construct two benchmark objects and compare them. If detailed timing information is available (when one does `make DETAILED=1 bench`), it writes out graphs for all functions it benchmarks and prints significant differences in timings of the two benchmark runs. If detailed timing information is not available, it points out significant differences in aggregate times. Call this script as follows: compare_bench.py schema_file.json bench1.out bench2.out Alternatively, if one wants to set a different threshold for warnings (default is a 10% difference): compare_bench.py schema_file.json bench1.out bench2.out 25 The threshold in the example above is 25%. schema_file.json is the JSON schema (which is $srcdir/benchtests/scripts/benchout.schema.json for the benchmark output file) and bench1.out and bench2.out are the two benchmark output files to compare. The key functionality here is the compress_timings function which groups together points that are close together into a single point that is the mean of all its representative points. Any point in such a group is at most 1.5x the smallest point in that group. The detailed derivation is a comment in the function. * benchtests/scripts/compare_bench.py: New file. * benchtests/scripts/import_bench.py (mean): New function. (split_list): Likewise. (do_for_all_timings): Likewise. (compress_timings): Likewise.
2015-06-01New module to import and process benchmark outputSiddhesh Poyarekar
This is the beginning of a module to import and process benchmark outputs. The module currently supports importing of a bench.out and validating it against a schema file. In future this could grow a set of routines that benchmark consumers may find useful to build their own analysis tools. I have altered validate_bench to use this module too. * benchtests/scripts/import_bench.py: New file. * benchtests/scripts/validate_benchout.py: Import import_bench instead of jsonschema. (validate_bench): Remove function. (main): Use import_bench.
2015-05-21Add sprintf benchmark.Carlos O'Donell
Tests position and non-positional arguments with two test string.
2015-05-13Add strcoll benchmarkLeonhard Holz
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-12-31powerpc: POWER7 strcpy optimization for unaligned stringsRajalakshmi Srinivasaraghavan
This patch optimizes strcpy for ppc64/power7 for unaligned source or destination address. The source or destination address is aligned to doubleword and data is shifted based on the alignment and added with the previous loaded data to be written as a doubleword. For each load, cmpb instruction is used for faster null check. The word aligned optimization is also removed, since the new unaligned code path shows better results handling word-aligned strings. More combination of unaligned inputs is also added in benchtest to measure the improvement.The new optimization shows 2 to 80% of performance improvement for longer string though it does not show big difference on string size less than 16 due to additional checks.
2014-11-26Remove TEST_IFUNC, tests-ifunc and *-ifunc.c tests.Joseph Myers
TEST_IFUNC is only tested in two headers, bench-string.h and test-string.h, after it gets defined by those headers, and it never gets undefined. Thus no defines of TEST_IFUNC are needed, and the *-ifunc.c tests that just define TEST_IFUNC and include other tests are also redundant, as is the code to remove $(tests-ifunc) and $(xtests-ifunc) conditionally from tests and xtests. This patch removes the useless defines and tests of TEST_IFUNC and the associated useless tests and makefile code. It thereby fixes a series of warnings "../string/test-string.h:21:0: warning: "TEST_IFUNC" redefined" where test-string.h defines TEST_IFUNC to empty, other files define it to 1 and this produces warnings. Tested for x86_64. * debug/test-stpcpy_chk-ifunc.c: Remove file. * debug/test-strcpy_chk-ifunc.c: Likewise. * wcsmbs/test-wcschr-ifunc.c: Likewise. * wcsmbs/test-wcscmp-ifunc.c: Likewise. * wcsmbs/test-wcscpy-ifunc.c: Likewise. * wcsmbs/test-wcslen-ifunc.c: Likewise. * wcsmbs/test-wcsrchr-ifunc.c: Likewise. * wcsmbs/test-wmemcmp-ifunc.c: Likewise. * Rules [$(multi-arch) = no] (tests): Do not filter out $(tests-ifunc). [$(multi-arch) = no] (xtests): Do not filter out $(xtests-ifunc). * debug/Makefile (tests-ifunc): Remove variable. (tests): Do not add $(tests-ifunc). * wcsmbs/Makefile (tests-ifunc): Remove variable. (tests): Do not add $(tests-ifunc). * benchtests/bench-string.h (TEST_IFUNC): Remove macro. [TEST_IFUNC]: Remove conditionals. * string/test-string.h (TEST_IFUNC): Remove macro. [TEST_IFUNC]: Remove conditionals.
2014-11-05benchtests: Add malloc microbenchmarkWill Newton
Add a microbenchmark for measuring malloc and free performance with varying numbers of threads. The benchmark allocates and frees buffers of random sizes in a random order and measures the overall execution time and RSS. Variants of the benchmark are run with 1, 8, 16 and 32 threads. The random block sizes used follow an inverse square distribution which is intended to mimic the behaviour of real applications which tend to allocate many more small blocks than large ones. ChangeLog: 2014-11-05 Will Newton <will.newton@linaro.org> * benchtests/Makefile: (bench-malloc): Add malloc thread scalability benchmark. * benchtests/bench-malloc-threads.c: New file.
2014-09-10PowerPC: memset optimization for POWER8/PPC64Adhemerval Zanella
This patch adds an optimized memset implementation for POWER8. For sizes from 0 to 255 bytes, a word/doubleword algorithm similar to POWER7 optimized one is used. For size higher than 255 two strategies are used: 1. If the constant is different than 0, the memory is written with altivec vector instruction; 2. If constant is 0, dbcz instructions are used. The loop is unrolled to clear 512 byte at time. Using vector instructions increases throughput considerable, with a double performance for sizes larger than 1024. The dcbz loops unrolls also shows performance improvement, by doubling throughput for sizes larger than 8192 bytes.
2014-07-03Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overheadRichard Henderson
Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either.
2014-06-19Remove unnecessary $(.)Siddhesh Poyarekar
The variable is not necessary, especially since it does not exist.
2014-06-11Validate bench.out against a JSON schemaSiddhesh Poyarekar
This patch adds a JSON schema for the benchmark output file and also adds a script that validates the generated output against the schema.
2014-06-06Don't require test wrappers to preserve environment variables, use more ↵Joseph Myers
consistent environment. One wart in the original support for test wrappers for cross testing, as noted in <https://sourceware.org/ml/libc-alpha/2012-10/msg00722.html>, is the requirement for test wrappers to pass a poorly-defined set of environment variables from the build system to the system running the glibc under test. Although some variables are passed explicitly via $(test-wrapper-env), including LD_* variables that simply can't be passed implicitly because of the side effects they'd have on the build system's dynamic linker, others are passed implicitly, including variables such as GCONV_PATH and LOCPATH that could potentially affect the build system's libc (so effectively relying on any such effects not breaking the wrappers). In addition, the code in cross-test-ssh.sh for preserving environment variables is fragile (it depends on how bash formats a list of exported variables, and could well break for multi-line variable definitions where the contents contain things looking like other variable definitions). This patch moves to explicitly passing environment variables via $(test-wrapper-env). Makefile variables that previously used $(test-wrapper) are split up into -before-env and -after-env parts that can be passed separately to the various .sh files used in testing, so those files can then insert environment settings between the two parts. The common default environment settings in make-test-out are made into a separate makefile variable that can also be passed to scripts, rather than many scripts duplicating those settings (for testing an installed glibc, it is desirable to have the GCONV_PATH setting on just one place, so just that one place needs to support it pointing to an installed sysroot instead of the build tree). The default settings are included in the variables such as $(test-program-prefix), so that if tests do not need any non-default settings they can continue to use single variables rather than the split-up variables. Although this patch cleans up LC_ALL=C settings (that being part of the common defaults), various LANG=C and LANGUAGE=C settings remain. Those are generally unnecessary and I propose a subsequent cleanup to remove them. LC_ALL takes precedence over LANG, and while LANGUAGE takes precedence over LC_ALL, it only does so for settings other than LC_ALL=C. So LC_ALL=C on its own is sufficient to ensure the C locale, and anything that gets LC_ALL=C does not need the other settings. While preparing this patch I noticed some tests with .sh files that appeared to do nothing beyond what the generic makefile support for tests can do (localedata/tst-wctype.sh - the makefiles support -ENV variables and .input files - and localedata/tst-mbswcs.sh - just runs five tests that could be run individually from the makefile). So I propose another subsequent cleanup to move those to using the generic support instead of special .sh files. Tested x86_64 (native) and powerpc32 (cross). * Makeconfig (run-program-env): New variable. (run-program-prefix-before-env): Likewise. (run-program-prefix-after-env): Likewise. (run-program-prefix): Define in terms of new variables. (built-program-cmd-before-env): New variable. (built-program-cmd-after-env): Likewise. (built-program-cmd): Define in terms of new variables. (test-program-prefix-before-env): New variable. (test-program-prefix-after-env): Likewise. (test-program-prefix): Define in terms of new variables. (test-program-cmd-before-env): New variable. (test-program-cmd-after-env): Likewise. (test-program-cmd): Define in terms of new variables. * Rules (make-test-out): Use $(run-program-env). * scripts/cross-test-ssh.sh (env_blacklist): Remove variable. (help): Do not mention environment variables. Mention --timeoutfactor option. (timeoutfactor): New variable. (blacklist_exports): Remove function. (exports): Remove variable. (command): Do not include ${exports}. * manual/install.texi (Configuring and compiling): Do not mention test wrappers preserving environment variables. Mention that last assignment to a variable must take precedence. * INSTALL: Regenerated. * benchtests/Makefile (run-bench): Use $(run-program-env). * catgets/Makefile ($(objpfx)test1.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test2.cat): Do not specify environment variables explicitly. ($(objpfx)de/libc.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test-gencat.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)sample.SJIS.cat): Do not specify environment variables explicitly. * catgets/test-gencat.sh: Use test_program_cmd_before_env, run_program_env and test_program_cmd_after_env arguments. * elf/Makefile ($(objpfx)tst-pathopt.out): Use $(run-program-env). * elf/tst-pathopt.sh: Use run_program_env argument. * iconvdata/Makefile ($(objpfx)iconv-test.out): Use $(test-wrapper-env) and $(run-program-env). * iconvdata/run-iconv-test.sh: Use test_wrapper_env and run_program_env arguments. * iconvdata/tst-table.sh: Do not set GCONV_PATH explicitly. * intl/Makefile ($(objpfx)tst-gettext.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-gettext2.out): Likewise. * intl/tst-gettext.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * intl/tst-gettext2.sh: Likewise. * intl/tst-gettext4.sh: Do not set environment variables explicitly. * intl/tst-gettext6.sh: Likewise. * intl/tst-translit.sh: Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * malloc/tst-mtrace.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * math/Makefile (run-regen-ulps): Use $(run-program-env). * nptl/Makefile ($(objpfx)tst-tls6.out): Use $(run-program-env). * nptl/tst-tls6.sh: Use run_program_env argument. Set LANG=C explicitly with each use of ${test_wrapper_env}. * posix/Makefile ($(objpfx)wordexp-tst.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * posix/tst-getconf.sh: Do not set environment variables explicitly. * posix/wordexp-tst.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * stdio-common/tst-printf.sh: Do not set environment variables explicitly. * stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * stdlib/tst-fmtmsg.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. Split $test calls into $test_pre and $test. * timezone/Makefile (build-testdata): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). localedata/ChangeLog: * Makefile ($(addprefix $(objpfx),$(CTYPE_FILES))): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)sort-test.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-fmon.out): Use $(run-program-prefix-before-env), $(run-program-env) and $(run-program-prefix-after-env). ($(objpfx)tst-locale.out): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)tst-trans.out): Use $(run-program-prefix-before-env), $(run-program-env), $(run-program-prefix-after-env), $(test-program-prefix-before-env) and $(test-program-prefix-after-env). ($(objpfx)tst-ctype.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)tst-langinfo-static.out): Likewise. * gen-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * sort-test.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * tst-ctype.sh: Use tst_ctype_before_env, run_program_env and tst_ctype_after_env arguments. * tst-fmon.sh: Use run_program_prefix_before_env, run_program_env and run_program_prefix_after_env arguments. * tst-langinfo.sh: Use tst_langinfo_before_env, run_program_env and tst_langinfo_after_env arguments. * tst-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * tst-mbswcs.sh: Do not set environment variables explicitly. * tst-numeric.sh: Likewise. * tst-rpmatch.sh: Likewise. * tst-trans.sh: Use run_program_prefix_before_env, run_program_env, run_program_prefix_after_env, test_program_prefix_before_env and test_program_prefix_after_env arguments. * tst-wctype.sh: Use tst_wctype_before_env, run_program_env and tst_wctype_after_env arguments.
2014-05-26benchtests: Add new directive for benchmark initialization hookSiddhesh Poyarekar
Add a new 'init' directive that specifies the name of the function to call to do function-specific initialization. This is useful for benchmarks that need to do a one-time initialization before the functions are executed.
2014-05-16Use existing makefile variables for dependencies on glibc libraries.Joseph Myers
glibc's Makeconfig defines some variables such as $(libm) and $(libdl) for linking with libraries built by glibc, and nptl/Makeconfig (included by the toplevel Makeconfig) defines others such as $(shared-thread-library). In some places glibc's Makefiles use those variables when linking against the relevant libraries, but in other places they hardcode the location of the libraries in the build tree. This patch cleans up various places to use the variables that already exist (in the case of libm, replacing several duplicate definitions of a $(link-libm) variable in subdirectory Makefiles). (It's not necessarily exactly equivalent to what the existing code does - in particular, $(shared-thread-library) includes libpthread_nonshared, but is replacing places that just referred to libpthread.so. But I think that change is desirable on the general principle of linking things as close as possible to the way in which they would be linked with an installed library, unless there is a clear reason not to do so.) To support running tests with an installed copy of glibc without needing the full build tree from when that copy was built, I think it will be useful to use such variables more generally and systematically - every time the rules for building a test refer to some file from the build tree that's also installed by glibc, use a makefile variable so that the installed-testing case can point those variables to installed copies of the files. This patch just deals with straightforward cases where such variables already exist. It's quite possible some uses of $(shared-thread-library) should actually be a new $(thread-library) variable that's set appropriately in the --disable-shared case, if those uses would in fact work without shared libraries. I didn't change the status quo that those cases hardcode use of a shared library whether or not it's actually needed (but other uses such as $(libm) and $(libdl) would now get the static library if the shared library isn't built, when some previously hardcoded use of the shared library - if they actually need shared libraries, the test itself needs an enable-shared conditional anyway). Tested x86_64. * benchtests/Makefile ($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm), not $(common-objpfx)math/libm.so. ($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * elf/Makefile ($(objpfx)noload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. ($(objpfx)tst-audit8): Depend on $(libm), not $(common-objpfx)math/libm.so. * malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * math/Makefile ($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))): Depend on $(libm), not $(objpfx)libm.so. Do not condition on [$(build-shared) = yes]. ($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not $(common-objpfx)math/libm.so$(libm.so-version) or $(common-objpfx)math/libm.a depending on [$(build-shared) = yes]. * nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * setjmp/Makefile (link-libm): Remove variable. ($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm). * stdio-common/Makefile (link-libm): Remove variable. ($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm). * stdlib/Makefile (link-libm): Remove variable. ($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm). ($(objpfx)tst-strtod-round): Likewise. ($(objpfx)tst-tininess): Likewise. ($(objpfx)tst-strtod-underflow): Likewise. ($(objpfx)tst-strtod6): Likewise. ($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and $(libdl), not $(common-objpfx)nptl/libpthread.so and $(common-objpfx)dlfcn/libdl.so.
2014-04-15benchtests: Link against objects in build directorySiddhesh Poyarekar
Using -lm and -lpthread results in the shared objects in the system being used to link against. This happened to work for libm because there haven't been any changes to the libm ABI recently that could break the existing benchmarks. This doesn't always work for the pthread benchmarks. The correct way to build against libraries in the build directory is to have the binaries explicitly depend on them so that $(+link) can pick them up.
2014-04-11benchtests: Improve readability of JSON outputWill Newton
Add a small library to print JSON values and use it to improve the readability of the benchmark output and the readability of the benchmark code. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * benchtests/Makefile (extra-objs): Add json-lib.o. (bench-func): Tidy up JSON output. * benchtests/bench-skeleton.c: Include json-lib.h. (main): Use JSON library functions to do output of benchmark results. * benchtests/bench-timing-type.c (main): Output the timing type simply, leaving formatting to the user. * benchtests/json-lib.c: New file. * benchtests/json-lib.h: Likewise.
2014-04-10benchtests: Add pthread_once common-case test.Torvald Riegel
We have a single thread that runs a no-op initialization once and then repeatedly runs checks of the initialization (i.e., an acquire load and conditional jump) in a tight loop. This gives us, on average, the best-case latency of pthread_once (the initialization is the exactly-once slow path, and we're not looking at initialization-related synchronization overheads in this case).
2014-04-01benchtests: Build ffs and ffsl benchtests with -fno-builtinWill Newton
Without this flag it is possible that the compiler will optimize away the calls to ffs/ffsll. ChangeLog: 2014-04-01 Will Newton <will.newton@linaro.org> * benchtests/Makefile (CFLAGS-bench-ffs.c): Add -fno-builtin. (CFLAGS-bench-ffsll.c): Likewise.
2014-03-31benchtests: Add benchtests for ffs and ffsllWill Newton
Add benchtests for ffs and ffsll. There is no benchtest for ffsl as it is identical to one of the other functions. 2014-03-31 Will Newton <will.newton@linaro.org> * benchtests/Makefile (bench): Add ffs and ffsll to list of tests. * benchtests/ffs-inputs: New file. * benchtests/ffsll-inputs: Likewise.
2014-03-29Detailed benchmark outputs for functionsSiddhesh Poyarekar
This patch adds an option to get detailed benchmark output for functions. Invoking the benchmark with 'make DETAILED=1 bench' causes each benchmark program to store a mean execution time for each input it works on. This is useful to give a more comprehensive picture of performance of functions compared to just the single mean figure.
2014-03-29Make bench.out in json formatSiddhesh Poyarekar
This patch changes the output format of the main benchmark output file (bench.out) to an extensible format. I chose JSON over XML because in addition to being extensible, it is also not too verbose. Additionally it has good support in python. The significant change I have made in terms of functionality is to put timing information as an attribute in JSON instead of a string and to do that, there is a separate program that prints out a JSON snippet mentioning the type of timing (hp_timing or clock_gettime). The mean timing has now changed from iterations per unit to actual timing per iteration.
2014-03-29[benchtests] Use inputs file for modfSiddhesh Poyarekar
The modf benchmark can now use the framework since the introduction of output arguments.