Date: Wed, 14 Jan 2015 15:49:56 +0000 (UTC) From: Rodrigo Osorio <rodrigo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r377022 - in head/benchmarks: . dhrystone dhrystone/files Message-ID: <201501141549.t0EFnu0O056679@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rodrigo Date: Wed Jan 14 15:49:55 2015 New Revision: 377022 URL: https://svnweb.freebsd.org/changeset/ports/377022 QAT: https://qat.redports.org/buildarchive/r377022/ Log: New port benchmarks/dhrystone : a computing benchmark for integer operations PR: 193153 Submitted by: Radim Kolar <hsn@sendmail.cz> Added: head/benchmarks/dhrystone/ head/benchmarks/dhrystone/Makefile (contents, props changed) head/benchmarks/dhrystone/distinfo (contents, props changed) head/benchmarks/dhrystone/files/ head/benchmarks/dhrystone/files/patch-hz (contents, props changed) head/benchmarks/dhrystone/files/patch-includes (contents, props changed) head/benchmarks/dhrystone/pkg-descr (contents, props changed) Modified: head/benchmarks/Makefile Modified: head/benchmarks/Makefile ============================================================================== --- head/benchmarks/Makefile Wed Jan 14 14:40:44 2015 (r377021) +++ head/benchmarks/Makefile Wed Jan 14 15:49:55 2015 (r377022) @@ -10,6 +10,7 @@ SUBDIR += cpipe SUBDIR += dbench SUBDIR += dbs + SUBDIR += dhrystone SUBDIR += dkftpbench SUBDIR += expedite SUBDIR += fhourstones Added: head/benchmarks/dhrystone/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/dhrystone/Makefile Wed Jan 14 15:49:55 2015 (r377022) @@ -0,0 +1,43 @@ +# Created by: Radim Kolar <hsn@sendmail.cz> +# $FreeBSD$ + +PORTNAME= dhrystone +PORTVERSION= 2.1 +CATEGORIES= benchmarks +MASTER_SITES= ${MASTER_SITE_NETLIB} +MASTER_SITE_SUBDIR=benchmark +DISTNAME= dhry-c +EXTRACT_SUFX= + +MAINTAINER= hsn@sendmail.cz +COMMENT= Computing benchmark for integer operations + +LICENSE= BSD2CLAUSE + +EXTRACT_CMD= ${MKDIR} ${WRKSRC};cd ${WRKSRC} && ${SH} + +PLIST_FILES= bin/dhry + +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MDOCS} +PORTDOCS= RATIONALE submit.frm README_C VARIATIONS +.endif + +do-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} -c dhry_1.c && \ + ${CC} ${CFLAGS} -c dhry_2.c && \ + ${CC} -o dhry *.o + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/dhry ${STAGEDIR}${PREFIX}/bin +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor +.endif + +.include <bsd.port.mk> Added: head/benchmarks/dhrystone/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/dhrystone/distinfo Wed Jan 14 15:49:55 2015 (r377022) @@ -0,0 +1,2 @@ +SHA256 (dhry-c) = 038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e +SIZE (dhry-c) = 72812 Added: head/benchmarks/dhrystone/files/patch-hz ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/dhrystone/files/patch-hz Wed Jan 14 15:49:55 2015 (r377022) @@ -0,0 +1,24 @@ +diff -Naur drystone-2.1/dhry.h drystone-patched/dhry.h +--- dhry.h 2014-08-30 16:32:37.000000000 +0200 ++++ dhry.h 2014-08-30 16:37:44.933675426 +0200 +@@ -385,6 +385,8 @@ + + #include <stdio.h> + /* for strcpy, strcmp */ ++#include <unistd.h> ++ /* for sysconf */ + + #define Null 0 + /* Value of a Null pointer */ +diff -Naur drystone-2.1/dhry_1.c drystone-patched/dhry_1.c +--- dhry_1.c 2014-08-30 16:32:37.000000000 +0200 ++++ dhry_1.c 2014-08-30 16:44:20.484050144 +0200 +@@ -262,6 +262,8 @@ + / (float) Number_Of_Runs; + Dhrystones_Per_Second = (float) Number_Of_Runs / (float) User_Time; + #else ++ ++ int HZ = sysconf(_SC_CLK_TCK); + Microseconds = (float) User_Time * Mic_secs_Per_Second + / ((float) HZ * ((float) Number_Of_Runs)); + Dhrystones_Per_Second = ((float) HZ * (float) Number_Of_Runs) Added: head/benchmarks/dhrystone/files/patch-includes ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/dhrystone/files/patch-includes Wed Jan 14 15:49:55 2015 (r377022) @@ -0,0 +1,33 @@ +diff -Naur drystone-patched/dhry.h dhrystone-working/dhry.h +--- dhry.h 2014-08-30 16:37:44.933675426 +0200 ++++ dhry.h 2014-08-30 17:22:14.124345711 +0200 +@@ -384,7 +384,10 @@ + /* General definitions: */ + + #include <stdio.h> ++#include <string.h> + /* for strcpy, strcmp */ ++#include <stdlib.h> ++ /* for malloc */ + #include <unistd.h> + /* for sysconf */ + +diff -Naur drystone-patched/dhry_1.c dhrystone-working/dhry_1.c +--- dhry_1.c 2014-08-30 16:44:20.484050144 +0200 ++++ dhry_1.c 2014-08-30 17:12:06.705379492 +0200 +@@ -28,7 +28,6 @@ + int Arr_1_Glob [50]; + int Arr_2_Glob [50] [50]; + +-extern char *malloc (); + Enumeration Func_1 (); + /* forward declaration necessary since Enumeration may not simply be int */ + +@@ -45,7 +44,6 @@ + + #ifdef TIMES + struct tms time_info; +-extern int times (); + /* see library function "times" */ + #define Too_Small_Time 120 + /* Measurements should last at least about 2 seconds */ Added: head/benchmarks/dhrystone/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/dhrystone/pkg-descr Wed Jan 14 15:49:55 2015 (r377022) @@ -0,0 +1,12 @@ +Dhrystone benchmark + +Dhrystone is a synthetic computing benchmark program developed in 1984 +by Reinhold P. Weicker intended to be representative of system (integer) +programming. The Dhrystone grew to become representative of general +processor (CPU) performance. + +DMIPS value is result of dhrystone test divided by 1757, results are often +reported in DMIPS/Mhz. For more information, see +http://en.wikipedia.org/wiki/Dhrystone + +WWW: http://www.netlib.org/benchmark/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501141549.t0EFnu0O056679>