diff options
author | moonman | 2015-08-15 02:03:51 -0600 |
---|---|---|
committer | moonman | 2015-08-15 02:10:35 -0600 |
commit | 6654b364505e7c310f89d2343c41bfa874374044 (patch) | |
tree | 66918b1b70331886ecbd813b702f0eea14f0c2e5 | |
download | aur-6654b364505e7c310f89d2343c41bfa874374044.tar.gz |
Add unixbench
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | make_maxcopies_unbound_for_misc_and_system_suites.patch | 59 | ||||
-rw-r--r-- | modern_compiler_optimizations.patch | 12 | ||||
-rw-r--r-- | no-make.patch | 36 | ||||
-rwxr-xr-x | ubench | 5 | ||||
-rw-r--r-- | unreasonable_multicore-whetstone_results_fix.patch | 12 | ||||
-rw-r--r-- | use_volatile.patch | 30 |
8 files changed, 238 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..425506db86f4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = unixbench + pkgdesc = UnixBench is a simple benchmark whose purpose is to provide a basic indicator of the performance of a Unix-like system. + pkgver = 5.1.3 + pkgrel = 3 + url = https://github.com/kdlucas/byte-unixbench + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + license = GPL + depends = perl + source = https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz + source = no-make.patch + source = use_volatile.patch + source = make_maxcopies_unbound_for_misc_and_system_suites.patch + source = unreasonable_multicore-whetstone_results_fix.patch + source = modern_compiler_optimizations.patch + source = ubench + md5sums = bf94e09faa4f620bf3bc49e70dd9851c + md5sums = f3e196a745ec70bc80e552867394a3e5 + md5sums = 62fb020a60ac5b8059bf670517f460ca + md5sums = 6dfea87ef70147d6961160529a5a4d00 + md5sums = 5de4883d86ab9e77120773790aea7ddf + md5sums = 794cb884d98479d7d270d58bdea0def3 + md5sums = d0a6a418559410ca65206ec3165b8e23 + +pkgname = unixbench + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..972725b584b4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +#Maintainer: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org> + +pkgname=unixbench +pkgver=5.1.3 +pkgrel=3 +pkgdesc="UnixBench is a simple benchmark whose purpose is to provide a basic indicator of the performance of a Unix-like +system." +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h') +license=('GPL') +url="https://github.com/kdlucas/byte-unixbench" +depends=('perl') +source=("https://github.com/kdlucas/byte-unixbench/archive/v${pkgver}.tar.gz" + 'no-make.patch' + 'use_volatile.patch' + 'make_maxcopies_unbound_for_misc_and_system_suites.patch' + 'unreasonable_multicore-whetstone_results_fix.patch' + 'modern_compiler_optimizations.patch' + 'ubench') + +md5sums=('bf94e09faa4f620bf3bc49e70dd9851c' + 'f3e196a745ec70bc80e552867394a3e5' + '62fb020a60ac5b8059bf670517f460ca' + '6dfea87ef70147d6961160529a5a4d00' + '5de4883d86ab9e77120773790aea7ddf' + '794cb884d98479d7d270d58bdea0def3' + 'd0a6a418559410ca65206ec3165b8e23') + +prepare() { + cd ${srcdir}/byte-unixbench-${pkgver}/UnixBench + patch -Np1 -i ${srcdir}/no-make.patch + patch -Np1 -i ${srcdir}/use_volatile.patch + patch -Np2 -i ${srcdir}/make_maxcopies_unbound_for_misc_and_system_suites.patch + patch -Np1 -i ${srcdir}/unreasonable_multicore-whetstone_results_fix.patch + patch -Np1 -i ${srcdir}/modern_compiler_optimizations.patch + + } + +build() { + cd ${srcdir}/byte-unixbench-${pkgver}/UnixBench + make + } + +package() { + cd ${srcdir}/byte-unixbench-${pkgver}/UnixBench + + install -dm775 ${pkgdir}/usr/bin/unixbench + cp -a {pgms,results,testdir,tmp,Run} ${pkgdir}/usr/bin/unixbench + cp ${srcdir}/ubench ${pkgdir}/usr/bin/ + + chmod 775 ${pkgdir}/usr/bin/ubench + chmod 775 ${pkgdir}/usr/bin/unixbench/Run + chmod ugoa+w ${pkgdir}/usr/bin/unixbench/{results,testdir,tmp} + } + + diff --git a/make_maxcopies_unbound_for_misc_and_system_suites.patch b/make_maxcopies_unbound_for_misc_and_system_suites.patch new file mode 100644 index 000000000000..18e6d68c8140 --- /dev/null +++ b/make_maxcopies_unbound_for_misc_and_system_suites.patch @@ -0,0 +1,59 @@ +From 910276909baacebea038750aecec32c9a32eddd4 Mon Sep 17 00:00:00 2001 +From: Steven Noonan <steven@uplinklabs.net> +Date: Sat, 6 Jun 2015 17:40:32 -0500 +Subject: [PATCH] make maxCopies unbounded for 'system' and 'misc' suites + +Quoting original author of this patch: + +Simply un-limits the 'misc' and 'system' suites. + +Half-related thoughts about testing quality: + +I'm curious why there's a shell1, shell8, and shell16 set of tests. Aren't the +latter two equivalent to './Run -c 8 shell1' and './Run -c 16 shell1'? I think +shell8 and shell16 are pointless if this is the case. + +At the very least, I think shell8 should be out of the default run (the $index +set), because it will essentially give a misleading number if you have more +than a single core in the system. Isn't the purpose of the serial run to +essentially measure how well the system performs on single-threaded activities? +Or perhaps to measure how well a single core performs? Having 'shell8' in the +$index set artificially inflates the score for serialized runs and artificially +damages the score during maxed-out parallelized runs. If you are actually +interested in seeing how well 'shell8' does on exactly one core, shouldn't you +do the equivalent of 'taskset 1' on it, forcing the child processes to stay on +that single core? + +End of quote. + +Signed-off-by: Carlos L. Torres <carlos.torres@rackspace.com> +--- + UnixBench/Run | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/UnixBench/Run b/UnixBench/Run +index d615935..ce5fb15 100755 +--- a/UnixBench/Run ++++ b/UnixBench/Run +@@ -106,10 +106,10 @@ my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir"); + + # Configure the categories to which tests can belong. + my $testCats = { +- 'system' => { 'name' => "System Benchmarks", 'maxCopies' => 16 }, ++ 'system' => { 'name' => "System Benchmarks", 'maxCopies' => 0 }, + '2d' => { 'name' => "2D Graphics Benchmarks", 'maxCopies' => 1 }, + '3d' => { 'name' => "3D Graphics Benchmarks", 'maxCopies' => 1 }, +- 'misc' => { 'name' => "Non-Index Benchmarks", 'maxCopies' => 16 }, ++ 'misc' => { 'name' => "Non-Index Benchmarks", 'maxCopies' => 0 }, + }; + + +@@ -1329,7 +1329,7 @@ sub runTests { + # If the benchmark doesn't want to run with this many copies, skip it. + my $cat = $params->{'cat'}; + my $maxCopies = $testCats->{$cat}{'maxCopies'}; +- next if ($copies > $maxCopies); ++ next if ($maxCopies > 0 && $copies > $maxCopies); + + # Run the benchmark. + my $bresult = runBenchmark($bench, $params, $verbose, $logFile, $copies); diff --git a/modern_compiler_optimizations.patch b/modern_compiler_optimizations.patch new file mode 100644 index 000000000000..1ba5dc54aae8 --- /dev/null +++ b/modern_compiler_optimizations.patch @@ -0,0 +1,12 @@ +diff -ruN UnixBench/Makefile b/Makefile +--- a/Makefile 2015-08-15 01:52:22.539585616 -0600 ++++ b/Makefile 2015-08-15 02:00:13.772259951 -0600 +@@ -71,7 +71,7 @@ + # -m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1 + + ## For Solaris 2, or general-purpose GCC 2.7.x +-OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ++OPTON = -O2 -ffast-math -Wall -march=native + + ## For Digital Unix v4.x, with DEC cc v5.x + #OPTON = -O4 diff --git a/no-make.patch b/no-make.patch new file mode 100644 index 000000000000..83810f4945fb --- /dev/null +++ b/no-make.patch @@ -0,0 +1,36 @@ +diff -ruN a/Run b/Run +--- a/Run 2011-01-17 23:44:53.000000000 -0700 ++++ b/Run 2015-03-14 15:17:39.000000000 -0600 +@@ -785,13 +785,13 @@ + $ENV{'LANG'} = $language; + + # Check that the required files are in the proper places. +- system("make check"); +- if ($? != 0) { +- system("make all"); +- if ($? != 0) { +- abortRun("\"make all\" failed"); +- } +- } ++# system("make check"); ++# if ($? != 0) { ++# system("make all"); ++# if ($? != 0) { ++# abortRun("\"make all\" failed"); ++# } ++# } + + # Create a script to kill this run. + system("echo \"kill -9 $$\" > \"${TMPDIR}/kill_run\""); +diff -ruN a/src/dhry_1.c b/src/dhry_1.c +--- a/src/dhry_1.c 2011-01-17 23:44:53.000000000 -0700 ++++ b/src/dhry_1.c 2015-03-14 15:34:29.000000000 -0600 +@@ -75,7 +75,7 @@ + + #ifdef TIMES + struct tms time_info; +-extern int times (); ++//extern int times (); + /* see library function "times" */ + #define Too_Small_Time 120 + /* Measurements should last at least about 2 seconds */ diff --git a/ubench b/ubench new file mode 100755 index 000000000000..180cc2fabaec --- /dev/null +++ b/ubench @@ -0,0 +1,5 @@ +#!/bin/bash + +cd /usr/bin/unixbench +./Run $@ 2>/dev/null + diff --git a/unreasonable_multicore-whetstone_results_fix.patch b/unreasonable_multicore-whetstone_results_fix.patch new file mode 100644 index 000000000000..2e4537150017 --- /dev/null +++ b/unreasonable_multicore-whetstone_results_fix.patch @@ -0,0 +1,12 @@ +diff -ruN UnixBench/Makefile b/Makefile +--- a/Makefile 2015-06-04 11:20:18.000000000 -0600 ++++ b/Makefile 2015-08-15 01:47:44.310787298 -0600 +@@ -196,7 +196,7 @@ + $(PROGDIR)/double: $(SRCDIR)/arith.c + $(CC) -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c + $(PROGDIR)/whetstone-double: $(SRCDIR)/whets.c +- $(CC) -o $(PROGDIR)/whetstone-double ${CFLAGS} ${OPTON} -DDP -DUNIX -DUNIXBENCH $(SRCDIR)/whets.c -lm ++ $(CC) -o $(PROGDIR)/whetstone-double ${CFLAGS} ${OPTON} -DDP -DGTODay -DUNIXBENCH $(SRCDIR)/whets.c -lm + $(PROGDIR)/hanoi: $(SRCDIR)/hanoi.c + $(CC) -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c + diff --git a/use_volatile.patch b/use_volatile.patch new file mode 100644 index 000000000000..14738e32e5a1 --- /dev/null +++ b/use_volatile.patch @@ -0,0 +1,30 @@ +Binary files b/pgms/arithoh and a/pgms/arithoh differ +Binary files b/pgms/context1 and a/pgms/context1 differ +Binary files b/pgms/dhry2 and a/pgms/dhry2 differ +Binary files b/pgms/dhry2reg and a/pgms/dhry2reg differ +Binary files b/pgms/double and a/pgms/double differ +Binary files b/pgms/execl and a/pgms/execl differ +Binary files b/pgms/float and a/pgms/float differ +Binary files b/pgms/fstime and a/pgms/fstime differ +Binary files b/pgms/hanoi and a/pgms/hanoi differ +Binary files b/pgms/int and a/pgms/int differ +Binary files b/pgms/long and a/pgms/long differ +Binary files b/pgms/looper and a/pgms/looper differ +Binary files b/pgms/pipe and a/pgms/pipe differ +Binary files b/pgms/register and a/pgms/register differ +Binary files b/pgms/short and a/pgms/short differ +Binary files b/pgms/spawn and a/pgms/spawn differ +Binary files b/pgms/syscall and a/pgms/syscall differ +Binary files b/pgms/whetstone-double and a/pgms/whetstone-double differ +diff -ruN b/src/arith.c a/src/arith.c +--- b/src/arith.c 2011-01-17 23:44:53.000000000 -0700 ++++ a/src/arith.c 2015-03-21 20:38:49.082836753 -0600 +@@ -35,7 +35,7 @@ + + int dumb_stuff(int); + +-unsigned long iter; ++unsigned volatile long iter; + + /* this function is called when the alarm expires */ + void report() |