summaryrefslogtreecommitdiff
path: root/benchmarks/libmicro/patches/patch-af
blob: 8054825573a4e48903536ab7846f0f57598ab0af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-af,v 1.1.1.1 2009/11/22 00:45:54 jym 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