Remove libmicro from WIP, now that it is imported in pkgsrc
under benchmarks/libmicro.
This commit is contained in:
parent
2165bdba5f
commit
14f0055402
18 changed files with 1 additions and 587 deletions
3
Makefile
3
Makefile
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.3687 2009/11/19 14:22:06 fhajny Exp $
|
||||
# $Id: Makefile,v 1.3688 2009/11/22 00:55:57 jym-netbsd Exp $
|
||||
#
|
||||
|
||||
COMMENT= WIP pkgsrc packages
|
||||
|
@ -1038,7 +1038,6 @@ SUBDIR+= liblastfm
|
|||
SUBDIR+= liblingoteach
|
||||
SUBDIR+= liblo
|
||||
SUBDIR+= libmemcached
|
||||
SUBDIR+= libmicro
|
||||
SUBDIR+= libmrss
|
||||
SUBDIR+= libmusclecard
|
||||
SUBDIR+= libnettle
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
LibMicro is a portable set of microbenchmarks that many Solaris engineers
|
||||
used during Solaris 10 development to measure the performance of various
|
||||
system and library calls. LibMicro was developed by Bart Smaalders and
|
||||
Phil Harman as part of their 'If Linux is faster it's a Solaris bug
|
||||
performance' campaign.
|
|
@ -1,24 +0,0 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.3 2009/11/17 20:26:56 jym-netbsd Exp $
|
||||
|
||||
Execute "run-libmicro" to run the benchmark.
|
||||
|
||||
You can pipe the output of "run-libmicro" to a file, and process it later
|
||||
via "multiview" when you need to generate an HTML report.
|
||||
|
||||
For example, suppose you want to compare two runs. You can do:
|
||||
|
||||
$ run-libmicro > output.1
|
||||
$ run-libmicro > output.2
|
||||
$ multiview output.1 output.2 > comparison.html
|
||||
|
||||
Then read 'comparison.html' in your favorite web browser.
|
||||
|
||||
WARNING: libMicro's results are strongly dependant of compile time options
|
||||
and compiler's optimizations. You must ensure that the compiler does
|
||||
not arbitrarily chose optimizations that do not fit the benchmark, or
|
||||
which may return irrelevant results. For example: over-simplification of
|
||||
the call-graph, load/store variables from register instead of memory,
|
||||
function vs builtin macro expansion, ...
|
||||
|
||||
===========================================================================
|
|
@ -1,72 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.2 2009/11/17 20:33:12 jym-netbsd Exp $
|
||||
#
|
||||
|
||||
DISTNAME= libmicro-${LIBMICRO_VERSION}
|
||||
CATEGORIES= benchmarks
|
||||
MASTER_SITES= http://hub.opensolaris.org/bin/download/Project+libmicro/files/
|
||||
|
||||
LIBMICRO_VERSION= 0.4.0
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://hub.opensolaris.org/bin/view/Project+libmicro/
|
||||
COMMENT= Set of utilities to benchmark productivity of system calls
|
||||
|
||||
LICENSE= cddl-1.0
|
||||
|
||||
WRKSRC= ${WRKDIR}/libMicro-${LIBMICRO_VERSION}
|
||||
|
||||
USE_TOOLS= gmake tee
|
||||
BUILD_TARGET= default
|
||||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
INSTALLATION_DIRS= bin
|
||||
INSTALLATION_DIRS+= libexec/${PKGBASE}
|
||||
INSTALLATION_DIRS+= libexec/${PKGBASE}/bin
|
||||
INSTALLATION_DIRS+= libexec/${PKGBASE}/bin-${MACHINE_ARCH}
|
||||
|
||||
LIBMICRO_BASE= ${PREFIX}/libexec/${PKGBASE}
|
||||
|
||||
SUBST_CLASSES+= fix-arch
|
||||
SUBST_MESSAGE.fix-arch= Fix machine architecture path
|
||||
SUBST_STAGE.fix-arch= pre-configure
|
||||
SUBST_FILES.fix-arch= Makefile bench.sh wrapper.sh
|
||||
SUBST_SED.fix-arch= -e 's|@@MACHINE_ARCH@@|${MACHINE_ARCH:Q}|'
|
||||
|
||||
post-build:
|
||||
${SED} -e 's|@@DESTDIR@@|${DESTDIR:Q}|' \
|
||||
-e 's|@@PREFIX@@|${PREFIX:Q}|' \
|
||||
-e 's|@@PKGBASE@@|${PKGBASE:Q}|' \
|
||||
${FILESDIR}/run-libmicro > ${WRKDIR}/run-libmicro
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC}/bin; \
|
||||
for f in *; do \
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin-${MACHINE_ARCH}/$$f \
|
||||
${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}; \
|
||||
done
|
||||
cd ${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}; \
|
||||
for f in *; do \
|
||||
${LN} -s ../wrapper ../bin/$$f; \
|
||||
done
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin-${MACHINE_ARCH}/exec_bin \
|
||||
${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bench \
|
||||
${DESTDIR}${LIBMICRO_BASE}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/wrapper \
|
||||
${DESTDIR}${LIBMICRO_BASE}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/multiview \
|
||||
${DESTDIR}${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/run-libmicro \
|
||||
${DESTDIR}${PREFIX}/bin
|
||||
|
||||
benchmark:
|
||||
cd ${WRKSRC}; ./bench | ${TEE} libmicro.output
|
||||
|
||||
results:
|
||||
${MKDIR} /tmp/benches/`domainname`
|
||||
cd ${WRKSRC}; \
|
||||
./multiview libmicro.output > /tmp/benches/`domainname`/libmicro.`uname`-`uname -m`-`uname -r`.`hostname`.html
|
||||
|
||||
.include "../../mk/pthread.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
164
libmicro/PLIST
164
libmicro/PLIST
|
@ -1,164 +0,0 @@
|
|||
@comment $NetBSD: PLIST,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
bin/multiview
|
||||
bin/run-libmicro
|
||||
libexec/libmicro/bench
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/atomic
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/bind
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cachetocache
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cascade_cond
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cascade_fcntl
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cascade_flock
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cascade_lockf
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/cascade_mutex
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/chdir
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/close
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/close_tcp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/connection
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/dup
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/exec
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/exec_bin
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/exit
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/exp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/fcntl
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/fcntl_ndelay
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/file_lock
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/fork
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getcontext
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getenv
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getpeername
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getpid
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getrusage
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/getsockname
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/gettimeofday
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/isatty
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/listen
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/localtime_r
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/log
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/longjmp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/lrand48
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/lseek
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/malloc
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/memcpy
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/memmove
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/memrand
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/memset
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/mktime
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/mmap
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/mprotect
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/msync
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/munmap
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/mutex
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/nop
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/open
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/pipe
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/poll
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/pread
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/pthread_create
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/pwrite
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/read
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/realpath
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/recurse
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/select
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/semop
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/setcontext
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/setsockopt
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/sigaction
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/siglongjmp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/signal
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/sigprocmask
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/socket
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/socketpair
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/stat
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strcasecmp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strchr
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strcmp
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strcpy
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strftime
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strlen
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/strtol
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/system
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/tattle
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/time
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/times
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/write
|
||||
libexec/libmicro/bin-${MACHINE_ARCH}/writev
|
||||
libexec/libmicro/bin/atomic
|
||||
libexec/libmicro/bin/bind
|
||||
libexec/libmicro/bin/cachetocache
|
||||
libexec/libmicro/bin/cascade_cond
|
||||
libexec/libmicro/bin/cascade_fcntl
|
||||
libexec/libmicro/bin/cascade_flock
|
||||
libexec/libmicro/bin/cascade_lockf
|
||||
libexec/libmicro/bin/cascade_mutex
|
||||
libexec/libmicro/bin/chdir
|
||||
libexec/libmicro/bin/close
|
||||
libexec/libmicro/bin/close_tcp
|
||||
libexec/libmicro/bin/connection
|
||||
libexec/libmicro/bin/dup
|
||||
libexec/libmicro/bin/exec
|
||||
libexec/libmicro/bin/exit
|
||||
libexec/libmicro/bin/exp
|
||||
libexec/libmicro/bin/fcntl
|
||||
libexec/libmicro/bin/fcntl_ndelay
|
||||
libexec/libmicro/bin/file_lock
|
||||
libexec/libmicro/bin/fork
|
||||
libexec/libmicro/bin/getcontext
|
||||
libexec/libmicro/bin/getenv
|
||||
libexec/libmicro/bin/getpeername
|
||||
libexec/libmicro/bin/getpid
|
||||
libexec/libmicro/bin/getrusage
|
||||
libexec/libmicro/bin/getsockname
|
||||
libexec/libmicro/bin/gettimeofday
|
||||
libexec/libmicro/bin/isatty
|
||||
libexec/libmicro/bin/listen
|
||||
libexec/libmicro/bin/localtime_r
|
||||
libexec/libmicro/bin/log
|
||||
libexec/libmicro/bin/longjmp
|
||||
libexec/libmicro/bin/lrand48
|
||||
libexec/libmicro/bin/lseek
|
||||
libexec/libmicro/bin/malloc
|
||||
libexec/libmicro/bin/memcpy
|
||||
libexec/libmicro/bin/memmove
|
||||
libexec/libmicro/bin/memrand
|
||||
libexec/libmicro/bin/memset
|
||||
libexec/libmicro/bin/mktime
|
||||
libexec/libmicro/bin/mmap
|
||||
libexec/libmicro/bin/mprotect
|
||||
libexec/libmicro/bin/msync
|
||||
libexec/libmicro/bin/munmap
|
||||
libexec/libmicro/bin/mutex
|
||||
libexec/libmicro/bin/nop
|
||||
libexec/libmicro/bin/open
|
||||
libexec/libmicro/bin/pipe
|
||||
libexec/libmicro/bin/poll
|
||||
libexec/libmicro/bin/pread
|
||||
libexec/libmicro/bin/pthread_create
|
||||
libexec/libmicro/bin/pwrite
|
||||
libexec/libmicro/bin/read
|
||||
libexec/libmicro/bin/realpath
|
||||
libexec/libmicro/bin/recurse
|
||||
libexec/libmicro/bin/select
|
||||
libexec/libmicro/bin/semop
|
||||
libexec/libmicro/bin/setcontext
|
||||
libexec/libmicro/bin/setsockopt
|
||||
libexec/libmicro/bin/sigaction
|
||||
libexec/libmicro/bin/siglongjmp
|
||||
libexec/libmicro/bin/signal
|
||||
libexec/libmicro/bin/sigprocmask
|
||||
libexec/libmicro/bin/socket
|
||||
libexec/libmicro/bin/socketpair
|
||||
libexec/libmicro/bin/stat
|
||||
libexec/libmicro/bin/strcasecmp
|
||||
libexec/libmicro/bin/strchr
|
||||
libexec/libmicro/bin/strcmp
|
||||
libexec/libmicro/bin/strcpy
|
||||
libexec/libmicro/bin/strftime
|
||||
libexec/libmicro/bin/strlen
|
||||
libexec/libmicro/bin/strtol
|
||||
libexec/libmicro/bin/system
|
||||
libexec/libmicro/bin/tattle
|
||||
libexec/libmicro/bin/time
|
||||
libexec/libmicro/bin/times
|
||||
libexec/libmicro/bin/write
|
||||
libexec/libmicro/bin/writev
|
||||
libexec/libmicro/wrapper
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: distinfo,v 1.2 2009/11/17 20:33:12 jym-netbsd Exp $
|
||||
|
||||
SHA1 (libmicro-0.4.0.tar.gz) = bf73af51610f08c9fb50025beb3ee86718a11596
|
||||
RMD160 (libmicro-0.4.0.tar.gz) = 5d844892cbe9fcc77fd3479c54d7135b196a0097
|
||||
Size (libmicro-0.4.0.tar.gz) = 48858 bytes
|
||||
SHA1 (patch-aa) = e322da8461bfcc94834593725ffd58672972eb97
|
||||
SHA1 (patch-ab) = 73d29b9b236b91debdb5300bc2e2d3ddaa118106
|
||||
SHA1 (patch-ac) = 9122460e392d57be14257ee379ce79e680c88434
|
||||
SHA1 (patch-ad) = 1fb254250a40ec35c05c3653145c8bb4d5d78d77
|
||||
SHA1 (patch-ae) = be1c805cf631912e76fbeced5b42fe0b92054b96
|
||||
SHA1 (patch-af) = 78cbd223f462ce5854539b08fd26184cf97d8282
|
||||
SHA1 (patch-ag) = fdec73e5d55ea0c594e77c920f985a5c3a3f5768
|
||||
SHA1 (patch-ah) = 7507bded72b5db04dc7c61cd3498b0cbf793f69c
|
||||
SHA1 (patch-ai) = af43c6061b1dd4b36cbe25887414580ca648b8e2
|
||||
SHA1 (patch-aj) = 6142d17c1d1a461bf114319e0ebcc5a516dab486
|
||||
SHA1 (patch-ak) = f44b5e9c8d2182873978af9396ffc3e513ce6af8
|
|
@ -1,4 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
cd @@DESTDIR@@/@@PREFIX@@/libexec/@@PKGBASE@@
|
||||
./bench
|
|
@ -1,46 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- /dev/null 2009-11-14 23:45:08.000000000 +0100
|
||||
+++ Makefile.NetBSD
|
||||
@@ -0,0 +1,41 @@
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms
|
||||
+# of the Common Development and Distribution License
|
||||
+# (the "License"). You may not use this file except
|
||||
+# in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at
|
||||
+# src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing
|
||||
+# permissions and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL
|
||||
+# HEADER in each file and include the License file at
|
||||
+# usr/src/OPENSOLARIS.LICENSE. If applicable,
|
||||
+# add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your
|
||||
+# own identifying information: Portions Copyright [yyyy]
|
||||
+# [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
||||
+# Use is subject to license terms.
|
||||
+#
|
||||
+
|
||||
+
|
||||
+CC= gcc
|
||||
+
|
||||
+CFLAGS= -O -DUSE_SEMOP
|
||||
+CPPFLAGS= -DUSE_SEMOP
|
||||
+MATHLIB= -lm
|
||||
+
|
||||
+ELIDED_BENCHMARKS= \
|
||||
+ cachetocache
|
||||
+
|
||||
+include ../Makefile.com
|
|
@ -1,42 +0,0 @@
|
|||
$NetBSD: patch-ab,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- cascade_mutex.c.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ cascade_mutex.c
|
||||
@@ -79,7 +79,9 @@ benchmark_init()
|
||||
lm_defN = "cscd_mutex";
|
||||
|
||||
(void) sprintf(lm_usage,
|
||||
+#if !defined(__NetBSD__)
|
||||
" [-s] (force PTHREAD_PROCESS_SHARED)\n"
|
||||
+#endif
|
||||
"notes: thread cascade using pthread_mutexes\n");
|
||||
|
||||
return (0);
|
||||
@@ -90,9 +92,11 @@ int
|
||||
benchmark_optswitch(int opt, char *optarg)
|
||||
{
|
||||
switch (opt) {
|
||||
+#if !defined(__NetBSD__)
|
||||
case 's':
|
||||
opts = 1;
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
@@ -119,6 +123,7 @@ benchmark_initrun()
|
||||
}
|
||||
|
||||
(void) pthread_mutexattr_init(&ma);
|
||||
+#if !defined(__NetBSD__)
|
||||
if (lm_optP > 1 || opts) {
|
||||
(void) pthread_mutexattr_setpshared(&ma,
|
||||
PTHREAD_PROCESS_SHARED);
|
||||
@@ -126,6 +131,7 @@ benchmark_initrun()
|
||||
(void) pthread_mutexattr_setpshared(&ma,
|
||||
PTHREAD_PROCESS_PRIVATE);
|
||||
}
|
||||
+#endif
|
||||
|
||||
for (i = 0; i < nlocks; i++) {
|
||||
(void) pthread_mutex_init(&locks[i], &ma);
|
|
@ -1,42 +0,0 @@
|
|||
$NetBSD: patch-ac,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- cascade_cond.c.orig 2009-11-14 23:56:51.000000000 +0100
|
||||
+++ cascade_cond.c
|
||||
@@ -83,7 +83,9 @@ benchmark_init()
|
||||
|
||||
(void) sprintf(lm_usage,
|
||||
" [-o] (do signal outside mutex)\n"
|
||||
+#if !defined(__NetBSD__)
|
||||
" [-s] (force PTHREAD_PROCESS_SHARED)\n"
|
||||
+#endif
|
||||
"notes: thread cascade using pthread_conds\n");
|
||||
|
||||
return (0);
|
||||
@@ -97,9 +99,11 @@ benchmark_optswitch(int opt, char *optar
|
||||
case 'o':
|
||||
opto = 1;
|
||||
break;
|
||||
+#if !defined(__NetBSD__)
|
||||
case 's':
|
||||
opts = 1;
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
@@ -148,6 +152,7 @@ benchmark_initrun()
|
||||
|
||||
(void) pthread_mutexattr_init(&ma);
|
||||
(void) pthread_condattr_init(&ca);
|
||||
+#if !defined(__NetBSD__)
|
||||
if (lm_optP > 1 || opts) {
|
||||
(void) pthread_mutexattr_setpshared(&ma,
|
||||
PTHREAD_PROCESS_SHARED);
|
||||
@@ -159,6 +164,7 @@ benchmark_initrun()
|
||||
(void) pthread_condattr_setpshared(&ca,
|
||||
PTHREAD_PROCESS_PRIVATE);
|
||||
}
|
||||
+#endif
|
||||
|
||||
for (i = 0; i < nlocks; i++) {
|
||||
(void) pthread_mutex_init(&mxs[i], &ma);
|
|
@ -1,38 +0,0 @@
|
|||
$NetBSD: patch-ad,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- mutex.c.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ mutex.c
|
||||
@@ -59,7 +59,9 @@ benchmark_init()
|
||||
|
||||
(void) sprintf(lm_usage,
|
||||
" [-t] (create dummy thread so we are multithreaded)\n"
|
||||
+#if !defined(__NetBSD__)
|
||||
" [-p] (use inter-process mutex (not support everywhere))\n"
|
||||
+#endif
|
||||
" [-h usecs] (specify mutex hold time (default 0)\n"
|
||||
"notes: measures uncontended pthread_mutex_[un,]lock\n");
|
||||
|
||||
@@ -75,9 +77,11 @@ int
|
||||
benchmark_optswitch(int opt, char *optarg)
|
||||
{
|
||||
switch (opt) {
|
||||
+#if !defined(__NetBSD__)
|
||||
case 'p':
|
||||
optp = 1;
|
||||
break;
|
||||
+#endif
|
||||
|
||||
case 't':
|
||||
optt = 1;
|
||||
@@ -121,9 +125,11 @@ benchmark_initrun()
|
||||
errors++;
|
||||
} else {
|
||||
(void) pthread_mutexattr_init(&attr);
|
||||
+#if !defined(__NetBSD__)
|
||||
if (optp)
|
||||
(void) pthread_mutexattr_setpshared(&attr,
|
||||
PTHREAD_PROCESS_SHARED);
|
||||
+#endif
|
||||
|
||||
if (pthread_mutex_init(lock, &attr) != 0)
|
||||
errors++;
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ae,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- Makefile.com.orig 2009-11-15 00:05:16.000000000 +0100
|
||||
+++ Makefile.com
|
||||
@@ -107,7 +107,7 @@ tattle: ../tattle.c libmicro.a
|
||||
echo "char * compiler_version = \""`$(COMPILER_VERSION_CMD)`"\";" > tattle.h
|
||||
echo "char * CC = \""$(CC)"\";" >> tattle.h
|
||||
echo "char * extra_compiler_flags = \""$(extra_CFLAGS)"\";" >> tattle.h
|
||||
- $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lrt -lm
|
||||
+ $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lpthread -lrt -lm
|
||||
|
||||
$(ELIDED_BENCHMARKS): ../elided.c
|
||||
$(CC) -o $(@) ../elided.c
|
|
@ -1,27 +0,0 @@
|
|||
$NetBSD: patch-af,v 1.2 2009/11/17 20:33:12 jym-netbsd Exp $
|
||||
|
||||
--- bench.sh.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ bench.sh
|
||||
@@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2
|
||||
|
||||
touch $IFILE
|
||||
|
||||
-ARCH=`arch -k`
|
||||
+ARCH=@@MACHINE_ARCH@@
|
||||
|
||||
# produce benchmark header for easier comparisons
|
||||
|
||||
@@ -83,6 +83,13 @@ if [ -f /proc/cpuinfo ]; then
|
||||
p_type=`awk -F: '/model name/{print $2; exit}' /proc/cpuinfo`
|
||||
fi
|
||||
|
||||
+if [ x"`uname -s`" = x"NetBSD" ]; then
|
||||
+ p_count=`sysctl -n hw.ncpu`
|
||||
+ p_mhz=`sysctl -n machdep.tsc_freq \
|
||||
+ | awk '{printf("%.4fMHz\n",$1/1000000)}'`
|
||||
+ p_type=`sysctl -n hw.model`
|
||||
+fi
|
||||
+
|
||||
printf "!Libmicro_#: %30s\n" $libmicro_version
|
||||
printf "!Options: %30s\n" "$OPTS"
|
||||
printf "!Machine_name: %30s\n" $hostname
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ag,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- longjmp.c.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ longjmp.c
|
||||
@@ -51,7 +51,7 @@ benchmark_init()
|
||||
int
|
||||
benchmark(void *tsd, result_t *res)
|
||||
{
|
||||
- int i = 0;
|
||||
+ volatile int i = 0;
|
||||
jmp_buf env;
|
||||
|
||||
(void) setjmp(env);
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ah,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- siglongjmp.c.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ siglongjmp.c
|
||||
@@ -56,7 +56,7 @@ benchmark(void *tsd, result_t *res)
|
||||
{
|
||||
tsd_t *ts = (tsd_t *)tsd;
|
||||
|
||||
- int i = 0;
|
||||
+ volatile int i = 0;
|
||||
|
||||
(void) sigsetjmp(ts->ts_env, 1);
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
$NetBSD: patch-ai,v 1.1.1.1 2009/11/15 20:48:01 jym-netbsd Exp $
|
||||
|
||||
--- multiview.sh.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ multiview.sh
|
||||
@@ -38,15 +38,15 @@
|
||||
# the redder the color, the slower the result, the greener the
|
||||
# faster
|
||||
|
||||
-/bin/nawk ' BEGIN {
|
||||
+awk ' BEGIN {
|
||||
benchmark_count = 0;
|
||||
header_count = 0;
|
||||
}
|
||||
/^#/ {
|
||||
- continue;
|
||||
+ next;
|
||||
}
|
||||
/errors/ {
|
||||
- continue;
|
||||
+ next;
|
||||
}
|
||||
/^\!/ {
|
||||
split($0, A_header, ":");
|
||||
@@ -57,7 +57,7 @@
|
||||
header_names[name] = ++header_count;
|
||||
headers[header_count] = name;
|
||||
}
|
||||
- continue;
|
||||
+ next;
|
||||
}
|
||||
|
||||
{
|
|
@ -1,12 +0,0 @@
|
|||
$NetBSD: patch-aj,v 1.1 2009/11/17 20:33:12 jym-netbsd Exp $
|
||||
|
||||
--- wrapper.sh.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ wrapper.sh
|
||||
@@ -32,6 +32,6 @@
|
||||
|
||||
BASENAME=`basename $0`
|
||||
DIRNAME=`dirname $0`
|
||||
-ARCH=`uname -m`
|
||||
+ARCH=@@MACHINE_ARCH@@
|
||||
|
||||
exec $DIRNAME/../bin-$ARCH/$BASENAME "$@"
|
|
@ -1,22 +0,0 @@
|
|||
$NetBSD: patch-ak,v 1.1 2009/11/17 20:33:12 jym-netbsd Exp $
|
||||
|
||||
--- Makefile.orig 2007-07-02 23:17:45.000000000 +0200
|
||||
+++ Makefile
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
include Makefile.benchmarks
|
||||
|
||||
+ARCH=@@MACHINE_ARCH@@
|
||||
+
|
||||
BINS= $(ALL:%=bin/%) bin/tattle
|
||||
|
||||
TARBALL_CONTENTS = \
|
||||
@@ -73,7 +75,7 @@ default $(ALL) run cstyle lint tattle: $
|
||||
@cp multiview.sh multiview
|
||||
@cp wrapper.sh wrapper
|
||||
@chmod +x bench multiview wrapper
|
||||
- @mkdir -p bin-`uname -m`; cd bin-`uname -m`; MACH=`uname -m` $(MAKE) -f ../Makefile.`uname -s` UNAME_RELEASE=`uname -r | sed 's/\./_/g'` $@
|
||||
+ @mkdir -p bin-$(ARCH); cd bin-$(ARCH); MACH=$(ARCH) $(MAKE) -f ../Makefile.`uname -s` UNAME_RELEASE=`uname -r | sed 's/\./_/g'` $@
|
||||
|
||||
clean:
|
||||
rm -rf bin bin-* wrapper multiview bench
|
Loading…
Reference in a new issue