mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
benchmarks/tinymembench: Add new port
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.
This commit is contained in:
parent
77087bd1ef
commit
b2a837790c
@ -104,6 +104,7 @@
|
||||
SUBDIR += sysbench
|
||||
SUBDIR += tcpblast
|
||||
SUBDIR += thrulay
|
||||
SUBDIR += tinymembench
|
||||
SUBDIR += tsung
|
||||
SUBDIR += ttcp
|
||||
SUBDIR += typometer
|
||||
|
23
benchmarks/tinymembench/Makefile
Normal file
23
benchmarks/tinymembench/Makefile
Normal file
@ -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>
|
3
benchmarks/tinymembench/distinfo
Normal file
3
benchmarks/tinymembench/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1703098360
|
||||
SHA256 (ssvb-tinymembench-v0.4_GH0.tar.gz) = e37a2682065b2778f2fa7f22bd59472f5ca2191be48503952ae020b8f023f23d
|
||||
SIZE (ssvb-tinymembench-v0.4_GH0.tar.gz) = 13564
|
40
benchmarks/tinymembench/files/patch-Makefile
Normal file
40
benchmarks/tinymembench/files/patch-Makefile
Normal file
@ -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
|
8
benchmarks/tinymembench/files/patch-aarch64-asm.S
Normal file
8
benchmarks/tinymembench/files/patch-aarch64-asm.S
Normal file
@ -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
|
8
benchmarks/tinymembench/files/patch-arm-neon.S
Normal file
8
benchmarks/tinymembench/files/patch-arm-neon.S
Normal file
@ -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
|
8
benchmarks/tinymembench/files/patch-mips-32.S
Normal file
8
benchmarks/tinymembench/files/patch-mips-32.S
Normal file
@ -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
|
8
benchmarks/tinymembench/files/patch-x86-sse2.S
Normal file
8
benchmarks/tinymembench/files/patch-x86-sse2.S
Normal file
@ -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
|
5
benchmarks/tinymembench/pkg-descr
Normal file
5
benchmarks/tinymembench/pkg-descr
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user