about summary refs log tree commit diff
path: root/benchtests
Commit message (Collapse)AuthorAgeFilesLines
* benchtest: script to compare two benchmarksSiddhesh Poyarekar2015-06-012-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* New module to import and process benchmark outputSiddhesh Poyarekar2015-06-012-25/+71
| | | | | | | | | | | | | | | 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.
* Add sprintf benchmark.Carlos O'Donell2015-05-213-1/+19
| | | | | Tests position and non-positional arguments with two test string.
* Add strcoll benchmarkLeonhard Holz2015-05-1326-2/+16489
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-0248-48/+48
|
* powerpc: POWER7 strcpy optimization for unaligned stringsRajalakshmi Srinivasaraghavan2014-12-311-0/+16
| | | | | | | | | | | | | | | | 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.
* Remove TEST_IFUNC, tests-ifunc and *-ifunc.c tests.Joseph Myers2014-11-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* benchtests: Add malloc microbenchmarkWill Newton2014-11-052-3/+319
| | | | | | | | | | | | | | | | | | | | 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.
* PowerPC: memset optimization for POWER8/PPC64Adhemerval Zanella2014-09-101-0/+5
| | | | | | | | | | | | | | | | | | | 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.
* Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overheadRichard Henderson2014-07-032-8/+1
| | | | | 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.
* Remove unnecessary $(.)Siddhesh Poyarekar2014-06-191-1/+1
| | | | The variable is not necessary, especially since it does not exist.
* Validate bench.out against a JSON schemaSiddhesh Poyarekar2014-06-113-0/+129
| | | | | This patch adds a JSON schema for the benchmark output file and also adds a script that validates the generated output against the schema.
* Don't require test wrappers to preserve environment variables, use more ↵Joseph Myers2014-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* benchtests: Add new directive for benchmark initialization hookSiddhesh Poyarekar2014-05-263-1/+10
| | | | | | | 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.
* Use existing makefile variables for dependencies on glibc libraries.Joseph Myers2014-05-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* benchtests: Link against objects in build directorySiddhesh Poyarekar2014-04-151-23/+9
| | | | | | | | | | 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.
* benchtests: Improve readability of JSON outputWill Newton2014-04-115-23/+256
| | | | | | | | | | | | | | | | | | | | 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.
* benchtests: Add pthread_once common-case test.Torvald Riegel2014-04-104-1/+38
| | | | | | | | | 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).
* benchtests: Build ffs and ffsl benchtests with -fno-builtinWill Newton2014-04-011-0/+3
| | | | | | | | | | | | 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.
* benchtests: Add benchtests for ffs and ffsllWill Newton2014-03-313-3/+208
| | | | | | | | | | | | 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.
* Detailed benchmark outputs for functionsSiddhesh Poyarekar2014-03-293-2/+34
| | | | | | | | 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.
* Make bench.out in json formatSiddhesh Poyarekar2014-03-295-18/+66
| | | | | | | | | | | | | | 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.
* [benchtests] Use inputs file for modfSiddhesh Poyarekar2014-03-292-44/+4
| | | | | The modf benchmark can now use the framework since the introduction of output arguments.
* benchtests/bench-strtod.c: Increase timeout valueWill Newton2014-03-261-0/+3
| | | | | | | | | | | This benchmark can take longer than the default 2 seconds on slower platforms, so increase it to 10 seconds. ChangeLog: 2014-03-26 Will Newton <will.newton@linaro.org> * benchtests/bench-strtod.c (TIMEOUT): Define to 10.
* benchtests: Move bench.py to benchtests/scripts/Siddhesh Poyarekar2014-03-242-1/+300
| | | | | It makes much more sense to have all benchmarking-related scripts in a single place away from everything else.
* Implement benchmarking script in pythonSiddhesh Poyarekar2014-03-212-2/+4
| | | | | Implemented the benchmark script in python since it is much cleaner and simpler to maintain.
* Make strtok benchmark competive.Ondřej Bílka2014-02-281-57/+4
| | | | | We include a generic version of strtok to result which could be faster when underlying primitives are better optimized than current version.
* Consistently include Makeconfig after defining subdir.Joseph Myers2014-02-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I noted it was necessary to add includes of Makeconfig early in various subdirectory makefiles for the tests-special variable settings added by that patch to be conditional on configuration information. No-one commented on the general question there of whether Makeconfig should always be included immediately after the definition of subdir. This patch implements that early inclusion of Makeconfig in each directory (which is a lot easier than consistent placement of includes of Rules). Includes are added if needed, or moved up if already present. Subdirectory "all:" targets are removed, since Makeconfig provides one. There is potential for further cleanups I haven't done. Rules and Makerules have code such as ifneq "$(findstring env,$(origin headers))" "" headers := endif to override to empty any value of various variables that came from the environment. I think there is a case for Makeconfig setting all the subdirectory variables (other than subdir) to empty to ensure no outside value is going to take effect if a subdirectory fails to define a variable. (A list of such variables, possibly out of date and incomplete, is in manual/maint.texi.) Rules and Makerules would give errors if Makeconfig hadn't already been included, instead of including it themselves. The special code to override values coming from the environment would then be obsolete and could be removed. Tested x86_64, including that installed binaries are identical before and after the patch. * argp/Makefile: Include Makeconfig immediately after defining subdir. * assert/Makefile: Likewise. * benchtests/Makefile: Likewise. * catgets/Makefile: Likewise. * conform/Makefile: Likewise. * crypt/Makefile: Likewise. * csu/Makefile: Likewise. (all): Remove target. * ctype/Makefile: Include Makeconfig immediately after defining subdir. * debug/Makefile: Likewise. * dirent/Makefile: Likewise. * dlfcn/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * gshadow/Makefile: Likewise. * hesiod/Makefile: Likewise. * hurd/Makefile: Likewise. (all): Remove target. * iconvdata/Makefile: Include Makeconfig immediately after defining subdir. * inet/Makefile: Likewise. * intl/Makefile: Likewise. * io/Makefile: Likewise. * libio/Makefile: Likewise. (all): Remove target. * locale/Makefile: Include Makeconfig immediately after defining subdir. * login/Makefile: Likewise. * mach/Makefile: Likewise. (all): Remove target. * malloc/Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. * manual/Makefile: Include Makeconfig immediately after defining subdir. * math/Makefile: Likewise. * misc/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * po/Makefile: Likewise. (all): Remove target. * posix/Makefile: Include Makeconfig immediately after defining subdir. * pwd/Makefile: Likewise. * resolv/Makefile: Likewise. * resource/Makefile: Likewise. * rt/Makefile: Likewise. * setjmp/Makefile: Likewise. * shadow/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * soft-fp/Makefile: Likewise. * stdio-common/Makefile: Likewise. * stdlib/Makefile: Likewise. * streams/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. (all): Remove target. * sysvipc/Makefile: Include Makeconfig immediately after defining subdir. * termios/Makefile: Likewise. * time/Makefile: Likewise. * timezone/Makefile: Likewise. (all): Remove target. * wcsmbs/Makefile: Include Makeconfig immediately after defining subdir. * wctype/Makefile: Likewise. libidn/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. localedata/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. nptl/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. nptl_db/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir.
* Minor formatting fixSiddhesh Poyarekar2014-02-211-2/+2
|
* print length in strrchr benchtestRajalakshmi Srinivasaraghavan2014-02-211-1/+1
| | | | | The return criteria of strrchr() is to read till NULL even if the search character is hit. So its better to print len instead of pos.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-1/+1
|
* tests: unify fortification handler logicMike Frysinger2014-02-081-20/+5
| | | | | | | We have multiple tests that copy & paste the same logic for disabling the fortification output. Let's unify this in the test-skeleton instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Correct inputs for sin and cosSiddhesh Poyarekar2014-01-102-29/+6
| | | | | The inputs for the slowest path in asin and acos were incorrect and had some fast path inputs there too.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0142-42/+42
|
* Benchmark inputs for cos and sinSiddhesh Poyarekar2013-12-312-12/+5300
| | | | | | Add a comprehensive number of inputs for all branches in sin and cos computation, excluding the fast paths. This also adds a number of inputs for the multiple precision slow paths.
* benchmark inputs for atanSiddhesh Poyarekar2013-12-311-5/+802
| | | | | | | Add a more comprehensive set of inputs for the atan function. I have also fixed the name on the multiple precision fallback inputs (I couldn't find any new inputs there) to reflect the fact that the fallback is only 144bits and not 768bits as I had earlier mentioned.
* benchmark inputs for tanh and atanhSiddhesh Poyarekar2013-12-312-10/+400
|
* benchmark inputs for asinh and acoshSiddhesh Poyarekar2013-12-312-10/+600
| | | | | | Like sinh and cosh, this patch has benchmark inputs for asinh and acosh, generated using a random number generator and spread over significant branches, ignoring the fast return paths.
* benchmark inputs for sinh and coshSiddhesh Poyarekar2013-12-312-10/+700
| | | | | | | Add a full set of inputs for sinh and cosh functions generated using a random number generator and spreading it over all branches in the function, ignoring the fast paths (i.e. immediate return for special values).
* benchmark inputs for asin and acosSiddhesh Poyarekar2013-12-312-14/+5240
| | | | | Add a comprehensive set of inputs for asin and acos functions, including the multiple precision fallback path.
* benchtests: Add strtok benchmarkRajalakshmi Srinivasaraghavan2013-12-192-1/+206
|
* benchmark inputs for exp2, log2, log and tanSiddhesh Poyarekar2013-12-125-4/+4053
|
* Accept output arguments to benchmark functionsSiddhesh Poyarekar2013-12-053-87/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to accept output arguments to functions being benchmarked, by nesting the argument type in <> in the args directive. It includes the sincos implementation as an example, where the function would have the following args directive: ## args: double:<double *>:<double *> This simply adds a definition for a static variable whose pointer gets passed into the function, so it's not yet possible to pass something more complicated like a pre-allocated string or array. That would be a good feature to add if a function needs it. The values in the input file will map only to the input arguments. So if I had a directive like this for a function foo: ## args: int:<int *>:int:<int *> and I have a value list like this: 1, 2 3, 4 5, 6 then the function calls generated would be: foo (1, &out1, 2, &out2); foo (3, &out1, 4, &out2); foo (5, &out1, 6, &out2);
* Benchmark test for sqrt function.Steve Ellcey2013-12-022-1/+12
|
* Also remove benchtests/bench-strsep-ifunc.cOndřej Bílka2013-11-261-20/+0
|
* Remove duplicate ifunc benchtests.Ondřej Bílka2013-11-2636-682/+2
|
* benchtests: Add strsep benchmarkRajalakshmi Srinivasaraghavan2013-11-183-1/+195
|
* 2013-11-13 Steve Ellcey <sellcey@mips.com>Steve Ellcey2013-11-131-0/+2
| | | | * benchtests/bench-timing.h: Include time.h.
* benchtests: Add strtod benchmarkAdhemerval Zanella2013-11-112-1/+120
|
* Benchmark inputs for powSiddhesh Poyarekar2013-10-281-0/+503
| | | | | These inputs cover all normal processing paths for pow including all its slow paths.