Bart Smaalders wrote:
libmicro ports very easily; it's a good place to start....
Attached is a quick patch to make libmicro compile (and run by the looks of it, but I haven't tested extensively) on NetBSD.
The missing pthread_*_pshared calls shouldn't matter for NetBSD's libpthread, I have defined them as (0) in the patch.
Oh yeah, you'll need to compile with gmake, the BSD make doesn't like the Makefiles that much.
This should get you on your way to comparing performance.. do post the results if you run the tests, that'll be interesting.
- Frank
diff -c -r -N libMicro-0.3.0.old/Makefile.NetBSD libMicro-0.3.0/Makefile.NetBSD *** libMicro-0.3.0.old/Makefile.NetBSD Thu Jan 1 01:00:00 1970 --- libMicro-0.3.0/Makefile.NetBSD Tue Jan 24 10:10:01 2006 *************** *** 0 **** --- 1,45 ---- + # + # 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. + # + # ident "@(#)Makefile.Linux 1.5 05/08/04 SMI" + # + + + CC= gcc + + CFLAGS= -O2 -pthread + CPPFLAGS= -DUSE_SEMOP + MATHLIB= -lm + + ELIDED_BENCHMARKS= \ + cachetocache \ + atomic + + + include ../Makefile.com diff -c -r -N libMicro-0.3.0.old/bench libMicro-0.3.0/bench *** libMicro-0.3.0.old/bench Fri Aug 5 04:35:13 2005 --- libMicro-0.3.0/bench Tue Jan 24 10:16:24 2006 *************** *** 67,73 **** touch $IFILE ! ARCH=`arch -k` # produce benchmark header for easier comparisons --- 67,73 ---- touch $IFILE ! ARCH=`uname -m` # produce benchmark header for easier comparisons diff -c -r -N libMicro-0.3.0.old/libmicro.h libMicro-0.3.0/libmicro.h *** libMicro-0.3.0.old/libmicro.h Fri Aug 5 04:35:13 2005 --- libMicro-0.3.0/libmicro.h Tue Jan 24 10:05:10 2006 *************** *** 195,198 **** --- 195,203 ---- int fit_line(double *, double *, int, double *, double *); long long get_nsecs_resolution(); + #ifdef __NetBSD__ + #define pthread_mutexattr_setpshared(m,a) (0) + #define pthread_condattr_setpshared(m,a) (0) + #endif + #endif /* LIBMICRO_H */
_______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org