diff --git a/bench.mk b/bench.mk deleted file mode 100644 index dfe46bdb2aa9b1ccfc7cf2a5816bf629098d4f75..0000000000000000000000000000000000000000 --- a/bench.mk +++ /dev/null @@ -1,77 +0,0 @@ -objpfx = $(prefix)/$(ver)/usr/libexec/glibc-benchtests/ - -bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \ - log log2 modf pow rint sin sincos sinh sqrt tan tanh - -bench-pthread := pthread_once - -bench := $(bench-math) $(bench-pthread) - -run-bench := $(prefix)/$(ver)/lib64/ld-linux-x86-64.so.2 --library-path $(prefix)/$(ver)/lib64 $${run} - -# String function benchmarks. -string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \ - mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \ - strcat strchr strchrnul strcmp strcpy strcspn strlen \ - strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \ - strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok -string-bench-all := $(string-bench) - -stdlib-bench := strtod - -benchset := $(string-bench-all) $(stdlib-bench) - -bench-malloc := malloc-thread - -binaries-bench := $(addprefix $(objpfx)bench-,$(bench)) -binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset)) -binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc)) - -DETAILED_OPT := - -ifdef DETAILED - DETAILED_OPT := -d -endif - -bench: bench-set bench-func bench-malloc - -bench-set: $(binaries-benchset) - for run in $^; do \ - outfile=$(prefix)/$$(basename $${run}.$(ver).out); \ - echo "Running $${run}"; \ - $(run-bench) > $${outfile}.tmp; \ - mv $${outfile}{.tmp,}; \ - done - -bench-malloc: $(binaries-bench-malloc) - run=$(objpfx)bench-malloc-thread; \ - outfile=$(prefix)/$$(basename $${run}.$(ver).out); \ - for thr in 1 8 16 32; do \ - echo "Running $${run} $${thr}"; \ - $(run-bench) $${thr} > $${outfile}.tmp; \ - mv $${outfile}{.tmp,}; \ - done - -# Build and execute the benchmark functions. This target generates JSON -# formatted bench.out. Each of the programs produce independent JSON output, -# so one could even execute them individually and process it using any JSON -# capable language or tool. -bench-func: $(binaries-bench) - { echo "{\"timing_type\": \"hp-timing\","; \ - echo " \"functions\": {"; \ - for run in $^; do \ - if ! [ "x$${run}" = "x$<" ]; then \ - echo ","; \ - fi; \ - echo "Running $${run}" >&2; \ - $(run-bench) $(DETAILED_OPT); \ - done; \ - echo; \ - echo " }"; \ - echo "}"; } > $(prefix)/bench.$(ver).out-tmp; \ - if [ -f $(prefix)/bench.$(ver).out ]; then \ - mv -f $(prefix)/bench.$(ver).out{,.old}; \ - fi; \ - mv -f $(prefix)/bench.$(ver).out{-tmp,} -# scripts/validate_benchout.py bench.out \ -# scripts/benchout.schema.json diff --git a/glibc-bench-compare b/glibc-bench-compare deleted file mode 100644 index 84e3abad4facae2981cd93acb25662812c0ef5d5..0000000000000000000000000000000000000000 --- a/glibc-bench-compare +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/bash -# This script can be invoked as follows: -# -# glibc-bench-compare [options] [BUILD] -# -# Options may be one of the following: -# -# -t The BUILD arguments are task ids and not a version-release string -# -a ARCH Do comparison for ARCH architecture -# -# If any of the above options are given, both BUILD arguments must be given. -# Otherwise, if only one BUILD is specified, then it is compared against the -# installed glibc. - -# Silence the pushd/popd messages -pushd() { - command pushd "$@" > /dev/null 2>&1 -} - -popd() { - command popd "$@" > /dev/null 2>&1 -} - -# Clean up any downloaded files before we exit -trap "rm -rf /tmp/glibc-bench-compare.$BASHPID.*" EXIT - -task=0 -arch=$(uname -i) -options=0 -path=0 -installed= - -# Look for any commandline options -while getopts ":tpa:" opt; do - case $opt in - p) - path=1 - ;; - t) - task=1 - options=1 - echo "Not implemented." - exit 1 - ;; - a) - arch=$OPTARG - options=1 - ;; - *) - ;; - esac -done - -# Done, now shift all option arguments out. -shift $((OPTIND-1)) - -if [ $# -gt 2 ] || [ $# -eq 0 ] || [ $# -lt 2 -a $options -eq 1 ]; then - echo "Usage: $0 [OPTIONS] [new]" - echo - echo "OPTIONS:" - echo -e "\t-t\tCompare two brew tasks" - echo -e "\t-a ARCH\tGet rpms for the ARCH architecture" - echo -e "\t-p\tCompare built rpms in two paths." - echo -e "\t\tThis minimally needs glibc, glibc-common and glibc-benchtests" - exit 1 -fi - -if [ -z $2 ]; then - new="$1" - old=$(rpm --queryformat "%{VERSION}-%{RELEASE}\n" -q glibc | head -1) - installed=$old -else - new="$2" - old="$1" -fi - -decompress_rpms() { - # We were given a path to the rpms. Figure out the version-release and - # decompress the rpms. - if [ -n $1 ]; then - vr=$(rpm --queryformat="%{VERSION}-%{RELEASE}" -qp $1/glibc-2*.rpm | head -1) - mkdir $vr && pushd $vr - fi - - for r in $1*.rpm; do - ( rpm2cpio $r | cpio -di ) > /dev/null - done - - if [ -n $1 ]; then - popd - echo $vr - fi -} - -# Get rpms for a build and decompress them -get_build() { - echo "Processing build $1" - mkdir $1 && pushd $1 - brew buildinfo "glibc-$1" | - sed -n -e "s|/mnt/koji\(.\+$arch.\+\)|http://kojipkgs.fedoraproject.org\1|p" | - while read url; do - echo "Downloading $url" - wget -q $url - done - decompress_rpms - - echo "Removing rpms" - rm -f $1/*.rpm - - popd -} - -# Run benchmarks for a build -run_bench() { - if [ -z $1 ]; then - make DETAILED=1 ver=$installed prefix= -f /usr/libexec/glibc-benchtests/bench.mk bench - else - make DETAILED=1 ver=$1 prefix=$PWD -f $1/usr/libexec/glibc-benchtests/bench.mk bench - fi -} - -# Get absolute paths if needed, since we will change into the working directory -# next. -if [ $path -eq 1 ]; then - old_path=$(realpath $old)/ - new_path=$(realpath $new)/ -fi - -tmpdir=$(mktemp -p /tmp -d glibc-bench-compare.$$.XXXX) -pushd $tmpdir - -# Get both builds. -if [ $path -eq 0 ]; then - if [ -z $installed ]; then - get_build $old - fi - get_build $new -else - old=$(decompress_rpms $old_path) - new=$(decompress_rpms $new_path) -fi - -# make bench for each of those. -if [ -z $installed ]; then - run_bench $old -else - run_bench -fi -run_bench $new - -# Now run the comparison script. -$old/usr/libexec/glibc-benchtests/compare_bench.py $old/usr/libexec/glibc-benchtests/benchout.schema.json \ - bench.$old.out bench.$new.out diff --git a/glibc.spec b/glibc.spec index 34af3f8f5b0fec85c63dbb97f1cf7c0d6b73e19b..84939e64ba1a79405d8cb506de8a8d2705c12bb6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -10,9 +10,6 @@ # * testsuite # - Running the testsuite. It must run for production builds. # - Default: Always run the testsuite. -# * benchtests -# - Running and building benchmark subpackage. -# - Default: Always build the benchtests. # * bootstrap # - Bootstrapping the package. # - Default: Not bootstrapping. @@ -27,7 +24,6 @@ # - Default: Always run valgrind tests if there is architecture support. ############################################################################## %bcond_without testsuite -%bcond_without benchtests %bcond_with bootstrap %bcond_without werror %bcond_without docs @@ -39,7 +35,6 @@ %endif %if %{with bootstrap} -%undefine with_benchtests %undefine with_werror %undefine with_docs %undefine with_valgrind @@ -59,7 +54,7 @@ ############################################################################## Name: glibc Version: 2.28 -Release: 31 +Release: 32 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -68,10 +63,8 @@ Source0: https://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz Source1: build-locale-archive.c Source2: nscd.conf Source3: nsswitch.conf -Source4: bench.mk -Source5: glibc-bench-compare -Source6: LicenseList -Source7: LanguageList +Source4: LicenseList +Source5: LanguageList Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -159,7 +152,7 @@ Provides: %{name}-langpack = %{version}-%{release} %{lua: -- List the Symbol provided by all-langpacks lang_provides = {} -for line in io.lines(rpm.expand("%{SOURCE7}")) do +for line in io.lines(rpm.expand("%{SOURCE5}")) do print(rpm.expand([[ Provides:]]..line..[[ = %{version}-%{release} Obsoletes:]]..line..[[ @@ -274,19 +267,6 @@ Requires: %{name}%{_isa} = %{version}-%{release} The libnsl package contains the public client interface for NIS(YP) and NIS+. It replaces the NIS library that used to be in glibc. -############################################################################## -# glibc benchtests sub-package -############################################################################## -%if %{with benchtests} - -%package benchtests -Summary: Build benchmarking binaries and scripts for %{name} - -%description benchtests -This package provides built benchmark binaries and scripts which will be used -to run microbenchmark tests on the system. -%endif - ############################################################################## # glibc debugutils sub-package ############################################################################## @@ -300,7 +280,6 @@ Requires: %{name}-devel-debuginfo = %{version}-%{release} Requires: nscd-debuginfo = %{version}-%{release} Requires: nss_modules-debuginfo = %{version}-%{release} Requires: libnsl-debuginfo = %{version}-%{release} -Requires: %{name}-benchtests-debuginfo = %{version}-%{release} Provides: %{name}-debuginfo = %{version}-%{release} Provides: %{name}-debuginfo%{_isa} = %{version}-%{release} @@ -331,8 +310,6 @@ This package provides al doc and man files of %{name} %prep %autosetup -n %{name}-%{version} -p1 -chmod +x benchtests/scripts/*.py scripts/pylint - find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; touch `find . -name configure` @@ -543,26 +520,6 @@ mkdir documentation cp timezone/README documentation/README.timezone cp posix/gai.conf documentation/ -%if %{with benchtests} -# Build benchmark binaries. Ignore the output of the benchmark runs. -pushd build-%{target} -make BENCH_DURATION=1 bench-build -popd - -# Copy over benchmark binaries. -mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests -cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ - -#makefile. -for b in %{SOURCE4} %{SOURCE5}; do - cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ -done - -#comparison scripts. -for i in benchout.schema.json compare_bench.py import_bench.py validate_benchout.py; do - cp benchtests/scripts/$i $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ -done - %if 0%{?_enable_debug_packages} pushd locale ln -s programs/*.gperf . @@ -608,7 +565,6 @@ for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do -i $i done %endif # 0%{?_enable_debug_packages} -%endif # %{with benchtests} ############################################################################## # Run the glibc testsuite ############################################################################## @@ -889,11 +845,6 @@ fi %files -n libnsl /%{_lib}/libnsl* -%if %{with benchtests} -%files benchtests -%{_prefix}/libexec/glibc-benchtests/* -%endif - %files debugutils %if %{without bootstrap} %{_prefix}/bin/memusage @@ -919,6 +870,9 @@ fi %changelog +* Sat Jan 11 2020 Wang Shuo - 2.28-32 +- Remove benchtests sub package + * Tue Jan 7 2020 Wang Shuo - 2.28-31 - Fix compile macro