summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--benchmarks/Makefile1
-rw-r--r--benchmarks/tinymembench/Makefile23
-rw-r--r--benchmarks/tinymembench/distinfo3
-rw-r--r--benchmarks/tinymembench/files/patch-Makefile40
-rw-r--r--benchmarks/tinymembench/files/patch-aarch64-asm.S8
-rw-r--r--benchmarks/tinymembench/files/patch-arm-neon.S8
-rw-r--r--benchmarks/tinymembench/files/patch-mips-32.S8
-rw-r--r--benchmarks/tinymembench/files/patch-x86-sse2.S8
-rw-r--r--benchmarks/tinymembench/pkg-descr5
9 files changed, 104 insertions, 0 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 020638d3115e..fcb36bb69a2d 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -104,6 +104,7 @@
SUBDIR += sysbench
SUBDIR += tcpblast
SUBDIR += thrulay
+ SUBDIR += tinymembench
SUBDIR += tsung
SUBDIR += ttcp
SUBDIR += typometer
diff --git a/benchmarks/tinymembench/Makefile b/benchmarks/tinymembench/Makefile
new file mode 100644
index 000000000000..cad875cb8b4d
--- /dev/null
+++ b/benchmarks/tinymembench/Makefile
@@ -0,0 +1,23 @@
+PORTNAME= tinymembench
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.4
+CATEGORIES= benchmarks
+
+MAINTAINER= ehaupt@FreeBSD.org
+COMMENT= Simple benchmark for memory throughput and latency
+WWW= https://github.com/ssvb/tinymembench
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= gmake
+USE_GCC= yes
+USE_GITHUB= yes
+GH_ACCOUNT= ssvb
+
+PLIST_FILES= bin/tinymembench
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/benchmarks/tinymembench/distinfo b/benchmarks/tinymembench/distinfo
new file mode 100644
index 000000000000..09b5d4be0996
--- /dev/null
+++ b/benchmarks/tinymembench/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703098360
+SHA256 (ssvb-tinymembench-v0.4_GH0.tar.gz) = e37a2682065b2778f2fa7f22bd59472f5ca2191be48503952ae020b8f023f23d
+SIZE (ssvb-tinymembench-v0.4_GH0.tar.gz) = 13564
diff --git a/benchmarks/tinymembench/files/patch-Makefile b/benchmarks/tinymembench/files/patch-Makefile
new file mode 100644
index 000000000000..a5969ae8dc04
--- /dev/null
+++ b/benchmarks/tinymembench/files/patch-Makefile
@@ -0,0 +1,40 @@
+--- Makefile.orig 2016-03-30 04:42:59 UTC
++++ Makefile
+@@ -1,29 +1,27 @@ all: tinymembench
+ all: tinymembench
+
+-ifdef WINDIR
+- CC = gcc
+-endif
++CC ?= gcc
+
+ tinymembench: main.c util.o util.h asm-opt.h version.h asm-opt.o x86-sse2.o arm-neon.o mips-32.o aarch64-asm.o
+- ${CC} -O2 ${CFLAGS} -o tinymembench main.c util.o asm-opt.o x86-sse2.o arm-neon.o mips-32.o aarch64-asm.o -lm
++ ${CC} ${CFLAGS} -o tinymembench main.c util.o asm-opt.o x86-sse2.o arm-neon.o mips-32.o aarch64-asm.o -lm
+
+ util.o: util.c util.h
+- ${CC} -O2 ${CFLAGS} -c util.c
++ ${CC} ${CFLAGS} -c util.c
+
+ asm-opt.o: asm-opt.c asm-opt.h x86-sse2.h arm-neon.h mips-32.h
+- ${CC} -O2 ${CFLAGS} -c asm-opt.c
++ ${CC} ${CFLAGS} -c asm-opt.c
+
+ x86-sse2.o: x86-sse2.S
+- ${CC} -O2 ${CFLAGS} -c x86-sse2.S
++ ${CC} ${CFLAGS} -c x86-sse2.S
+
+ arm-neon.o: arm-neon.S
+- ${CC} -O2 ${CFLAGS} -c arm-neon.S
++ ${CC} ${CFLAGS} -c arm-neon.S
+
+ aarch64-asm.o: aarch64-asm.S
+- ${CC} -O2 ${CFLAGS} -c aarch64-asm.S
++ ${CC} ${CFLAGS} -c aarch64-asm.S
+
+ mips-32.o: mips-32.S
+- ${CC} -O2 ${CFLAGS} -c mips-32.S
++ ${CC} ${CFLAGS} -c mips-32.S
+
+ clean:
+ -rm -f tinymembench
diff --git a/benchmarks/tinymembench/files/patch-aarch64-asm.S b/benchmarks/tinymembench/files/patch-aarch64-asm.S
new file mode 100644
index 000000000000..b7c404b11042
--- /dev/null
+++ b/benchmarks/tinymembench/files/patch-aarch64-asm.S
@@ -0,0 +1,8 @@
+--- aarch64-asm.S.orig 2016-03-30 04:42:59 UTC
++++ aarch64-asm.S
+@@ -123,3 +123,5 @@ asm_function aligned_block_copy_ld1st1_aarch64
+ .endfunc
+
+ #endif
++
++.section .note.GNU-stack,"",@progbits
diff --git a/benchmarks/tinymembench/files/patch-arm-neon.S b/benchmarks/tinymembench/files/patch-arm-neon.S
new file mode 100644
index 000000000000..0442c9a67c5d
--- /dev/null
+++ b/benchmarks/tinymembench/files/patch-arm-neon.S
@@ -0,0 +1,8 @@
+--- arm-neon.S.orig 2016-03-30 04:42:59 UTC
++++ arm-neon.S
+@@ -473,3 +473,5 @@ asm_function aligned_block_copy_vfp
+ .endfunc
+
+ #endif
++
++.section .note.GNU-stack,"",@progbits
diff --git a/benchmarks/tinymembench/files/patch-mips-32.S b/benchmarks/tinymembench/files/patch-mips-32.S
new file mode 100644
index 000000000000..69e6d7b61d84
--- /dev/null
+++ b/benchmarks/tinymembench/files/patch-mips-32.S
@@ -0,0 +1,8 @@
+--- mips-32.S.orig 2016-03-30 04:42:59 UTC
++++ mips-32.S
+@@ -181,3 +181,5 @@ asm_function aligned_block_copy_pf32_mips32
+ .endfunc
+
+ #endif
++
++.section .note.GNU-stack,"",@progbits
diff --git a/benchmarks/tinymembench/files/patch-x86-sse2.S b/benchmarks/tinymembench/files/patch-x86-sse2.S
new file mode 100644
index 000000000000..85acec1b372f
--- /dev/null
+++ b/benchmarks/tinymembench/files/patch-x86-sse2.S
@@ -0,0 +1,8 @@
+--- x86-sse2.S.orig 2016-03-30 04:42:59 UTC
++++ x86-sse2.S
+@@ -243,3 +243,5 @@ asm_function aligned_block_fill_nt_sse2
+ /*****************************************************************************/
+
+ #endif
++
++.section .note.GNU-stack,"",@progbits
diff --git a/benchmarks/tinymembench/pkg-descr b/benchmarks/tinymembench/pkg-descr
new file mode 100644
index 000000000000..a72e63c7da30
--- /dev/null
+++ b/benchmarks/tinymembench/pkg-descr
@@ -0,0 +1,5 @@
+This is a simple memory benchmark program, which tries to measure the
+peak bandwidth of sequential memory accesses and the latency of random
+memory accesses. Bandwidth is measured by running different assembly
+code for the aligned memory blocks and attempting different prefetch
+strategies.