summaryrefslogtreecommitdiff
path: root/benchmarks/hbench/patches/patch-ao
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/hbench/patches/patch-ao')
-rw-r--r--benchmarks/hbench/patches/patch-ao33
1 files changed, 33 insertions, 0 deletions
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--) {