From owner-svn-ports-all@freebsd.org Thu Nov 19 15:09:00 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C436A32E0D; Thu, 19 Nov 2015 15:09:00 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB89414CE; Thu, 19 Nov 2015 15:08:59 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAJF8wfg082406; Thu, 19 Nov 2015 15:08:58 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJF8wS9082403; Thu, 19 Nov 2015 15:08:58 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201511191508.tAJF8wS9082403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Thu, 19 Nov 2015 15:08:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401950 - in head/benchmarks/interbench: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 15:09:00 -0000 Author: danfe Date: Thu Nov 19 15:08:58 2015 New Revision: 401950 URL: https://svnweb.freebsd.org/changeset/ports/401950 Log: - Drop requirement for linprocfs(5) to be mounted under /compat/linux/proc - Use `do-install-DOCS-on' target for docs and perform some minor cleanups Modified: head/benchmarks/interbench/Makefile head/benchmarks/interbench/files/patch-interbench.c head/benchmarks/interbench/pkg-descr Modified: head/benchmarks/interbench/Makefile ============================================================================== --- head/benchmarks/interbench/Makefile Thu Nov 19 14:25:13 2015 (r401949) +++ head/benchmarks/interbench/Makefile Thu Nov 19 15:08:58 2015 (r401950) @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= interbench -DISTVERSION= 0.31 +PORTVERSION= 0.31 +PORTREVISION= 1 CATEGORIES= benchmarks MASTER_SITES= http://ck.kolivas.org/apps/${PORTNAME}/ @@ -11,7 +12,7 @@ COMMENT= Interactivity benchmark for Uni LICENSE= GPLv2 -USES= tar:bzip2 gmake +USES= gmake tar:bzip2 MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" ALL_TARGET= ${PORTNAME} @@ -33,6 +34,8 @@ pre-build: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MANPREFIX}/man/man8 + +do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} Modified: head/benchmarks/interbench/files/patch-interbench.c ============================================================================== --- head/benchmarks/interbench/files/patch-interbench.c Thu Nov 19 14:25:13 2015 (r401949) +++ head/benchmarks/interbench/files/patch-interbench.c Thu Nov 19 15:08:58 2015 (r401950) @@ -1,14 +1,19 @@ ---- interbench.c.orig 2009-10-31 12:14:59.000000000 +0800 -+++ interbench.c 2013-03-11 20:56:50.000000000 +0800 -@@ -43,6 +43,7 @@ +--- interbench.c.orig 2009-10-31 04:14:59 UTC ++++ interbench.c +@@ -43,8 +43,12 @@ #include #include #include +#include #include #include ++#ifdef __FreeBSD__ ++#include ++#endif #include "interbench.h" -@@ -210,7 +211,7 @@ int test_fifo(void) + + #define MAX_UNAME_LENGTH 100 +@@ -210,7 +214,7 @@ int test_fifo(void) { struct sched_param sp; memset(&sp, 0, sizeof(sp)); @@ -17,7 +22,7 @@ if (sched_setscheduler(0, SCHED_FIFO, &sp) == -1) { if (errno != EPERM) terminal_error("sched_setscheduler"); -@@ -888,7 +889,7 @@ void *timekeeping_thread(void *t) +@@ -888,7 +892,7 @@ void *timekeeping_thread(void *t) * accurate accounting remains SCHED_NORMAL; */ if (th->dt != &th->benchmarks[NOT_BENCHING]) @@ -26,16 +31,37 @@ /* These values must be changed at the appropriate places or race */ tk->sleep_interval = tk->slept_interval = 0; post_sem(&s->ready); -@@ -1133,7 +1134,7 @@ void get_ram(void) +@@ -1130,6 +1134,7 @@ write: + + void get_ram(void) + { ++#if defined(__linux__) FILE *meminfo; char aux[256]; -- if(!(meminfo = fopen("/proc/meminfo", "r"))) -+ if(!(meminfo = fopen("/compat/linux/proc/meminfo", "r"))) - terminal_error("fopen"); +@@ -1143,6 +1148,21 @@ void get_ram(void) + fgets(aux,sizeof(aux),meminfo); + if (fclose(meminfo) == -1) + terminal_error("fclose"); ++#elif defined(__FreeBSD__) ++ long pagesize, numpages; ++ quad_t swap; ++ size_t len = sizeof(swap); ++ ++ pagesize = sysconf(_SC_PAGESIZE); ++ numpages = sysconf(_SC_PHYS_PAGES); ++ if (sysctlbyname("vm.swap_total", &swap, &len, 0x0, 0) == -1) ++ swap = 0; ++ ++ ud.ram = pagesize / 1024 * numpages; ++ ud.swap = swap / 1024; ++#else ++#error unsupported operating system ++#endif - ud.ram = ud.swap = 0; -@@ -1293,7 +1294,8 @@ void run_benchchild(int i, int j) + if( !ud.ram || !ud.swap ) { + unsigned long i; +@@ -1293,7 +1313,8 @@ void run_benchchild(int i, int j) thi->dt = &thi->benchmarks[j]; initialise_thread_data(thi->dt); if (ud.do_rt) @@ -45,7 +71,7 @@ /* Tell main we're ready */ wakeup_with(b2m[1]); -@@ -1344,7 +1346,7 @@ void bench(int i, int j) +@@ -1344,7 +1365,7 @@ void bench(int i, int j) * We want to be higher priority than everything to signal them to * stop and we lock our memory if we can as well */ @@ -54,7 +80,7 @@ set_mlock(); /* Wakeup the load process */ -@@ -1652,7 +1654,7 @@ bench: +@@ -1652,7 +1673,7 @@ bench: * To get as accurate a loop as possible we time it running * SCHED_FIFO if we can */ Modified: head/benchmarks/interbench/pkg-descr ============================================================================== --- head/benchmarks/interbench/pkg-descr Thu Nov 19 14:25:13 2015 (r401949) +++ head/benchmarks/interbench/pkg-descr Thu Nov 19 15:08:58 2015 (r401950) @@ -6,6 +6,4 @@ design or system configuration changes s system changes and options. With careful benchmarking, different hardware can be compared. -Requires linprocfs(5) to be mounted under /compat/linux/proc to run. - WWW: http://users.on.net/~ckolivas/interbench/