From nobody Thu Dec 21 08:13:54 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Swjr259wHz54VJR; Thu, 21 Dec 2023 08:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Swjr24bS6z3Km6; Thu, 21 Dec 2023 08:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703146434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lcdk7U6wSsoyMupJrEGm7xl4ECK7M3t4m9sqt5tqBE0=; b=QSeS+MkDFU9R/Nd+TZ85flXKknM6Rgl2zLla1U2YGzPBy/iFIuIIRG97F7x2HVPbtm5t6e 1zVB4aKhM0cyTYv9o3kN23BlHdYWk3QDiXFfCBSSzmQNFY5860JmeG81fUN21TDY4v3EM8 7Nt4sOoyyx3X+R7VqvMOrB7fj9H+Bqoxlik91NrF9uovRdGDcMVn2u+6+qdeYQwxwKLqh+ 8VRtKgJWzfOIUiuYyAPzhp+fVNV5ijtcBvrqBZKeNF9CAkE19FZbnFlwhzL8KuyA01xAPr i5++gkQQ1ehFw1EH3TSMJtA5gQaGu2S2q6Z8TnUaHr7DiIvIPk/QX9HvmGJrvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703146434; a=rsa-sha256; cv=none; b=rCBQ4yPphrsOodOaLRzIYvcer8ZYmg5Ao/mbWz7Zf0igbMojxtk1KvYthyldvkUOEV6zA8 H4L8cWYLuu404RIr5M627vzGTzCHE1b2eXwkjQ3BAJa7anhMtl9wjTfOAqeuet0452irhd 4mSGQjZfP6zy/IFsMxwbSb30USZjMSTDZfvDuff5iodkP6x//8NbQLaWY5wGl0AqFZS8pv ejantKVElOK/I7cZXvEBlh2n1TzPm8Zi6BPozxqVCW7MYXjOP7byXA+P+zZht1ooNeSi9E omnM1JM0gCEZVP+RZ6na+Oq5wEP94ss31UkWfPOj+FR2p/ohSYO+NSGrjSAA3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703146434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lcdk7U6wSsoyMupJrEGm7xl4ECK7M3t4m9sqt5tqBE0=; b=LKLCi2E89WGh/8jz2wobPeo2KAfwePPIKAbSXytv+IiAvNRfLtf6EF5oHLXtMo955lb+nt jeMuXvKmmWVLjv0pmEw28FvAoBVsEWhhY0VcInaRqePno4vm83BGMHBnPoO6DBcAraipNm hxBAmVBVV1I8XPi7v1tcJ1GS9HJPCPEg/yaitogc5RiQLWbGgksjNUwJosjR50qifRPRWo hZ5YpQLYpIGpDoS0J2gOLKQrdnkuLjbsp58JVNeyL2oE6VQWCGH/aYmCs1CWCZimkAa9Eq eqSzo4T6j5iUE94SsQMb9tJvkb027WK1QO/7ms12Jm0btIrV+Avak9urk8sMQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Swjr23dsBz9GW; Thu, 21 Dec 2023 08:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BL8DsB2026524; Thu, 21 Dec 2023 08:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BL8Ds6m026521; Thu, 21 Dec 2023 08:13:54 GMT (envelope-from git) Date: Thu, 21 Dec 2023 08:13:54 GMT Message-Id: <202312210813.3BL8Ds6m026521@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Emanuel Haupt Subject: git: b2a837790c7e - main - benchmarks/tinymembench: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ehaupt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2a837790c7e63ae76f999c296d46be9f1517c03 Auto-Submitted: auto-generated The branch main has been updated by ehaupt: URL: https://cgit.FreeBSD.org/ports/commit/?id=b2a837790c7e63ae76f999c296d46be9f1517c03 commit b2a837790c7e63ae76f999c296d46be9f1517c03 Author: Emanuel Haupt AuthorDate: 2023-12-21 08:11:19 +0000 Commit: Emanuel Haupt CommitDate: 2023-12-21 08:11:19 +0000 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. --- benchmarks/Makefile | 1 + benchmarks/tinymembench/Makefile | 23 +++++++++++++ benchmarks/tinymembench/distinfo | 3 ++ benchmarks/tinymembench/files/patch-Makefile | 40 +++++++++++++++++++++++ benchmarks/tinymembench/files/patch-aarch64-asm.S | 8 +++++ benchmarks/tinymembench/files/patch-arm-neon.S | 8 +++++ benchmarks/tinymembench/files/patch-mips-32.S | 8 +++++ benchmarks/tinymembench/files/patch-x86-sse2.S | 8 +++++ benchmarks/tinymembench/pkg-descr | 5 +++ 9 files changed, 104 insertions(+) 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 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.