mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
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.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
--- 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
|