diff options
author | dholland <dholland@pkgsrc.org> | 2011-09-12 11:15:33 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-09-12 11:15:33 +0000 |
commit | 74f960f09b45dba84a00dcadec45c1669a331ffc (patch) | |
tree | 4b49444c89b0276968335476e371a276c61b6bec /benchmarks | |
parent | 89fb41904ec075ccd4c366ebf3b9ad001eba3210 (diff) | |
download | pkgsrc-74f960f09b45dba84a00dcadec45c1669a331ffc.tar.gz |
Add a distfile patch from yours truly, which may become, or may become
part of, a new upstream version, but I need to talk to some people first.
(I'm keeping this separate from the previous update in case it breaks stuff.)
Changes:
roll in parts of patch-aa and patch-aq;
roll in all of patch-ar and patch-src_memsize_c;
make the ARM-only adjustment from patch-ar universal;
add enough volatile to make 'mhz' work more or less properly again;
fix the loop calibration to bail out instead of spinning forever
if things go too fast (e.g. because the compiler's optimized out
the benchmark loop);
various hacking and modernization to get sort of a clean compile;
fix some non-stdc stringifying macros;
hopefully advance the clang build a bit further.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/hbench/Makefile | 7 | ||||
-rw-r--r-- | benchmarks/hbench/distinfo | 13 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-aa | 13 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-an | 28 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-aq | 16 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ar | 13 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-src_memsize_c | 30 |
7 files changed, 34 insertions, 86 deletions
diff --git a/benchmarks/hbench/Makefile b/benchmarks/hbench/Makefile index 1e60e90804e..fdb17ffed84 100644 --- a/benchmarks/hbench/Makefile +++ b/benchmarks/hbench/Makefile @@ -1,10 +1,15 @@ -# $NetBSD: Makefile,v 1.45 2011/09/12 10:47:11 dholland Exp $ +# $NetBSD: Makefile,v 1.46 2011/09/12 11:15:33 dholland Exp $ DISTNAME= hbench-OS-1.1 PKGNAME= hbench-1.1 +PKGREVISION= 1 CATEGORIES= benchmarks MASTER_SITES= http://www.eecs.harvard.edu/vino/perf/hbench/ +PATCHFILES= hbench-OS-1.1-provisional-patch1.diff +PATCH_SITES= http://www.eecs.harvard.edu/~dholland/netbsd/ +PATCH_DIST_STRIP= -p1 + MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.eecs.harvard.edu/vino/perf/hbench/ COMMENT= Suite of portable benchmarks to measure the OS and the hardware diff --git a/benchmarks/hbench/distinfo b/benchmarks/hbench/distinfo index d5d29fa1e43..f847f02d43c 100644 --- a/benchmarks/hbench/distinfo +++ b/benchmarks/hbench/distinfo @@ -1,9 +1,12 @@ -$NetBSD: distinfo,v 1.16 2011/09/12 10:47:11 dholland Exp $ +$NetBSD: distinfo,v 1.17 2011/09/12 11:15:33 dholland Exp $ SHA1 (hbench-OS-1.1.tar.gz) = b6c98f5fc9cd306df6bdd2cf7d8254100118b01a RMD160 (hbench-OS-1.1.tar.gz) = 023131dc9ae6239b9d64671e4128d691b78b310a Size (hbench-OS-1.1.tar.gz) = 205361 bytes -SHA1 (patch-aa) = f08f8feefec200af85895384dc0b436580dffa9f +SHA1 (hbench-OS-1.1-provisional-patch1.diff) = a27430f20a2210cd1283806b202aa1071cbc91a6 +RMD160 (hbench-OS-1.1-provisional-patch1.diff) = ba6d79a400c86ad232b74414b6396c2839ca9258 +Size (hbench-OS-1.1-provisional-patch1.diff) = 23836 bytes +SHA1 (patch-aa) = 525e78346621e6c4e34ace6fb1ed79e729aaa259 SHA1 (patch-ab) = ce446b5836aadc690c127ab41d52dee27fdb987c SHA1 (patch-ac) = f6f570b66b5e32e8da14aec1b7afb8edc9088842 SHA1 (patch-ad) = f591b706c15daf4375896a4e47f005e422857a94 @@ -15,10 +18,8 @@ SHA1 (patch-ai) = d59d05c9d73aa4c06f5ac5153a069694a4267fd1 SHA1 (patch-aj) = 7bca0c1062626b5c03f04b7bce17f7c2d8c14231 SHA1 (patch-al) = 53ac43ab3287f4ae7dc246aa9b047923e8acd8b6 SHA1 (patch-am) = 1d58355f664879ccd8880a63f574388fb61c0780 -SHA1 (patch-an) = 4cb762c246cdde99a219b8a4de2d354f2b6abb85 +SHA1 (patch-an) = 9ac065d203081a5779b87cca69ecadfbeff5c970 SHA1 (patch-ao) = 69c92f83d10f061f8f0aa05da860cfc5cf764859 SHA1 (patch-ap) = 057465b9f89e76367781401d91b333679a651cb4 -SHA1 (patch-aq) = 464f523a64af1c7d4ca61aa21c0c635e725ece43 -SHA1 (patch-ar) = 26c8cb68f6d5c8b878e5f600eba579e9cd2fce30 +SHA1 (patch-aq) = ed10e6323feca92a0c1a454a5bc72627060e5c37 SHA1 (patch-as) = 5e6668a93610db020a4de0e46620b37f24e53309 -SHA1 (patch-src_memsize_c) = e3ed79a04998503ebc5d789d0c66423f1506e52d diff --git a/benchmarks/hbench/patches/patch-aa b/benchmarks/hbench/patches/patch-aa index aef1f77adbd..4df57994baa 100644 --- a/benchmarks/hbench/patches/patch-aa +++ b/benchmarks/hbench/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.2 1998/09/23 16:56:00 agc Exp $ +$NetBSD: patch-aa,v 1.3 2011/09/12 11:15:33 dholland Exp $ --- scripts/interactive-setup.orig Thu Jun 26 17:37:25 1997 +++ scripts/interactive-setup Sat Sep 5 09:59:03 1998 @@ -35,7 +35,7 @@ @@ -10,17 +10,6 @@ $NetBSD: patch-aa,v 1.2 1998/09/23 16:56:00 agc Exp $ ARCH=`echo ${HOSTTYPE} | sed 's/-.*-.*$//'` OSTYPE=`echo ${HOSTTYPE} | sed 's/^.*-.*-//'` CYCLECOUNTER=NO -@@ -44,8 +44,8 @@ - TESTFILE=full.test - NRUNS=10 - RAWDISK=none --SCRATCHFILE=/usr/tmp/XXX --SCRATCHDIR=/usr/tmp -+SCRATCHFILE=/tmp/XXX -+SCRATCHDIR=/tmp - REMOTE="" - NETWORKS="" - PLAINBINDIR= @@ -63,8 +63,8 @@ Welcome to HBench-OS! Before you can run the benchmarks, you need to set up a few configuration parameters. This script will allow you to diff --git a/benchmarks/hbench/patches/patch-an b/benchmarks/hbench/patches/patch-an index f2cf591495a..8be01552ffb 100644 --- a/benchmarks/hbench/patches/patch-an +++ b/benchmarks/hbench/patches/patch-an @@ -1,9 +1,12 @@ -$NetBSD: patch-an,v 1.2 2005/03/03 11:54:31 garbled Exp $ ---- ./src/timing.c Fri Jun 27 04:52:29 1997 -+++ work/hbench-OS/src/timing.c Wed Aug 14 14:11:22 2002 -@@ -201,19 +201,24 @@ +$NetBSD: patch-an,v 1.3 2011/09/12 11:15:33 dholland Exp $ + +Speed up the loop calibration. + +--- src/timing.c.orig 2011-09-12 10:54:05.000000000 +0000 ++++ src/timing.c +@@ -252,15 +252,15 @@ gen_iterations(workfn, clkmul) #ifdef DEBUG - printf(">> %d iteration gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); + printf(">> %u iteration gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); #endif - while ((time = ((float)rtntime)*clkmul) < 1000000.) { - /* while less than one second */ @@ -15,19 +18,22 @@ $NetBSD: patch-an,v 1.2 2005/03/03 11:54:31 garbled Exp $ num >>= 1; #ifdef DEBUG - printf(">> backing off\n"); -+ printf(">> backing off to %d iterations\n", num); ++ printf(">> backing off to %u iterations\n", num); #endif - break; + return num; } #ifdef DEBUG - printf(">> %d iterations gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); - #endif -+ } + printf(">> %u iterations gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); +@@ -271,6 +271,11 @@ gen_iterations(workfn, clkmul) + exit(1); + } + } + while (time < 1000000.) { + /* while less than one second */ + num <<= 1; + time *= 2; - } ++ } #ifdef DEBUG - printf(">> Choosing %d iterations\n",num); + printf(">> Choosing %u iterations\n", num); + #endif diff --git a/benchmarks/hbench/patches/patch-aq b/benchmarks/hbench/patches/patch-aq index ddc3f26993c..23a77b3dec1 100644 --- a/benchmarks/hbench/patches/patch-aq +++ b/benchmarks/hbench/patches/patch-aq @@ -1,20 +1,10 @@ -$NetBSD: patch-aq,v 1.3 2011/05/28 23:02:33 dholland Exp $ +$NetBSD: patch-aq,v 1.4 2011/09/12 11:15:33 dholland Exp $ -- handle dragonfly - fix parallel build ---- src/Makefile.orig 1997-06-27 14:50:31.000000000 +0000 +--- src/Makefile.orig 2011-09-12 10:59:10.000000000 +0000 +++ src/Makefile -@@ -89,7 +89,7 @@ COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(LD - ##################################### - - # The following don't need special handling. --freebsd netbsd openbsd sunos linux: -+dragonfly freebsd netbsd netbsdelf openbsd sunos linux: - @$(MAKE) binaries - - bsdi: -@@ -145,7 +145,7 @@ EXES= $(BINDIR)/bw_bzero $(BINDIR)/bw_fi +@@ -170,7 +170,7 @@ EXES= $(BINDIR)/bw_bzero $(BINDIR)/bw_fi $(BINDIR)/mhz $(BINDIR)/mhz-counter # $(BINDIR)/lmdd $(BINDIR)/lat_pagefault diff --git a/benchmarks/hbench/patches/patch-ar b/benchmarks/hbench/patches/patch-ar deleted file mode 100644 index 1812cfbdb06..00000000000 --- a/benchmarks/hbench/patches/patch-ar +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ar,v 1.1 2008/04/05 14:09:18 chris Exp $ - ---- src/mhz.c.orig 2008-04-05 14:34:31.000000000 +0100 -+++ src/mhz.c 2008-04-05 14:33:40.000000000 +0100 -@@ -118,6 +118,8 @@ main(ac, av) - */ - #ifdef sparc - # define FOUR a >>= 1; a >>= 1; a >>= 1; a >>= 1; -+#elif defined(__arm__) -+# define FOUR a++; a >>= 1; a++; a >>= 1; - #else - # ifdef _AIX /* really for the rs6000 only */ - # define FOUR a++; a++; diff --git a/benchmarks/hbench/patches/patch-src_memsize_c b/benchmarks/hbench/patches/patch-src_memsize_c deleted file mode 100644 index 8fea39eb49d..00000000000 --- a/benchmarks/hbench/patches/patch-src_memsize_c +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-src_memsize_c,v 1.1 2011/08/01 03:54:53 dholland Exp $ - -Use c89. Fixes broken clang build. - ---- src/memsize.c~ 1997-06-27 00:35:25.000000000 +0000 -+++ src/memsize.c -@@ -44,6 +44,7 @@ char *id = "$Id: memsize.c,v 1.8 1997/06 - #define TOO_LONG 10 /* usecs */ - #endif - -+int - main(ac, av) - char **av; - { -@@ -91,6 +92,7 @@ main(ac, av) - exit(0); - } - -+void - timeit(where, size) - char *where; - { -@@ -122,6 +124,7 @@ timeit(where, size) - printf("%d\n", (size>>20)); - } - -+void - touch(char *p, char *end, int range) - { - char *tmp = p; |