From 9f46113ae7c0834a6b301bd488baccb4c201d647 Mon Sep 17 00:00:00 2001 From: Jrabbit Date: Thu, 6 Jan 2011 14:34:54 +0000 Subject: [PATCH] initial bep file for iozone, for GCI --- app-benchmarks/iozone/iozone-3.326.bep | 20 ++ app-benchmarks/iozone/licenses/iozone | 16 ++ .../iozone/patches/iozone-3.326.patch | 234 ++++++++++++++++++ 3 files changed, 270 insertions(+) create mode 100644 app-benchmarks/iozone/iozone-3.326.bep create mode 100644 app-benchmarks/iozone/licenses/iozone create mode 100644 app-benchmarks/iozone/patches/iozone-3.326.patch diff --git a/app-benchmarks/iozone/iozone-3.326.bep b/app-benchmarks/iozone/iozone-3.326.bep new file mode 100644 index 000000000..73b7b44f4 --- /dev/null +++ b/app-benchmarks/iozone/iozone-3.326.bep @@ -0,0 +1,20 @@ +DESCRIPTION="Filesystem benchmarking program" +HOMEPAGE="http://www.iozone.org/" +SRC_URI="http://www.iozone.org/src/current/iozone3_326.tar" +CHECKSUM_MD5="e80f06da89d314f7fc08fcef4046d367" +REVISION="1" +STATUS_HAIKU="stable" +DEPEND="" +BUILD { + cd iozone3_326/src/current/ + make haiku +} +INSTALL { + cd iozone3_326/src/current/ + mkdir -p ${DESTDIR}/`finddir B_COMMON_BIN_DIRECTORY` + cp iozone ${DESTDIR}/`finddir B_COMMON_BIN_DIRECTORY`/iozone + cp fileop ${DESTDIR}/`finddir B_COMMON_BIN_DIRECTORY`/fileop +} +LICENSE="iozone" +COPYRIGHT="1991-2001, William D. Norcott + 2010, Don Capps" diff --git a/app-benchmarks/iozone/licenses/iozone b/app-benchmarks/iozone/licenses/iozone new file mode 100644 index 000000000..0ebf1ebf9 --- /dev/null +++ b/app-benchmarks/iozone/licenses/iozone @@ -0,0 +1,16 @@ +"License to freely use and distribute this software is hereby granted +by the author, subject to the condition that this copyright notice +remains intact. The author retains the exclusive right to publish +derivative works based on this work, including, but not limited to, +revised versions of this work" +THIS SOFTWARE IS PROVIDED BY DON CAPPS AND THE IOZONE CREW "AS IS +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE. \ No newline at end of file diff --git a/app-benchmarks/iozone/patches/iozone-3.326.patch b/app-benchmarks/iozone/patches/iozone-3.326.patch new file mode 100644 index 000000000..8d289bb91 --- /dev/null +++ b/app-benchmarks/iozone/patches/iozone-3.326.patch @@ -0,0 +1,234 @@ +diff -Naur iozone3_326/src/current/fileop.c iozone3_326.haiku/src/current/fileop.c +--- iozone3_326/src/current/fileop.c 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/fileop.c 2011-01-06 08:22:28.000000000 -0600 +@@ -116,7 +116,7 @@ + void file_read(int); + void splash(void); + void usage(void); +-void bzero(); ++//void bzero(); + void clear_stats(); + int validate(char *, int , char ); + +@@ -138,14 +138,15 @@ + /************************************************************************/ + void purge_buffer_cache() + { +- if (!mountname) +- return; ++ + + char cwd[PATH_MAX]; + char command[1024]; + int ret,i; + + getcwd(cwd, sizeof(cwd)); ++ if (!mountname) ++ return; + chdir("/"); + strcpy(command,"umount "); + strcat(command, mountname); +@@ -242,7 +243,7 @@ + printf("\nFileop: Working in %s, File size is %d, Output is in Ops/sec. (A=Avg, B=Best, W=Worst)\n", thedir, sz); + if(!verbose) + { +-#ifdef Windows ++#if defined(Windows) || defined(Haiku) + printf(" . %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %10s\n", + "mkdir","chdir","rmdir","create","open","read","write","close","stat", + "access","chmod","readdir","delete"," Total_files"); +@@ -450,7 +451,7 @@ + printf(" Worst readdir(s)/sec = %12.2f (%12.9f seconds/op)\n\n", + 1/stats[_STAT_READDIR].worst,stats[_STAT_READDIR].worst); + } +-#if !defined(Windows) ++#if 0 + /* + * link test + */ +@@ -517,7 +518,7 @@ + printf("%7.0f ",stats[_STAT_ACCESS].counter/stats[_STAT_ACCESS].total_time); + printf("%7.0f ",stats[_STAT_CHMOD].counter/stats[_STAT_CHMOD].total_time); + printf("%7.0f ",stats[_STAT_READDIR].counter/stats[_STAT_READDIR].total_time); +-#ifndef Windows ++#if !defined(Windows) || !defined(Haiku) + printf("%7.0f ",stats[_STAT_LINK].counter/stats[_STAT_LINK].total_time); + printf("%7.0f ",stats[_STAT_UNLINK].counter/stats[_STAT_UNLINK].total_time); + #endif +@@ -540,7 +541,7 @@ + printf("%7.0f ",1/stats[_STAT_ACCESS].best); + printf("%7.0f ",1/stats[_STAT_CHMOD].best); + printf("%7.0f ",1/stats[_STAT_READDIR].best); +-#ifndef Windows ++#if !defined(Windows) || !defined(Haiku) + printf("%7.0f ",1/stats[_STAT_LINK].best); + printf("%7.0f ",1/stats[_STAT_UNLINK].best); + #endif +@@ -563,7 +564,7 @@ + printf("%7.0f ",1/stats[_STAT_ACCESS].worst); + printf("%7.0f ",1/stats[_STAT_CHMOD].worst); + printf("%7.0f ",1/stats[_STAT_READDIR].worst); +-#ifndef Windows ++#if !defined(Windows) || !defined(Haiku) + printf("%7.0f ",1/stats[_STAT_LINK].worst); + printf("%7.0f ",1/stats[_STAT_UNLINK].worst); + #endif +@@ -589,9 +590,10 @@ + { + sprintf(buf,"fileop_L1_%d",i); + stats[_STAT_DIR_CREATE].starttime=time_so_far(); +- ret=mkdir(buf,0777); ++ ret=mkdir(buf, 0777); + if(ret < 0) + { ++ printf("ret = %d", ret); + printf("Mkdir failed\n"); + exit(1); + } +diff -Naur iozone3_326/src/current/iozone.c iozone3_326.haiku/src/current/iozone.c +--- iozone3_326/src/current/iozone.c 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/iozone.c 2011-01-06 08:20:02.000000000 -0600 +@@ -57,7 +57,7 @@ + #include + int errno; + #else +-#if defined(linux) ++#if defined(linux) || defined(Haiku) + #include + #else + extern int errno; /* imported for errors */ +@@ -79,7 +79,7 @@ + #include + #endif + +-#if defined(HAVE_ANSIC_C) && defined(linux) ++#if defined(HAVE_ANSIC_C) && (defined(linux) || defined(haiku)) + #include + #include + #endif +@@ -92,7 +92,7 @@ + int unlink(); + int main(); + void record_command_line(); +-#if !defined(linux) ++#if !defined(linux) || !defined(haiku) + int wait(); + #endif + int fsync(); +@@ -271,6 +271,13 @@ + #include + #endif + ++#if defined(__HAIKU__) ++#include ++#include ++#include ++#endif ++ ++ + #if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__) + #ifndef O_SYNC + #define O_SYNC O_FSYNC +@@ -390,7 +397,7 @@ + #define MAP_ANONYMOUS MAP_ANON + #endif + +-#if defined(SCO_Unixware_gcc) || defined(solaris) || defined(UWIN) || defined(SCO) ++#if defined(SCO_Unixware_gcc) || defined(solaris) || defined(UWIN) || defined(SCO) || defined(Haiku) + #define MAP_FILE (0) + #endif + +diff -Naur iozone3_326/src/current/iozone_visualizer.pl iozone3_326.haiku/src/current/iozone_visualizer.pl +--- iozone3_326/src/current/iozone_visualizer.pl 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/iozone_visualizer.pl 2011-01-06 08:20:02.000000000 -0600 +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl ++#!/boot/common/bin/perl + + use warnings; + use strict; +diff -Naur iozone3_326/src/current/libbif.c iozone3_326.haiku/src/current/libbif.c +--- iozone3_326/src/current/libbif.c 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/libbif.c 2011-01-06 08:20:02.000000000 -0600 +@@ -14,7 +14,7 @@ + #include + #include + #include +-#if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) ++#if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(Haiku) + #include + #else + #include +@@ -24,7 +24,7 @@ + #include + #endif + +-#if defined(linux) || defined(__DragonFly__) || defined(macosx) ++#if defined(linux) || defined(__DragonFly__) || defined(macosx) || defined(Haiku) + #include + #include + #endif +diff -Naur iozone3_326/src/current/makefile iozone3_326.haiku/src/current/makefile +--- iozone3_326/src/current/makefile 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/makefile 2011-01-06 08:20:02.000000000 -0600 +@@ -30,6 +30,7 @@ + @echo " -> freebsd (32bit) <-" + @echo " -> generic (32bit) <-" + @echo " -> ghpux (32bit) <-" ++ @echo " -> haiku (32bit) <-" + @echo " -> hpuxs-11.0 (simple) (32bit) <-" + @echo " -> hpux-11.0w (64bit) <-" + @echo " -> hpuxs-11.0w (64bit) <-" +@@ -83,6 +84,12 @@ + cp ../../iozone*.tar /usr/src/red*/SO* + rpmbuild -ba spec.in + ++# ++# GNU 'C' compiler Linux build with threads, largefiles, async I/O ++# ++haiku: iozone_haiku.o libbif.o fileop_haiku.o ++ $(CC) -O3 $(LDFLAGS) -lnetwork iozone_haiku.o libbif.o -o iozone ++ $(CC) -O3 -lnetwork fileop_haiku.o -o fileop + + # + # Turn on the optimizer, largefiles, Posix async I/O and threads. +@@ -529,6 +536,16 @@ + # Now for the machine specific stuff + # + ++iozone_haiku.o: iozone.c libbif.c ++ @echo "" ++ @echo "Building iozone for Haiku" ++ @echo "" ++ $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DHAVE_PREAD \ ++ -DNO_MADVISE -DHaiku $(CFLAGS) iozone.c \ ++ -DNAME='"haiku"' -o iozone_haiku.o ++ $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C \ ++ -DNO_MADVISE -DHaiku $(CFLAGS) libbif.c -o libbif.o ++ + iozone_hpux.o: iozone.c libbif.c + @echo "" + @echo "Building iozone for HP-UX (9.05)" +@@ -695,6 +712,13 @@ + $(CC) -Wall -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ + -D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c -o libasync.o + ++fileop_haiku.o: fileop.c ++ @echo "" ++ @echo "Building fileop for Haiku" ++ @echo "" ++ $(CC) -c -O $(CFLAGS) -DHaiku fileop.c -o fileop_haiku.o ++ ++ + fileop_AIX.o: fileop.c + @echo "" + @echo "Building fileop for AIX" +diff -Naur iozone3_326/src/current/report.pl iozone3_326.haiku/src/current/report.pl +--- iozone3_326/src/current/report.pl 2009-06-19 09:00:44.000000000 -0500 ++++ iozone3_326.haiku/src/current/report.pl 2011-01-06 08:20:02.000000000 -0600 +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl ++#!/boot/common/bin/perl + # + # arguments: one of more report files + #