From nobody Thu Feb 16 12:52:53 2023
X-Original-To: dev-commits-ports-main@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 4PHZc56gfkz3qPwx;
Thu, 16 Feb 2023 12:52:53 +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 4PHZc567LYz3KLP;
Thu, 16 Feb 2023 12:52:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1676551973;
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=0+2XGDFkQwi+mHCUPokUiRhvLDPabYO4Bmwm/3ZRE0k=;
b=nu6/gHrZtbXFT3Qu/MnSJJphafSXUFK0wqE/glACzZkjA8jsH3X90b7muzsYff+6QV3g8L
N+zKdj/tQU2T/5+kj/YkKNDzugjnPynppaxP4cg0cOS7bL34fpjtNtZZ3mDoAdXACkbe56
94lUxAoPQCvA8je0kHwov0mNDMzWTkPms3U4Zd30q3o0pZ31htiR6gMpm+wFYKdMfQ4reb
Z54c71RT4ChQt/eGCshHDPiT9n3G1ke8PutcQjDOhdgctj8+U94bY3F61/MV2h0t4ykPJG
PFJ1twhdWWpL6Jx2B73IAgFwdWK4diDuBN1OwxHky2IK6Pk7Sb5aH5xnYwyg8g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1676551973;
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=0+2XGDFkQwi+mHCUPokUiRhvLDPabYO4Bmwm/3ZRE0k=;
b=mOIJECqU8MO7V+uUSY8yhSjQf87WaVT53+khalXpv5GbxiGQtL/zw1MfNBx8T9QBHpQ3hn
Ok3PLaOa+ahJnKv/NDM0ALmCKK51RMt5qmwjn1u7DBObmMWxF8HASjPpjZxRQX4xkRPijI
jq4y6L8cfEcTtVXE38xUP7qB3wSSZTy6yJepVQfdNhagVccFO87A5hcpnIcjVYEZa7OxtM
Fn8UfLhTPqsCMjBhmbGdkgYJ+fCaiHLPczY3oteidyHim0w6cgkwkXE/Wsw9f0mKg/NiIf
Hk1wZwZPQnH2vnIkglK9mCiUHpu0kcXOzwK3CeavQX7T1MwD1k/pMiIiTnEjsw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676551973; a=rsa-sha256; cv=none;
b=nwEWKLT/AHvZIf/Qo1kmC1bazFbgw07G2vTjo5FR+uT5O+kG7g1VmB8ckFgPuXXWI5J0JG
dDWh0zOix247lLFhwKQ7yW9n60rNw7ZQLl15Vq0VRTbL03fLIvbAAwyF1XO8yV0ykqm3P5
W91nIcVtuqeKuxIm0w9CjsaBRNczTRwg6WhKmLeRzHKOMhVqkIj0fYd5vX1koTC2FTGy/Z
JfbnCFbzoA+yACNDInoDM55749o6k7cMcuwRJx2ZMZAaW4ALoZF/5uwD9lUlc+ZItrGg3l
vIzaxvO5YD9PrAJMHWAXZu0WxHCZQqCc+ftsBivGqEeximrfmmbNEBJolNhsNA==
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 4PHZc559cxz147t;
Thu, 16 Feb 2023 12:52:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GCqrWT042179;
Thu, 16 Feb 2023 12:52:53 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GCqrJd042178;
Thu, 16 Feb 2023 12:52:53 GMT
(envelope-from git)
Date: Thu, 16 Feb 2023 12:52:53 GMT
Message-Id: <202302161252.31GCqrJd042178@gitrepo.freebsd.org>
To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org,
dev-commits-ports-main@FreeBSD.org
From: Luca Pizzamiglio
Subject: git: 48ccde43d59c - main - benchmarks/unixbench: Update to the latest commit
List-Id: Commits to the main branch of the FreeBSD ports repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
Sender: owner-dev-commits-ports-main@freebsd.org
X-BeenThere: dev-commits-ports-main@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pizzamig
X-Git-Repository: ports
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 48ccde43d59c16ce16c16ac7c49fa5f67e4731d5
Auto-Submitted: auto-generated
X-ThisMailContainsUnwantedMimeParts: N
The branch main has been updated by pizzamig:
URL: https://cgit.FreeBSD.org/ports/commit/?id=48ccde43d59c16ce16c16ac7c49fa5f67e4731d5
commit 48ccde43d59c16ce16c16ac7c49fa5f67e4731d5
Author: Luca Pizzamiglio
AuthorDate: 2023-02-16 12:44:16 +0000
Commit: Luca Pizzamiglio
CommitDate: 2023-02-16 12:44:16 +0000
benchmarks/unixbench: Update to the latest commit
Graphics always enabled
Reported by: Nilton Jose Rizzo
---
benchmarks/unixbench/Makefile | 10 ++-
benchmarks/unixbench/distinfo | 6 +-
benchmarks/unixbench/files/patch-Makefile | 67 +++++++++----------
benchmarks/unixbench/files/patch-Run | 92 +++++++++++++++++++-------
benchmarks/unixbench/files/patch-src_big.c | 11 ---
benchmarks/unixbench/files/patch-src_dhry__1.c | 19 ------
benchmarks/unixbench/files/patch-src_syscall.c | 11 ---
benchmarks/unixbench/pkg-descr | 6 ++
benchmarks/unixbench/pkg-plist | 1 +
9 files changed, 115 insertions(+), 108 deletions(-)
diff --git a/benchmarks/unixbench/Makefile b/benchmarks/unixbench/Makefile
index 6994ae3713f4..81d71c91c934 100644
--- a/benchmarks/unixbench/Makefile
+++ b/benchmarks/unixbench/Makefile
@@ -1,7 +1,7 @@
PORTNAME= unixbench
DISTVERSIONPREFIX= v
-DISTVERSION= 5.1.3
-PORTREVISION= 2
+DISTVERSION= 5.1.3-51
+DISTVERSIONSUFFIX= -g6705203
CATEGORIES= benchmarks
MAINTAINER= pizzamig@FreeBSD.org
@@ -12,11 +12,15 @@ LICENSE= GPLv2
RUN_DEPENDS= x11perf:x11/x11perf
-USES= gmake perl5 shebangfix
+USES= gmake gl perl5 shebangfix xorg
USE_GITHUB= yes
GH_ACCOUNT= kdlucas
GH_PROJECT= byte-unixbench
WRKSRC_SUBDIR= UnixBench
+USE_GL= gl
+USE_XORG= x11 xext
+CFLAGS+= -I${LOCALBASE}/include \
+ -L${LOCALBASE}/lib
SUB_FILES= unixbench
SHEBANG_FILES= Run pgms/gfx-x11
diff --git a/benchmarks/unixbench/distinfo b/benchmarks/unixbench/distinfo
index 0916f4bbfc18..e324f108b1a3 100644
--- a/benchmarks/unixbench/distinfo
+++ b/benchmarks/unixbench/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1503481858
-SHA256 (kdlucas-byte-unixbench-v5.1.3_GH0.tar.gz) = 3a6bb00f270a5329682dff20fd2c1ab5332ef046eb54a96a0d7bd371005d31a3
-SIZE (kdlucas-byte-unixbench-v5.1.3_GH0.tar.gz) = 145908
+TIMESTAMP = 1675975375
+SHA256 (kdlucas-byte-unixbench-v5.1.3-51-g6705203_GH0.tar.gz) = d94e504f6aac71ada43a3f0a92b7b29fe004da50eb0d40dacc065e4dbfa1f5df
+SIZE (kdlucas-byte-unixbench-v5.1.3-51-g6705203_GH0.tar.gz) = 155193
diff --git a/benchmarks/unixbench/files/patch-Makefile b/benchmarks/unixbench/files/patch-Makefile
index f0ddc57d3c29..282945fef972 100644
--- a/benchmarks/unixbench/files/patch-Makefile
+++ b/benchmarks/unixbench/files/patch-Makefile
@@ -1,15 +1,15 @@
---- Makefile.orig 2015-06-04 17:20:18 UTC
-+++ Makefile
-@@ -38,7 +38,7 @@
- ##############################################################################
-
- SHELL = /bin/sh
--
-+HZ = 128
- # GRAPHICS TESTS: Uncomment the definition of "GRAPHIC_TESTS" to enable
- # the building of the graphics benchmarks. This will require the
- # X11 libraries on your system.
-@@ -53,7 +53,7 @@ GL_LIBS = -lGL -lXext -lX11
+--- Makefile.orig 2023-02-07 23:18:07.000000000 +0100
++++ Makefile 2023-02-09 21:57:42.966634000 +0100
+@@ -46,7 +46,7 @@
+ # X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)
+ #
+ # Comment the line out to disable these tests.
+-# GRAPHIC_TESTS = defined
++GRAPHIC_TESTS = defined
+
+ # Set "GL_LIBS" to the libraries needed to link a GL program.
+ GL_LIBS = -lGL -lXext -lX11
+@@ -55,7 +55,7 @@
# COMPILER CONFIGURATION: Set "CC" to the name of the compiler to use
# to build the binary benchmarks. You should also set "$cCompiler" in the
# Run script to the name of the compiler you want to test.
@@ -17,30 +17,23 @@
+#CC=gcc
# OPTIMISATION SETTINGS:
-
-@@ -71,14 +71,14 @@ CC=gcc
- # -m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
-
- ## For Solaris 2, or general-purpose GCC 2.7.x
--OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
-+OPTON = -O2 -fomit-frame-pointer -ffast-math -Wall
-
- ## For Digital Unix v4.x, with DEC cc v5.x
- #OPTON = -O4
- #CFLAGS = -DTIME -std1 -verbose -w0
-
- ## generic gcc CFLAGS. -DTIME must be included.
--CFLAGS = -DTIME -Wall -pedantic -ansi
-+CFLAGS += -DTIME -Wall -pedantic -ansi
+ # Use gcc option if defined UB_GCC_OPTIONS via "Environment variable" or "Command-line arguments".
+@@ -87,7 +87,7 @@
+ ## (-ffast-math) disables strict IEEE or ISO rules/specifications for math funcs
+ OPTON = -O3 -ffast-math
+
+- ## OS detection. Comment out if gmake syntax not supported by other 'make'.
++ ## OS detection. Comment out if gmake syntax not supported by other 'make'.
+ OSNAME:=$(shell uname -s)
+ ARCH := $(shell uname -p)
+ ifeq ($(OSNAME),Linux)
+@@ -113,6 +113,9 @@
+ CFLAGS += -Wa,-q
+ endif
+
++ ifeq ($(OSNAME),FreeBSD)
++ OPTON += -march=native -mtune=native -fomit-frame-pointer
++ endif
+ endif
- ##############################################################################
-@@ -90,8 +90,6 @@ CFLAGS = -DTIME -Wall -pedantic -ansi
- PROGDIR = ./pgms
- SRCDIR = ./src
- TESTDIR = ./testdir
--RESULTDIR = ./results
--TMPDIR = ./tmp
- # other directories
- INCLDIR = /usr/include
- LIBDIR = /lib
diff --git a/benchmarks/unixbench/files/patch-Run b/benchmarks/unixbench/files/patch-Run
index 0c0c51fc42e0..0d9a131601f9 100644
--- a/benchmarks/unixbench/files/patch-Run
+++ b/benchmarks/unixbench/files/patch-Run
@@ -1,21 +1,21 @@
---- Run.orig 2020-06-11 08:18:10 UTC
-+++ Run
-@@ -91,10 +91,10 @@ chomp($BASEDIR);
- my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms");
+--- Run.orig 2023-02-09 22:21:08.690117000 +0100
++++ Run 2023-02-09 22:20:31.633214000 +0100
+@@ -91,10 +91,10 @@
+ my $BINDIR = getDir('UB_BINDIR', $FindBin::Bin . "/pgms");
# Temp directory, for temp files.
--my $TMPDIR = getDir('UB_TMPDIR', $BASEDIR . "/tmp");
+-my $TMPDIR = getDir('UB_TMPDIR', $FindBin::Bin . "/tmp");
+my $TMPDIR = "/tmp";
# Directory to put results in.
--my $RESULTDIR = getDir('UB_RESULTDIR', $BASEDIR . "/results");
+-my $RESULTDIR = getDir('UB_RESULTDIR', $FindBin::Bin . "/results");
+my $RESULTDIR = "/tmp";
# Directory where the tests are executed.
- my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir");
-@@ -672,6 +672,18 @@ sub processCpuFlags {
- # these fields:
- # describing the model etc. Returns undef if the information can't be got.
+ my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir");
+@@ -698,6 +698,18 @@
+ # future: on systems without /proc/cpuinfo, might check for Perl modules:
+ # Sys::Info::Device::CPU or Sys::CpuAffinity
sub getCpuInfo {
+ my $ncpu = getCmdOutput("sysctl -n hw.ncpu");
+ my $cpus = [ ];
@@ -29,17 +29,20 @@
+}
+
+sub getCpuInfoBak {
- open(my $fd, "<", "/proc/cpuinfo") || return undef;
-
- my $cpus = [ ];
-@@ -735,12 +747,10 @@ sub getSystemInfo {
+ if (!("$^O" eq "darwin")) {
+ open(my $fd, "<", "/proc/cpuinfo") || return undef;
+@@ -815,15 +827,11 @@
# Get the language info.
my $lang = getCmdOutput("printenv LANG");
-- my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap");
-+ my $map = getCmdOutput("locale -k | grep charmap");
+ my $map = $^O ne "aix"
+- ? getCmdOutput("locale -k LC_CTYPE | grep charmap") || ""
++ ? getCmdOutput("locale -k | grep charmap") || ""
+ : getCmdOutput("locale charmap") || "";
$map =~ s/.*=//;
-- my $coll = getCmdOutput("locale -k LC_COLLATE | grep collate-codeset");
+- my $coll = $^O ne "aix"
+- ? getCmdOutput("locale -k LC_COLLATE | grep collate-codeset") || ""
+- : getCmdOutput("locale | grep LC_COLLATE") || "";
- $coll =~ s/.*=//;
- $info->{'language'} = sprintf "%s (charmap=%s, collate=%s)",
- $lang, $map, $coll;
@@ -48,27 +51,27 @@
# Get details on the CPUs, if possible.
my $cpus = getCpuInfo();
-@@ -750,10 +760,9 @@ sub getSystemInfo {
+@@ -839,10 +847,9 @@
}
# Get graphics hardware info.
- $info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'");
-+ # $info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'");
++ #$info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'");
# Get system run state, load and usage info.
-- $info->{'runlevel'} = getCmdOutput("runlevel | cut -f2 -d\" \"");
+- $info->{'runlevel'} = getCmdOutput("who -r | awk '{print \$3}'");
$info->{'load'} = getCmdOutput("uptime");
$info->{'numUsers'} = getCmdOutput("who | wc -l");
-@@ -781,6 +790,7 @@ sub abortRun {
+@@ -870,6 +877,7 @@
# Do checks that everything's ready for testing.
sub preChecks {
-+ return;
++ return;
# Set the language.
$ENV{'LANG'} = $language;
-@@ -1386,7 +1396,7 @@ sub displaySystem {
+@@ -1476,7 +1484,7 @@
}
# Display system load and usage info.
@@ -77,7 +80,25 @@
}
-@@ -1603,8 +1613,8 @@ sub displaySystemHtml {
+@@ -1587,7 +1595,7 @@
+
+ # Write CSV Headers.
+ # e.g.: "Concurrency,Dhrystone 2 using register variables,Double-Precision Whetstone"
+-#
++#
+ sub summarizeRunCsvHeader {
+ my ( $results, $reportFd ) = @_;
+
+@@ -1612,7 +1620,7 @@
+
+ # Write concurrency value.
+ printf $reportFd "%d", $results->{'copies'};
+-
++
+ # Write test results.
+ my $isFirstColumn = 1;
+ foreach my $bench (@{$results->{'list'}}) {
+@@ -1735,8 +1743,8 @@
# Display system runlevel, load and usage info.
printf $fd "\n";
printf $fd " Uptime: | \n";
@@ -88,3 +109,26 @@
printf $fd "
\n";
printf $fd "
\n\n";
+@@ -1896,7 +1904,7 @@
+ $tests = $index;
+ }
+
+- # Create directories.
++ # Create directories.
+ my @creatingDirectories = ( ${TMPDIR}, ${RESULTDIR} );
+ createDirrectoriesIfNotExists(@creatingDirectories);
+
+@@ -1937,7 +1945,7 @@
+ my $isOutputFormatCsv = defined($ubOutputCsv) && $ubOutputCsv eq "true";
+ # If write CSV, header needs only once.
+ my $is_csv_header_written = 0;
+-
++
+ # Open the log file for writing.
+ open(my $reportFd, ">", $reportFile) ||
+ die("Run: can't write to $reportFile\n");
+@@ -1998,4 +2006,3 @@
+
+
+ exit(main(@ARGV));
+-
diff --git a/benchmarks/unixbench/files/patch-src_big.c b/benchmarks/unixbench/files/patch-src_big.c
deleted file mode 100644
index 7790317c2b9e..000000000000
--- a/benchmarks/unixbench/files/patch-src_big.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/big.c.orig 2015-06-04 17:20:18 UTC
-+++ src/big.c
-@@ -583,7 +583,7 @@ void dumpwork(void)
- void fatal(char *s)
- {
- int i;
-- fprintf(stderr, s);
-+ fprintf(stderr, "%s", s);
- fflush(stderr);
- perror("Reason?");
- fflush(stderr);
diff --git a/benchmarks/unixbench/files/patch-src_dhry__1.c b/benchmarks/unixbench/files/patch-src_dhry__1.c
deleted file mode 100644
index 26b7ced39c54..000000000000
--- a/benchmarks/unixbench/files/patch-src_dhry__1.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/dhry_1.c.orig 2015-06-04 17:20:18 UTC
-+++ src/dhry_1.c
-@@ -34,6 +34,7 @@
- ***************************************************************************/
- char SCCSid[] = "@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21";
-
-+#include
- #include
- #include
- #include
-@@ -81,7 +82,7 @@ extern int times ();
- /* Measurements should last at least about 2 seconds */
- #endif
- #ifdef TIME
--extern long time();
-+extern time_t time();
- /* see library function "time" */
- #define Too_Small_Time 2
- /* Measurements should last at least 2 seconds */
diff --git a/benchmarks/unixbench/files/patch-src_syscall.c b/benchmarks/unixbench/files/patch-src_syscall.c
deleted file mode 100644
index 9e920f1e1390..000000000000
--- a/benchmarks/unixbench/files/patch-src_syscall.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/syscall.c.orig 2015-06-04 17:20:18 UTC
-+++ src/syscall.c
-@@ -90,7 +90,7 @@ char *argv[];
- fprintf(stderr,"%s: fork failed\n", argv[0]);
- exit(1);
- } else if (pid == 0) {
-- execl("/bin/true", (char *) 0);
-+ execl("/bin/true", (char *) 0, (char *) 0);
- fprintf(stderr,"%s: exec /bin/true failed\n", argv[0]);
- exit(1);
- } else {
diff --git a/benchmarks/unixbench/pkg-descr b/benchmarks/unixbench/pkg-descr
index 2fbadcb302f9..9c5a6f61ef0a 100644
--- a/benchmarks/unixbench/pkg-descr
+++ b/benchmarks/unixbench/pkg-descr
@@ -1 +1,7 @@
UnixBench based on the BYTE UNIX Benchmarks v3.
+The purpose of UnixBench is to provide a basic indicator of the performance
+of a Unix-like system; hence, multiple tests are used to test various aspects of
+the system's performance. These test results are then compared to the scores
+from a baseline system to produce an index value, which is generally easier to
+handle than the raw scores. The entire set of index values is then combined to
+make an overall index for the system.
diff --git a/benchmarks/unixbench/pkg-plist b/benchmarks/unixbench/pkg-plist
index 6b7d6d2b3a39..d2e93d5c4ee3 100644
--- a/benchmarks/unixbench/pkg-plist
+++ b/benchmarks/unixbench/pkg-plist
@@ -23,6 +23,7 @@ libexec/unixbench/pgms/short
libexec/unixbench/pgms/spawn
libexec/unixbench/pgms/syscall
libexec/unixbench/pgms/tst.sh
+libexec/unixbench/pgms/ubgears
libexec/unixbench/pgms/unixbench.logo
libexec/unixbench/pgms/whetstone-double
libexec/unixbench/testdir/cctest.c