summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorgarbled <garbled@pkgsrc.org>2005-03-03 08:53:06 +0000
committergarbled <garbled@pkgsrc.org>2005-03-03 08:53:06 +0000
commit314ae767c78b65bcfc3c38652bbb415e31b2f820 (patch)
tree1426d8926ecfcba8e6322a9f829fce896e02e552 /benchmarks
parent88270187b1637c082b3ecdfd9383a8e271c45048 (diff)
downloadpkgsrc-314ae767c78b65bcfc3c38652bbb415e31b2f820.tar.gz
Add patches in PR pkg/17941 from David Laight. Mostly performance
boosts, and a core dump fix. Bumping rev to 2.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/hbench/Makefile6
-rw-r--r--benchmarks/hbench/distinfo8
-rw-r--r--benchmarks/hbench/patches/patch-al30
-rw-r--r--benchmarks/hbench/patches/patch-am14
-rw-r--r--benchmarks/hbench/patches/patch-an33
-rw-r--r--benchmarks/hbench/patches/patch-ao33
-rw-r--r--benchmarks/hbench/patches/patch-ap33
7 files changed, 144 insertions, 13 deletions
diff --git a/benchmarks/hbench/Makefile b/benchmarks/hbench/Makefile
index 6b2b9b41506..05efce056e2 100644
--- a/benchmarks/hbench/Makefile
+++ b/benchmarks/hbench/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.28 2005/02/21 20:51:21 veego Exp $
+# $NetBSD: Makefile,v 1.29 2005/03/03 08:53:06 garbled Exp $
DISTNAME= hbench-OS-1.0
PKGNAME= hbench-1.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= benchmarks
-MASTER_SITES= http://www.eecs.harvard.edu/vino/perf/hbench/
+MASTER_SITES= http://www.eecs.harvard.edu/vino/perf/hbench/
MAINTAINER= root@garbled.net
HOMEPAGE= http://www.eecs.harvard.edu/vino/perf/hbench/
diff --git a/benchmarks/hbench/distinfo b/benchmarks/hbench/distinfo
index 854c973ab0e..c113997d5e9 100644
--- a/benchmarks/hbench/distinfo
+++ b/benchmarks/hbench/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2005/02/22 21:16:36 agc Exp $
+$NetBSD: distinfo,v 1.7 2005/03/03 08:53:06 garbled Exp $
SHA1 (hbench-1.0/hbench-OS-1.0.tar.gz) = b1a72287e2d04561141f296ba04d142f60152fe0
RMD160 (hbench-1.0/hbench-OS-1.0.tar.gz) = 2e2702c035689e1dec39328e47dc9dc9ff558103
@@ -14,4 +14,8 @@ SHA1 (patch-ah) = 6c01c679b394985d0570df4fe29c09642cbde6c3
SHA1 (patch-ai) = d59d05c9d73aa4c06f5ac5153a069694a4267fd1
SHA1 (patch-aj) = 7bca0c1062626b5c03f04b7bce17f7c2d8c14231
SHA1 (patch-ak) = 986d86c1b6d6850585cde8cb9ffd119fbe2351ee
-SHA1 (patch-al) = 1955e8477c42ed43a416a37ef5aec598dd0655da
+SHA1 (patch-al) = 53ac43ab3287f4ae7dc246aa9b047923e8acd8b6
+SHA1 (patch-am) = 1d58355f664879ccd8880a63f574388fb61c0780
+SHA1 (patch-an) = 4cb762c246cdde99a219b8a4de2d354f2b6abb85
+SHA1 (patch-ao) = 69c92f83d10f061f8f0aa05da860cfc5cf764859
+SHA1 (patch-ap) = 057465b9f89e76367781401d91b333679a651cb4
diff --git a/benchmarks/hbench/patches/patch-al b/benchmarks/hbench/patches/patch-al
index 9ae50e7ffa3..3b2f968af90 100644
--- a/benchmarks/hbench/patches/patch-al
+++ b/benchmarks/hbench/patches/patch-al
@@ -1,8 +1,16 @@
-$NetBSD: patch-al,v 1.2 2001/09/22 20:47:15 jdolecek Exp $
-
---- src/bw_pipe.c.orig Fri Sep 21 18:39:15 2001
-+++ src/bw_pipe.c Fri Sep 21 18:39:48 2001
-@@ -147,6 +147,8 @@ do_pipexfer(num_iter, t)
+# $NetBSD: patch-al,v 1.3 2005/03/03 08:53:06 garbled Exp $
+--- src/bw_pipe.c.orig 1997-06-26 17:34:33.000000000 -0700
++++ src/bw_pipe.c 2005-03-03 01:31:48.000000000 -0700
+@@ -134,7 +134,7 @@
+ }
+
+ /* Amount to transfer */
+- todo = XFERUNIT * num_iter;
++ todo = XFERUNIT * num_iter + bufsize;
+
+ /* Allocate buffer */
+ buf = (char *) malloc(bufsize);
+@@ -147,6 +147,8 @@
/* Spawn off a writer, then time the read */
switch (fork()) {
case 0: /* writer */
@@ -11,16 +19,22 @@ $NetBSD: patch-al,v 1.2 2001/09/22 20:47:15 jdolecek Exp $
while ((done < todo) &&
((n = write(pipes[1], buf, bufsize)) > 0))
done += n;
-@@ -159,6 +161,8 @@ do_pipexfer(num_iter, t)
+@@ -159,8 +161,13 @@
/*NOTREACHED*/
default: /* reader */
+ close(pipes[1]);
+
/* wait for writer */
- sleep(1);
+- sleep(1);
++ while ((done < bufsize) &&
++ ((n = read(pipes[0], buf, bufsize - done)) > 0))
++ done += n;
++
-@@ -168,6 +172,7 @@ do_pipexfer(num_iter, t)
+ start(); /* start timing */
+ while ((done < todo) &&
+@@ -168,6 +175,7 @@
done += n;
*t = stop(); /* stop timing */
diff --git a/benchmarks/hbench/patches/patch-am b/benchmarks/hbench/patches/patch-am
new file mode 100644
index 00000000000..71c6f4a5e35
--- /dev/null
+++ b/benchmarks/hbench/patches/patch-am
@@ -0,0 +1,14 @@
+# $NetBSD: patch-am,v 1.1 2005/03/03 08:53:06 garbled Exp $
+--- ./src/lat_fs.c Fri Jun 27 01:34:38 1997
++++ work/hbench-OS/src/lat_fs.c Wed Aug 14 12:48:11 2002
+@@ -229,8 +229,8 @@
+ if (deldir == DEL_REVERSE) {
+ for (i = 0; i < (num_iter +1)/2; i++) {
+ /* swap(filenames[i],filenames[numfiles - i]); */
+- tmp = filenames[num_iter - i];
+- filenames[num_iter - i] = filenames[i];
++ tmp = filenames[num_iter - 1 - i];
++ filenames[num_iter - 1 - i] = filenames[i];
+ filenames[i] = tmp;
+ }
+ } else if (deldir == DEL_PSEUDORANDOM) {
diff --git a/benchmarks/hbench/patches/patch-an b/benchmarks/hbench/patches/patch-an
new file mode 100644
index 00000000000..b9b4cf3499b
--- /dev/null
+++ b/benchmarks/hbench/patches/patch-an
@@ -0,0 +1,33 @@
+# $NetBSD: patch-an,v 1.1 2005/03/03 08:53:06 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 @@
+ #ifdef DEBUG
+ printf(">> %d iteration gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.);
+ #endif
+- while ((time = ((float)rtntime)*clkmul) < 1000000.) {
+- /* while less than one second */
+- num <<= 1;
++ while ((time = ((float)rtntime)*clkmul) < 1000000./16) {
++ /* while less than 1/16 second */
++ num <<= 2;
+ if ((*workfn)(num, &rtntime) != 0) {
+ num >>= 1;
+ #ifdef DEBUG
+- printf(">> backing off\n");
++ printf(">> backing off to %d iterations\n", num);
+ #endif
+- break;
++ return num;
+ }
+ #ifdef DEBUG
+ printf(">> %d iterations gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.);
+ #endif
++ }
++ while (time < 1000000.) {
++ /* while less than one second */
++ num <<= 1;
++ time *= 2;
+ }
+ #ifdef DEBUG
+ printf(">> Choosing %d iterations\n",num);
diff --git a/benchmarks/hbench/patches/patch-ao b/benchmarks/hbench/patches/patch-ao
new file mode 100644
index 00000000000..7ec6f8eed06
--- /dev/null
+++ b/benchmarks/hbench/patches/patch-ao
@@ -0,0 +1,33 @@
+# $NetBSD: patch-ao,v 1.1 2005/03/03 08:53:06 garbled Exp $
+--- src/lat_ctx.c.orig 1997-06-26 17:34:37.000000000 -0700
++++ src/lat_ctx.c 2005-03-03 01:21:56.000000000 -0700
+@@ -63,6 +63,7 @@
+ pid_t pids[MAX_PROCS]; /* process ID's */
+ int *pbuffer; /* memory buffer for procs to sum */
+ int *locdata; /* proc's memory buffer for procs to sum */
++int initial_niter; /* number of iterations we were requesed to do */
+
+ int
+ main(ac, av)
+@@ -84,7 +85,7 @@
+ }
+
+ /* parse command line parameters */
+- niter = atoi(av[1]);
++ initial_niter = niter = atoi(av[1]);
+ sprocs = parse_bytes(av[2]);
+ nprocs = atoi(av[3]);
+
+@@ -276,6 +277,12 @@
+ int i;
+ clk_t val;
+
++ if (initial_niter == 0) {
++ /* We are only trying to find how many times to run the test */
++ do_overhead1(num_iter >> 1, t);
++ return 0;
++ }
++
+ centeravg_reset(OVERHEADAVG_LOOPS, OVERHEADAVG_TAILS);
+
+ for (i = OVERHEADAVG_LOOPS; i > 0; i--) {
diff --git a/benchmarks/hbench/patches/patch-ap b/benchmarks/hbench/patches/patch-ap
new file mode 100644
index 00000000000..a653938d353
--- /dev/null
+++ b/benchmarks/hbench/patches/patch-ap
@@ -0,0 +1,33 @@
+# $NetBSD: patch-ap,v 1.1 2005/03/03 08:53:06 garbled Exp $
+--- src/lat_ctx2.c.orig 1997-06-26 17:34:37.000000000 -0700
++++ src/lat_ctx2.c 2005-03-03 01:21:59.000000000 -0700
+@@ -63,6 +63,7 @@
+ pid_t pids[MAX_PROCS]; /* process ID's */
+ int *pbuffer; /* memory buffer for procs to sum */
+ int *locdata; /* proc's memory buffer for procs to sum */
++int initial_niter; /* number of iterations we were requesed to do */
+
+ int
+ main(ac, av)
+@@ -84,7 +85,7 @@
+ }
+
+ /* parse command line parameters */
+- niter = atoi(av[1]);
++ initial_niter = niter = atoi(av[1]);
+ sprocs = parse_bytes(av[2]);
+ nprocs = atoi(av[3]);
+
+@@ -251,6 +252,12 @@
+ int i;
+ clk_t val;
+
++ if (initial_niter == 0) {
++ /* We are only trying to find how many times to run the test */
++ do_overhead1(num_iter >> 1, t);
++ return 0;
++ }
++
+ centeravg_reset(OVERHEADAVG_LOOPS, OVERHEADAVG_TAILS);
+
+ for (i = OVERHEADAVG_LOOPS; i > 0; i--) {