Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 37053 Details for
Bug 59793
3.226-r1 arch test
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
preprocessed source file, iozone-3.218
ccXvVxrH.out (text/plain), 486.95 KB, created by
Alexandre Rostovtsev (RETIRED)
on 2004-08-08 11:55:45 UTC
(
hide
)
Description:
preprocessed source file, iozone-3.218
Filename:
MIME Type:
Creator:
Alexandre Rostovtsev (RETIRED)
Created:
2004-08-08 11:55:45 UTC
Size:
486.95 KB
patch
obsolete
>// /usr/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 -quiet -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DHAVE_PREAD -DSHARED_MEM -Dlinux -D_LARGEFILE64_SOURCE -DNAME="linux" iozone.c -quiet -dumpbase iozone.c -march=athlon-xp -auxbase-strip iozone_linux.o -O2 -frename-registers -fomit-frame-pointer -o - -frandom-seed=0 ># 1 "iozone.c" ># 1 "<built-in>" ># 1 "<command line>" ># 1 "iozone.c" ># 65 "iozone.c" ># 1 "/usr/include/errno.h" 1 3 4 ># 29 "/usr/include/errno.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 295 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 296 "/usr/include/features.h" 2 3 4 ># 318 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 ># 319 "/usr/include/features.h" 2 3 4 ># 30 "/usr/include/errno.h" 2 3 4 > > > > > > ># 1 "/usr/include/bits/errno.h" 1 3 4 ># 25 "/usr/include/bits/errno.h" 3 4 ># 1 "/usr/include/linux/errno.h" 1 3 4 > > > ># 1 "/usr/include/asm/errno.h" 1 3 4 > > > ># 1 "/usr/include/asm-generic/errno.h" 1 3 4 > > > ># 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 ># 5 "/usr/include/asm-generic/errno.h" 2 3 4 ># 5 "/usr/include/asm/errno.h" 2 3 4 ># 5 "/usr/include/linux/errno.h" 2 3 4 ># 26 "/usr/include/bits/errno.h" 2 3 4 ># 38 "/usr/include/bits/errno.h" 3 4 >extern int *__errno_location (void) __attribute__ ((__const__)); ># 37 "/usr/include/errno.h" 2 3 4 ># 55 "/usr/include/errno.h" 3 4 >extern char *program_invocation_name, *program_invocation_short_name; > > > > ># 69 "/usr/include/errno.h" 3 4 >typedef int error_t; ># 66 "iozone.c" 2 > > > > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 29 "/usr/include/sys/types.h" 3 4 > > ># 1 "/usr/include/bits/types.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/bits/types.h" 2 3 4 > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 213 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 32 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 129 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 130 "/usr/include/bits/types.h" 2 3 4 > > > > > > >__extension__ typedef unsigned long long int __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef unsigned long long int __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef long long int __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef unsigned long long int __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef long int __swblk_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef void * __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef long long int __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef unsigned long long int __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef unsigned long long int __fsfilcnt64_t; > >__extension__ typedef int __ssize_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 32 "/usr/include/sys/types.h" 2 3 4 > > > >typedef __u_char u_char; >typedef __u_short u_short; >typedef __u_int u_int; >typedef __u_long u_long; >typedef __quad_t quad_t; >typedef __u_quad_t u_quad_t; >typedef __fsid_t fsid_t; > > > > >typedef __loff_t loff_t; > > > >typedef __ino_t ino_t; > > > > > > >typedef __ino64_t ino64_t; > > > > >typedef __dev_t dev_t; > > > > >typedef __gid_t gid_t; > > > > >typedef __mode_t mode_t; > > > > >typedef __nlink_t nlink_t; > > > > >typedef __uid_t uid_t; > > > > > >typedef __off_t off_t; > > > > > > >typedef __off64_t off64_t; > > > > >typedef __pid_t pid_t; > > > > >typedef __id_t id_t; > > > > >typedef __ssize_t ssize_t; > > > > > >typedef __daddr_t daddr_t; >typedef __caddr_t caddr_t; > > > > > >typedef __key_t key_t; ># 133 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 58 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; > > > ># 74 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; > > > ># 92 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 104 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 134 "/usr/include/sys/types.h" 2 3 4 > > > >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 148 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 191 "/usr/include/sys/types.h" 3 4 >typedef int int8_t __attribute__ ((__mode__ (__QI__))); >typedef int int16_t __attribute__ ((__mode__ (__HI__))); >typedef int int32_t __attribute__ ((__mode__ (__SI__))); >typedef int int64_t __attribute__ ((__mode__ (__DI__))); > > >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 213 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 37 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 38 "/usr/include/endian.h" 2 3 4 ># 214 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 32 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 23 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 35 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > ># 1 "/usr/include/time.h" 1 3 4 ># 118 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > long int tv_nsec; > }; ># 45 "/usr/include/sys/select.h" 2 3 4 > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 69 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 47 "/usr/include/sys/select.h" 2 3 4 ># 55 "/usr/include/sys/select.h" 3 4 >typedef long int __fd_mask; ># 67 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; > > > > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 99 "/usr/include/sys/select.h" 3 4 > ># 109 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 121 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); > > > ># 217 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 29 "/usr/include/sys/sysmacros.h" 3 4 >__extension__ >extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) > ; >__extension__ >extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) > ; >__extension__ >extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > ; > > >__extension__ extern __inline unsigned int >gnu_dev_major (unsigned long long int __dev) >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline unsigned int >gnu_dev_minor (unsigned long long int __dev) >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline unsigned long long int >gnu_dev_makedev (unsigned int __major, unsigned int __minor) >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} ># 220 "/usr/include/sys/types.h" 2 3 4 > > > > >typedef __blksize_t blksize_t; > > > > > > >typedef __blkcnt_t blkcnt_t; > > > >typedef __fsblkcnt_t fsblkcnt_t; > > > >typedef __fsfilcnt_t fsfilcnt_t; ># 258 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt64_t; >typedef __fsblkcnt64_t fsblkcnt64_t; >typedef __fsfilcnt64_t fsfilcnt64_t; > > > > > ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 36 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >typedef union >{ > char __size[36]; > long int __align; >} pthread_attr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __count; > int __owner; > > > int __kind; > unsigned int __nusers; > int __spins; > } __data; > char __size[24]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > int __clock; > unsigned long long int __total_seq; > unsigned long long int __wakeup_seq; > unsigned long long int __woken_seq; > void *__mutex; > } __data; > char __size[48]; > long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; > > > unsigned int __flags; > int __writer; > } __data; > char __size[32]; > long int __align; >} pthread_rwlock_t; > >typedef union >{ > char __size[8]; > long int __align; >} pthread_rwlockattr_t; > > > > > >typedef volatile int pthread_spinlock_t; > > > > >typedef union >{ > char __size[20]; > long int __align; >} pthread_barrier_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_barrierattr_t; ># 267 "/usr/include/sys/types.h" 2 3 4 > > > ># 74 "iozone.c" 2 ># 82 "iozone.c" ># 1 "/usr/include/pthread.h" 1 3 4 ># 23 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sched.h" 1 3 4 ># 29 "/usr/include/sched.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/sched.h" 2 3 4 > > ># 1 "/usr/include/bits/sched.h" 1 3 4 ># 62 "/usr/include/bits/sched.h" 3 4 >struct sched_param > { > int __sched_priority; > }; > > > > > >extern int clone (int (*__fn) (void *__arg), void *__child_stack, > int __flags, void *__arg) ; > > > > > > > > > > >struct __sched_param > { > int __sched_priority; > }; ># 98 "/usr/include/bits/sched.h" 3 4 >typedef unsigned long int __cpu_mask; > > > > > > >typedef struct >{ > __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; >} cpu_set_t; ># 33 "/usr/include/sched.h" 2 3 4 > > > > > > > >extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) > ; > > >extern int sched_getparam (__pid_t __pid, struct sched_param *__param) ; > > >extern int sched_setscheduler (__pid_t __pid, int __policy, > __const struct sched_param *__param) ; > > >extern int sched_getscheduler (__pid_t __pid) ; > > >extern int sched_yield (void) ; > > >extern int sched_get_priority_max (int __algorithm) ; > > >extern int sched_get_priority_min (int __algorithm) ; > > >extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) ; ># 76 "/usr/include/sched.h" 3 4 >extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > >extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, > cpu_set_t *__cpuset) ; > > > ># 24 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/time.h" 3 4 > > > > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 39 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 43 "/usr/include/time.h" 2 3 4 ># 129 "/usr/include/time.h" 3 4 > > >struct tm >{ > int tm_sec; > int tm_min; > int tm_hour; > int tm_mday; > int tm_mon; > int tm_year; > int tm_wday; > int tm_yday; > int tm_isdst; > > > long int tm_gmtoff; > __const char *tm_zone; > > > > >}; > > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; > > >struct sigevent; ># 178 "/usr/include/time.h" 3 4 > > > >extern clock_t clock (void) ; > > >extern time_t time (time_t *__timer) ; > > >extern double difftime (time_t __time1, time_t __time0) > __attribute__ ((__const__)); > > >extern time_t mktime (struct tm *__tp) ; > > > > > >extern size_t strftime (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp) ; > > > > > >extern char *strptime (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp) > ; > > > > > ># 1 "/usr/include/xlocale.h" 1 3 4 ># 28 "/usr/include/xlocale.h" 3 4 >typedef struct __locale_struct >{ > > struct locale_data *__locales[13]; > > > const unsigned short int *__ctype_b; > const int *__ctype_tolower; > const int *__ctype_toupper; > > > const char *__names[13]; >} *__locale_t; ># 214 "/usr/include/time.h" 2 3 4 > >extern size_t strftime_l (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp, > __locale_t __loc) ; > >extern char *strptime_l (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp, > __locale_t __loc) ; > > > > > > >extern struct tm *gmtime (__const time_t *__timer) ; > > > >extern struct tm *localtime (__const time_t *__timer) ; > > > > > >extern struct tm *gmtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) ; > > > >extern struct tm *localtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) ; > > > > > >extern char *asctime (__const struct tm *__tp) ; > > >extern char *ctime (__const time_t *__timer) ; > > > > > > > >extern char *asctime_r (__const struct tm *__restrict __tp, > char *__restrict __buf) ; > > >extern char *ctime_r (__const time_t *__restrict __timer, > char *__restrict __buf) ; > > > > >extern char *__tzname[2]; >extern int __daylight; >extern long int __timezone; > > > > >extern char *tzname[2]; > > > >extern void tzset (void) ; > > > >extern int daylight; >extern long int timezone; > > > > > >extern int stime (__const time_t *__when) ; ># 309 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) ; > > >extern time_t timelocal (struct tm *__tp) ; > > >extern int dysize (int __year) __attribute__ ((__const__)); ># 324 "/usr/include/time.h" 3 4 >extern int nanosleep (__const struct timespec *__requested_time, > struct timespec *__remaining); > > > >extern int clock_getres (clockid_t __clock_id, struct timespec *__res) ; > > >extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) ; > > >extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) > ; > > > > > > >extern int clock_nanosleep (clockid_t __clock_id, int __flags, > __const struct timespec *__req, > struct timespec *__rem); > > >extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) ; > > > > >extern int timer_create (clockid_t __clock_id, > struct sigevent *__restrict __evp, > timer_t *__restrict __timerid) ; > > >extern int timer_delete (timer_t __timerid) ; > > >extern int timer_settime (timer_t __timerid, int __flags, > __const struct itimerspec *__restrict __value, > struct itimerspec *__restrict __ovalue) ; > > >extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) > ; > > >extern int timer_getoverrun (timer_t __timerid) ; ># 386 "/usr/include/time.h" 3 4 >extern int getdate_err; ># 395 "/usr/include/time.h" 3 4 >extern struct tm *getdate (__const char *__string); ># 409 "/usr/include/time.h" 3 4 >extern int getdate_r (__const char *__restrict __string, > struct tm *__restrict __resbufp); > > > ># 25 "/usr/include/pthread.h" 2 3 4 > > ># 1 "/usr/include/signal.h" 1 3 4 ># 31 "/usr/include/signal.h" 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 34 "/usr/include/signal.h" 2 3 4 ># 392 "/usr/include/signal.h" 3 4 > ># 28 "/usr/include/pthread.h" 2 3 4 > ># 1 "/usr/include/bits/setjmp.h" 1 3 4 ># 38 "/usr/include/bits/setjmp.h" 3 4 >typedef int __jmp_buf[6]; ># 30 "/usr/include/pthread.h" 2 3 4 > > > >enum >{ > PTHREAD_CREATE_JOINABLE, > > PTHREAD_CREATE_DETACHED > >}; > > > >enum >{ > PTHREAD_MUTEX_TIMED_NP, > PTHREAD_MUTEX_RECURSIVE_NP, > PTHREAD_MUTEX_ERRORCHECK_NP, > PTHREAD_MUTEX_ADAPTIVE_NP > > , > PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, > PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, > PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, > PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL > > > > , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP > >}; ># 77 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_RWLOCK_PREFER_READER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, > PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP >}; ># 96 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_INHERIT_SCHED, > > PTHREAD_EXPLICIT_SCHED > >}; > > > >enum >{ > PTHREAD_SCOPE_SYSTEM, > > PTHREAD_SCOPE_PROCESS > >}; > > > >enum >{ > PTHREAD_PROCESS_PRIVATE, > > PTHREAD_PROCESS_SHARED > >}; ># 131 "/usr/include/pthread.h" 3 4 >struct _pthread_cleanup_buffer >{ > void (*__routine) (void *); > void *__arg; > int __canceltype; > struct _pthread_cleanup_buffer *__prev; >}; > > >enum >{ > PTHREAD_CANCEL_ENABLE, > > PTHREAD_CANCEL_DISABLE > >}; >enum >{ > PTHREAD_CANCEL_DEFERRED, > > PTHREAD_CANCEL_ASYNCHRONOUS > >}; ># 169 "/usr/include/pthread.h" 3 4 > > > > > >extern int pthread_create (pthread_t *__restrict __newthread, > __const pthread_attr_t *__restrict __attr, > void *(*__start_routine) (void *), > void *__restrict __arg) ; > > > > > >extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); > > > > > > > >extern int pthread_join (pthread_t __th, void **__thread_return); > > > > >extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) ; > > > > > > > >extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, > __const struct timespec *__abstime); > > > > > > >extern int pthread_detach (pthread_t __th) ; > > > >extern pthread_t pthread_self (void) __attribute__ ((__const__)); > > >extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) ; > > > > > > > >extern int pthread_attr_init (pthread_attr_t *__attr) ; > > >extern int pthread_attr_destroy (pthread_attr_t *__attr) ; > > >extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, > int *__detachstate) ; > > >extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, > int __detachstate) ; > > > >extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, > size_t *__guardsize) ; > > >extern int pthread_attr_setguardsize (pthread_attr_t *__attr, > size_t __guardsize) ; > > > >extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict > __attr, > struct sched_param *__restrict __param) > ; > > >extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, > __const struct sched_param *__restrict > __param) ; > > >extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict > __attr, int *__restrict __policy) > ; > > >extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) > ; > > >extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict > __attr, int *__restrict __inherit) > ; > > >extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, > int __inherit) ; > > > >extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, > int *__restrict __scope) ; > > >extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) > ; > > >extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict > __attr, void **__restrict __stackaddr) > __attribute__ ((__deprecated__)); > > > > > >extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, > void *__stackaddr) > __attribute__ ((__deprecated__)); > > >extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict > __attr, size_t *__restrict __stacksize) > ; > > > > >extern int pthread_attr_setstacksize (pthread_attr_t *__attr, > size_t __stacksize) ; > > > >extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, > void **__restrict __stackaddr, > size_t *__restrict __stacksize) ; > > > > >extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, > size_t __stacksize) ; > > > > > >extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, > size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > > >extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, > size_t __cpusetsize, > cpu_set_t *__cpuset) ; > > > > > >extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) ; > > > > > > > >extern int pthread_setschedparam (pthread_t __target_thread, int __policy, > __const struct sched_param *__param) > ; > > >extern int pthread_getschedparam (pthread_t __target_thread, > int *__restrict __policy, > struct sched_param *__restrict __param) > ; > > > > >extern int pthread_getconcurrency (void) ; > > >extern int pthread_setconcurrency (int __level) ; > > > > > > > >extern int pthread_yield (void) ; > > > > >extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > >extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, > cpu_set_t *__cpuset) ; ># 394 "/usr/include/pthread.h" 3 4 >extern int pthread_once (pthread_once_t *__once_control, > void (*__init_routine) (void)) ; ># 406 "/usr/include/pthread.h" 3 4 >extern int pthread_setcancelstate (int __state, int *__oldstate); > > > >extern int pthread_setcanceltype (int __type, int *__oldtype); > > >extern int pthread_cancel (pthread_t __th); > > > > >extern void pthread_testcancel (void); > > > > >typedef struct >{ > struct > { > __jmp_buf __cancel_jmp_buf; > int __mask_was_saved; > } __cancel_jmp_buf[1]; > void *__pad[4]; >} __pthread_unwind_buf_t __attribute__ ((__aligned__)); ># 440 "/usr/include/pthread.h" 3 4 >struct __pthread_cleanup_frame >{ > void (*__cancel_routine) (void *); > void *__cancel_arg; > int __do_it; > int __cancel_type; >}; ># 580 "/usr/include/pthread.h" 3 4 >extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 591 "/usr/include/pthread.h" 3 4 >extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 614 "/usr/include/pthread.h" 3 4 >extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 626 "/usr/include/pthread.h" 3 4 >extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); > > > >extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))) __attribute ((__noreturn__)) > > __attribute ((__weak__)) > > ; > > > >struct __jmp_buf_tag; >extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) ; > > > > > >extern int pthread_mutex_init (pthread_mutex_t *__mutex, > __const pthread_mutexattr_t *__mutexattr) > ; > > >extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) ; > > >extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) ; > > >extern int pthread_mutex_lock (pthread_mutex_t *__mutex) ; > > > >extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) ; > > > > > > >extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) ; > > >extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) ; > > >extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, > int __pshared) ; > > > >extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict > __attr, int *__restrict __kind) ; > > > > >extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) > ; ># 707 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, > __const pthread_rwlockattr_t *__restrict > __attr) ; > > >extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) ; > > > >extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) ; > > > >extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) ; > > > > > >extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) ; > > >extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) ; > > >extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, > int __pshared) ; > > >extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pref) ; > > >extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, > int __pref) ; > > > > > > > >extern int pthread_cond_init (pthread_cond_t *__restrict __cond, > __const pthread_condattr_t *__restrict > __cond_attr) ; > > >extern int pthread_cond_destroy (pthread_cond_t *__cond) ; > > >extern int pthread_cond_signal (pthread_cond_t *__cond) ; > > >extern int pthread_cond_broadcast (pthread_cond_t *__cond) ; > > > > > > >extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, > pthread_mutex_t *__restrict __mutex); ># 804 "/usr/include/pthread.h" 3 4 >extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, > pthread_mutex_t *__restrict __mutex, > __const struct timespec *__restrict > __abstime); > > > > >extern int pthread_condattr_init (pthread_condattr_t *__attr) ; > > >extern int pthread_condattr_destroy (pthread_condattr_t *__attr) ; > > >extern int pthread_condattr_getpshared (__const pthread_condattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, > int __pshared) ; > > > >extern int pthread_condattr_getclock (__const pthread_condattr_t * > __restrict __attr, > __clockid_t *__restrict __clock_id) > ; > > >extern int pthread_condattr_setclock (pthread_condattr_t *__attr, > __clockid_t __clock_id) ; ># 845 "/usr/include/pthread.h" 3 4 >extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) > ; > > >extern int pthread_spin_destroy (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_lock (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_trylock (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_unlock (pthread_spinlock_t *__lock) ; > > > > > > >extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, > __const pthread_barrierattr_t *__restrict > __attr, unsigned int __count) ; > > >extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) ; > > >extern int pthread_barrier_wait (pthread_barrier_t *__barrier) ; > > > >extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) ; > > >extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) ; > > >extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, > int __pshared) ; ># 901 "/usr/include/pthread.h" 3 4 >extern int pthread_key_create (pthread_key_t *__key, > void (*__destr_function) (void *)) ; > > >extern int pthread_key_delete (pthread_key_t __key) ; > > >extern void *pthread_getspecific (pthread_key_t __key) ; > > >extern int pthread_setspecific (pthread_key_t __key, > __const void *__pointer) ; > > > > >extern int pthread_getcpuclockid (pthread_t __thread_id, > clockid_t *__clock_id) ; ># 933 "/usr/include/pthread.h" 3 4 >extern int pthread_atfork (void (*__prepare) (void), > void (*__parent) (void), > void (*__child) (void)) ; > > ># 83 "iozone.c" 2 > > > ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 325 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 3 4 >typedef long int wchar_t; ># 34 "/usr/include/stdlib.h" 2 3 4 > > > > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 43 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 65 "/usr/include/bits/waitstatus.h" 3 4 >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 44 "/usr/include/stdlib.h" 2 3 4 ># 68 "/usr/include/stdlib.h" 3 4 >typedef union > { > union wait *__uptr; > int *__iptr; > } __WAIT_STATUS __attribute__ ((__transparent_union__)); ># 93 "/usr/include/stdlib.h" 3 4 > > >typedef struct > { > int quot; > int rem; > } div_t; > > > >typedef struct > { > long int quot; > long int rem; > } ldiv_t; > > > > > > > >__extension__ typedef struct > { > long long int quot; > long long int rem; > } lldiv_t; > > ># 137 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) ; > > > > >extern double atof (__const char *__nptr) __attribute__ ((__pure__)); > >extern int atoi (__const char *__nptr) __attribute__ ((__pure__)); > >extern long int atol (__const char *__nptr) __attribute__ ((__pure__)); > > > > > >__extension__ extern long long int atoll (__const char *__nptr) > __attribute__ ((__pure__)); > > > > > >extern double strtod (__const char *__restrict __nptr, > char **__restrict __endptr) ; > > > > > >extern float strtof (__const char *__restrict __nptr, > char **__restrict __endptr) ; > >extern long double strtold (__const char *__restrict __nptr, > char **__restrict __endptr) ; > > > > > >extern long int strtol (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >extern unsigned long int strtoul (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > > > > >__extension__ >extern long long int strtoq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >__extension__ >extern unsigned long long int strtouq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > > > > > >__extension__ >extern long long int strtoll (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >__extension__ >extern unsigned long long int strtoull (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > ># 229 "/usr/include/stdlib.h" 3 4 >extern long int strtol_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) ; > >extern unsigned long int strtoul_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) ; > >__extension__ >extern long long int strtoll_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) ; > >__extension__ >extern unsigned long long int strtoull_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) > ; > >extern double strtod_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) > ; > >extern float strtof_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) ; > >extern long double strtold_l (__const char *__restrict __nptr, > char **__restrict __endptr, > __locale_t __loc) ; > > > > > > >extern double __strtod_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > ; >extern float __strtof_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > ; >extern long double __strtold_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __group) ; > >extern long int __strtol_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > >extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > > >__extension__ >extern long long int __strtoll_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > >__extension__ >extern unsigned long long int __strtoull_internal (__const char * > __restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > ; > > > > > > > > >extern __inline double >strtod (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtod_internal (__nptr, __endptr, 0); >} >extern __inline long int >strtol (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtol_internal (__nptr, __endptr, __base, 0); >} >extern __inline unsigned long int >strtoul (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoul_internal (__nptr, __endptr, __base, 0); >} > > > > >extern __inline float >strtof (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtof_internal (__nptr, __endptr, 0); >} >extern __inline long double >strtold (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtold_internal (__nptr, __endptr, 0); >} > > > > >__extension__ extern __inline long long int >strtoq (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoll_internal (__nptr, __endptr, __base, 0); >} >__extension__ extern __inline unsigned long long int >strtouq (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoull_internal (__nptr, __endptr, __base, 0); >} > > > > >__extension__ extern __inline long long int >strtoll (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoll_internal (__nptr, __endptr, __base, 0); >} >__extension__ extern __inline unsigned long long int >strtoull (__const char * __restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoull_internal (__nptr, __endptr, __base, 0); >} > > > > >extern __inline double >atof (__const char *__nptr) >{ > return strtod (__nptr, (char **) ((void *)0)); >} >extern __inline int >atoi (__const char *__nptr) >{ > return (int) strtol (__nptr, (char **) ((void *)0), 10); >} >extern __inline long int >atol (__const char *__nptr) >{ > return strtol (__nptr, (char **) ((void *)0), 10); >} > > > > >__extension__ extern __inline long long int >atoll (__const char *__nptr) >{ > return strtoll (__nptr, (char **) ((void *)0), 10); >} > ># 408 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) ; > > >extern long int a64l (__const char *__s) __attribute__ ((__pure__)); ># 423 "/usr/include/stdlib.h" 3 4 >extern long int random (void) ; > > >extern void srandom (unsigned int __seed) ; > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) ; > > > >extern char *setstate (char *__statebuf) ; > > > > > > > >struct random_data > { > int32_t *fptr; > int32_t *rptr; > int32_t *state; > int rand_type; > int rand_deg; > int rand_sep; > int32_t *end_ptr; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) ; > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) ; > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) ; > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) ; > > > > > > >extern int rand (void) ; > >extern void srand (unsigned int __seed) ; > > > > >extern int rand_r (unsigned int *__seed) ; > > > > > > > >extern double drand48 (void) ; >extern double erand48 (unsigned short int __xsubi[3]) ; > > >extern long int lrand48 (void) ; >extern long int nrand48 (unsigned short int __xsubi[3]) ; > > >extern long int mrand48 (void) ; >extern long int jrand48 (unsigned short int __xsubi[3]) ; > > >extern void srand48 (long int __seedval) ; >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ; >extern void lcong48 (unsigned short int __param[7]) ; > > > > > >struct drand48_data > { > unsigned short int __x[3]; > unsigned short int __old_x[3]; > unsigned short int __c; > unsigned short int __init; > unsigned long long int __a; > }; > > >extern int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) ; >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) ; > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > ; > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) ; > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) ; > > > > > > > > > >extern void *malloc (size_t __size) __attribute__ ((__malloc__)); > >extern void *calloc (size_t __nmemb, size_t __size) > __attribute__ ((__malloc__)); > > > > > > > >extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__)); > >extern void free (void *__ptr) ; > > > > >extern void cfree (void *__ptr) ; > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 25 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 26 "/usr/include/alloca.h" 2 3 4 > > > > > > > >extern void *alloca (size_t __size) ; > > > > > > ># 579 "/usr/include/stdlib.h" 2 3 4 > > > > >extern void *valloc (size_t __size) __attribute__ ((__malloc__)); > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > __attribute__ ((__malloc__)); > > > > >extern void abort (void) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) ; > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > ; > > > > > > >extern void exit (int __status) __attribute__ ((__noreturn__)); > > > > > > >extern void _Exit (int __status) __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (__const char *__name) ; > > > > >extern char *__secure_getenv (__const char *__name) ; > > > > > >extern int putenv (char *__string) ; > > > > > >extern int setenv (__const char *__name, __const char *__value, int __replace) > ; > > >extern int unsetenv (__const char *__name) ; > > > > > > >extern int clearenv (void) ; ># 663 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) ; ># 674 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template); ># 683 "/usr/include/stdlib.h" 3 4 >extern int mkstemp64 (char *__template); ># 693 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) ; > > > > > > > > >extern int system (__const char *__command); > > > > > > > >extern char *canonicalize_file_name (__const char *__name) ; ># 720 "/usr/include/stdlib.h" 3 4 >extern char *realpath (__const char *__restrict __name, > char *__restrict __resolved) ; > > > > > > >typedef int (*__compar_fn_t) (__const void *, __const void *); > > >typedef __compar_fn_t comparison_fn_t; > > > > > > >extern void *bsearch (__const void *__key, __const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar); > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar); > > > >extern int abs (int __x) __attribute__ ((__const__)); >extern long int labs (long int __x) __attribute__ ((__const__)); > > > >__extension__ extern long long int llabs (long long int __x) > __attribute__ ((__const__)); > > > > > > > >extern div_t div (int __numer, int __denom) > __attribute__ ((__const__)); >extern ldiv_t ldiv (long int __numer, long int __denom) > __attribute__ ((__const__)); > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > __attribute__ ((__const__)); > ># 784 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) ; > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) ; > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) ; > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) ; >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) ; >extern char *qgcvt (long double __value, int __ndigit, char *__buf) ; > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) ; >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) ; > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) ; >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) ; > > > > > > > >extern int mblen (__const char *__s, size_t __n) ; > > >extern int mbtowc (wchar_t *__restrict __pwc, > __const char *__restrict __s, size_t __n) ; > > >extern int wctomb (char *__s, wchar_t __wchar) ; > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > __const char *__restrict __s, size_t __n) ; > >extern size_t wcstombs (char *__restrict __s, > __const wchar_t *__restrict __pwcs, size_t __n) > ; > > > > > > > > >extern int rpmatch (__const char *__response) ; ># 866 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *__const *__restrict __tokens, > char **__restrict __valuep) ; > > > > > >extern void setkey (__const char *__key) ; > > > > > > > >extern int posix_openpt (int __oflag); > > > > > > > >extern int grantpt (int __fd) ; > > > >extern int unlockpt (int __fd) ; > > > > >extern char *ptsname (int __fd) ; > > > > > > >extern int ptsname_r (int __fd, char *__buf, size_t __buflen) ; > > >extern int getpt (void); > > > > > > >extern int getloadavg (double __loadavg[], int __nelem) ; > > > > > > ># 87 "iozone.c" 2 ># 1 "/usr/include/sys/wait.h" 1 3 4 ># 28 "/usr/include/sys/wait.h" 3 4 > > ># 1 "/usr/include/signal.h" 1 3 4 ># 31 "/usr/include/signal.h" 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 103 "/usr/include/bits/sigset.h" 3 4 >extern int __sigismember (__const __sigset_t *, int); >extern int __sigaddset (__sigset_t *, int); >extern int __sigdelset (__sigset_t *, int); ># 117 "/usr/include/bits/sigset.h" 3 4 >extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } >extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } >extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } ># 34 "/usr/include/signal.h" 2 3 4 > > > > > > > >typedef __sig_atomic_t sig_atomic_t; > ># 58 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/signum.h" 1 3 4 ># 59 "/usr/include/signal.h" 2 3 4 ># 73 "/usr/include/signal.h" 3 4 >typedef void (*__sighandler_t) (int); > > > > >extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) > ; > >extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) > ; > > > > > > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) ; ># 102 "/usr/include/signal.h" 3 4 > > > > > >extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) ; > > > > > > >extern int kill (__pid_t __pid, int __sig) ; > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) ; > > > > >extern int raise (int __sig) ; > > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) ; >extern int gsignal (int __sig) ; > > > > >extern void psignal (int __sig, __const char *__s); ># 149 "/usr/include/signal.h" 3 4 >extern int __sigpause (int __sig_or_mask, int __is_sig); > > > > >extern int sigpause (int __mask) ; ># 177 "/usr/include/signal.h" 3 4 >extern int sigblock (int __mask) ; > > >extern int sigsetmask (int __mask) ; > > >extern int siggetmask (void) ; ># 192 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sighandler_t; > > > > >typedef __sighandler_t sig_t; ># 208 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 > > > > > > > >typedef union sigval > { > int sival_int; > void *sival_ptr; > } sigval_t; ># 51 "/usr/include/bits/siginfo.h" 3 4 >typedef struct siginfo > { > int si_signo; > int si_errno; > > int si_code; > > union > { > int _pad[((128 / sizeof (int)) - 3)]; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > } _kill; > > > struct > { > int si_tid; > int si_overrun; > sigval_t si_sigval; > } _timer; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > sigval_t si_sigval; > } _rt; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > int si_status; > __clock_t si_utime; > __clock_t si_stime; > } _sigchld; > > > struct > { > void *si_addr; > } _sigfault; > > > struct > { > long int si_band; > int si_fd; > } _sigpoll; > } _sifields; > } siginfo_t; ># 129 "/usr/include/bits/siginfo.h" 3 4 >enum >{ > SI_ASYNCNL = -60, > > SI_TKILL = -6, > > SI_SIGIO, > > SI_ASYNCIO, > > SI_MESGQ, > > SI_TIMER, > > SI_QUEUE, > > SI_USER, > > SI_KERNEL = 0x80 > >}; > > > >enum >{ > ILL_ILLOPC = 1, > > ILL_ILLOPN, > > ILL_ILLADR, > > ILL_ILLTRP, > > ILL_PRVOPC, > > ILL_PRVREG, > > ILL_COPROC, > > ILL_BADSTK > >}; > > >enum >{ > FPE_INTDIV = 1, > > FPE_INTOVF, > > FPE_FLTDIV, > > FPE_FLTOVF, > > FPE_FLTUND, > > FPE_FLTRES, > > FPE_FLTINV, > > FPE_FLTSUB > >}; > > >enum >{ > SEGV_MAPERR = 1, > > SEGV_ACCERR > >}; > > >enum >{ > BUS_ADRALN = 1, > > BUS_ADRERR, > > BUS_OBJERR > >}; > > >enum >{ > TRAP_BRKPT = 1, > > TRAP_TRACE > >}; > > >enum >{ > CLD_EXITED = 1, > > CLD_KILLED, > > CLD_DUMPED, > > CLD_TRAPPED, > > CLD_STOPPED, > > CLD_CONTINUED > >}; > > >enum >{ > POLL_IN = 1, > > POLL_OUT, > > POLL_MSG, > > POLL_ERR, > > POLL_PRI, > > POLL_HUP > >}; ># 273 "/usr/include/bits/siginfo.h" 3 4 >typedef struct sigevent > { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > > union > { > int _pad[((64 / sizeof (int)) - 3)]; > > > > __pid_t _tid; > > struct > { > void (*_function) (sigval_t); > void *_attribute; > } _sigev_thread; > } _sigev_un; > } sigevent_t; > > > > > > >enum >{ > SIGEV_SIGNAL = 0, > > SIGEV_NONE, > > SIGEV_THREAD, > > > SIGEV_THREAD_ID = 4 > >}; ># 209 "/usr/include/signal.h" 2 3 4 > > > >extern int sigemptyset (sigset_t *__set) ; > > >extern int sigfillset (sigset_t *__set) ; > > >extern int sigaddset (sigset_t *__set, int __signo) ; > > >extern int sigdelset (sigset_t *__set, int __signo) ; > > >extern int sigismember (__const sigset_t *__set, int __signo) ; > > > >extern int sigisemptyset (__const sigset_t *__set) ; > > >extern int sigandset (sigset_t *__set, __const sigset_t *__left, > __const sigset_t *__right) ; > > >extern int sigorset (sigset_t *__set, __const sigset_t *__left, > __const sigset_t *__right) ; > > > > ># 1 "/usr/include/bits/sigaction.h" 1 3 4 ># 25 "/usr/include/bits/sigaction.h" 3 4 >struct sigaction > { > > > union > { > > __sighandler_t sa_handler; > > void (*sa_sigaction) (int, siginfo_t *, void *); > } > __sigaction_handler; > > > > > > > > __sigset_t sa_mask; > > > int sa_flags; > > > void (*sa_restorer) (void); > }; ># 242 "/usr/include/signal.h" 2 3 4 > > >extern int sigprocmask (int __how, __const sigset_t *__restrict __set, > sigset_t *__restrict __oset) ; > > > > > > >extern int sigsuspend (__const sigset_t *__set); > > >extern int sigaction (int __sig, __const struct sigaction *__restrict __act, > struct sigaction *__restrict __oact) ; > > >extern int sigpending (sigset_t *__set) ; > > > > > > >extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig); > > > > > > >extern int sigwaitinfo (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info); > > > > > > >extern int sigtimedwait (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info, > __const struct timespec *__restrict __timeout); > > > >extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) > ; ># 297 "/usr/include/signal.h" 3 4 >extern __const char *__const _sys_siglist[65]; >extern __const char *__const sys_siglist[65]; > > >struct sigvec > { > __sighandler_t sv_handler; > int sv_mask; > > int sv_flags; > > }; ># 321 "/usr/include/signal.h" 3 4 >extern int sigvec (int __sig, __const struct sigvec *__vec, > struct sigvec *__ovec) ; > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/bits/sigcontext.h" 3 4 ># 1 "/usr/include/asm/sigcontext.h" 1 3 4 > > > ># 1 "/usr/include/linux/compiler.h" 1 3 4 ># 5 "/usr/include/asm/sigcontext.h" 2 3 4 ># 20 "/usr/include/asm/sigcontext.h" 3 4 >struct _fpreg { > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg { > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg { > unsigned long element[4]; >}; > >struct _fpstate { > > unsigned long cw; > unsigned long sw; > unsigned long tag; > unsigned long ipoff; > unsigned long cssel; > unsigned long dataoff; > unsigned long datasel; > struct _fpreg _st[8]; > unsigned short status; > unsigned short magic; > > > unsigned long _fxsr_env[6]; > unsigned long mxcsr; > unsigned long reserved; > struct _fpxreg _fxsr_st[8]; > struct _xmmreg _xmm[8]; > unsigned long padding[56]; >}; > > > >struct sigcontext { > unsigned short gs, __gsh; > unsigned short fs, __fsh; > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned long edi; > unsigned long esi; > unsigned long ebp; > unsigned long esp; > unsigned long ebx; > unsigned long edx; > unsigned long ecx; > unsigned long eax; > unsigned long trapno; > unsigned long err; > unsigned long eip; > unsigned short cs, __csh; > unsigned long eflags; > unsigned long esp_at_signal; > unsigned short ss, __ssh; > struct _fpstate * fpstate; > unsigned long oldmask; > unsigned long cr2; >}; ># 29 "/usr/include/bits/sigcontext.h" 2 3 4 ># 327 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) ; ># 339 "/usr/include/signal.h" 3 4 >extern int siginterrupt (int __sig, int __interrupt) ; > ># 1 "/usr/include/bits/sigstack.h" 1 3 4 ># 26 "/usr/include/bits/sigstack.h" 3 4 >struct sigstack > { > void *ss_sp; > int ss_onstack; > }; > > > >enum >{ > SS_ONSTACK = 1, > > SS_DISABLE > >}; ># 50 "/usr/include/bits/sigstack.h" 3 4 >typedef struct sigaltstack > { > void *ss_sp; > int ss_flags; > size_t ss_size; > } stack_t; ># 342 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/sys/ucontext.h" 1 3 4 ># 27 "/usr/include/sys/ucontext.h" 3 4 ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/sys/ucontext.h" 2 3 4 > > > >typedef int greg_t; > > > > > >typedef greg_t gregset_t[19]; > > > >enum >{ > REG_GS = 0, > > REG_FS, > > REG_ES, > > REG_DS, > > REG_EDI, > > REG_ESI, > > REG_EBP, > > REG_ESP, > > REG_EBX, > > REG_EDX, > > REG_ECX, > > REG_EAX, > > REG_TRAPNO, > > REG_ERR, > > REG_EIP, > > REG_CS, > > REG_EFL, > > REG_UESP, > > REG_SS > >}; > > > >struct _libc_fpreg >{ > unsigned short int significand[4]; > unsigned short int exponent; >}; > >struct _libc_fpstate >{ > unsigned long int cw; > unsigned long int sw; > unsigned long int tag; > unsigned long int ipoff; > unsigned long int cssel; > unsigned long int dataoff; > unsigned long int datasel; > struct _libc_fpreg _st[8]; > unsigned long int status; >}; > > >typedef struct _libc_fpstate *fpregset_t; > > >typedef struct > { > gregset_t gregs; > > > fpregset_t fpregs; > unsigned long int oldmask; > unsigned long int cr2; > } mcontext_t; > > >typedef struct ucontext > { > unsigned long int uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > __sigset_t uc_sigmask; > struct _libc_fpstate __fpregs_mem; > } ucontext_t; ># 345 "/usr/include/signal.h" 2 3 4 > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) ; > > > >extern int sigaltstack (__const struct sigaltstack *__restrict __ss, > struct sigaltstack *__restrict __oss) ; > > > > > > > >extern int sighold (int __sig) ; > > >extern int sigrelse (int __sig) ; > > >extern int sigignore (int __sig) ; > > >extern __sighandler_t sigset (int __sig, __sighandler_t __disp) ; > > > > > > ># 1 "/usr/include/bits/sigthread.h" 1 3 4 ># 31 "/usr/include/bits/sigthread.h" 3 4 >extern int pthread_sigmask (int __how, > __const __sigset_t *__restrict __newmask, > __sigset_t *__restrict __oldmask); > > >extern int pthread_kill (pthread_t __threadid, int __signo) ; ># 380 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) ; > >extern int __libc_current_sigrtmax (void) ; > > > > ># 31 "/usr/include/sys/wait.h" 2 3 4 ># 1 "/usr/include/sys/resource.h" 1 3 4 ># 25 "/usr/include/sys/resource.h" 3 4 ># 1 "/usr/include/bits/resource.h" 1 3 4 ># 32 "/usr/include/bits/resource.h" 3 4 >enum __rlimit_resource >{ > > RLIMIT_CPU = 0, > > > > RLIMIT_FSIZE = 1, > > > > RLIMIT_DATA = 2, > > > > RLIMIT_STACK = 3, > > > > RLIMIT_CORE = 4, > > > > > > > RLIMIT_RSS = 5, > > > > RLIMIT_NOFILE = 7, > RLIMIT_OFILE = RLIMIT_NOFILE, > > > > > RLIMIT_AS = 9, > > > > RLIMIT_NPROC = 6, > > > > RLIMIT_MEMLOCK = 8, > > > > RLIMIT_LOCKS = 10, > > > RLIMIT_NLIMITS = 11, > RLIM_NLIMITS = RLIMIT_NLIMITS > > >}; ># 107 "/usr/include/bits/resource.h" 3 4 >typedef __rlim_t rlim_t; > > > > >typedef __rlim64_t rlim64_t; > > >struct rlimit > { > > rlim_t rlim_cur; > > rlim_t rlim_max; > }; > > >struct rlimit64 > { > > rlim64_t rlim_cur; > > rlim64_t rlim_max; > }; > > > >enum __rusage_who >{ > > RUSAGE_SELF = 0, > > > > RUSAGE_CHILDREN = -1, > > > > RUSAGE_BOTH = -2 > >}; > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 151 "/usr/include/bits/resource.h" 2 3 4 > > >struct rusage > { > > struct timeval ru_utime; > > struct timeval ru_stime; > > long int ru_maxrss; > > > long int ru_ixrss; > > long int ru_idrss; > > long int ru_isrss; > > > long int ru_minflt; > > long int ru_majflt; > > long int ru_nswap; > > > long int ru_inblock; > > long int ru_oublock; > > long int ru_msgsnd; > > long int ru_msgrcv; > > long int ru_nsignals; > > > > long int ru_nvcsw; > > > long int ru_nivcsw; > }; > > > > > > > >enum __priority_which >{ > PRIO_PROCESS = 0, > > PRIO_PGRP = 1, > > PRIO_USER = 2 > >}; ># 26 "/usr/include/sys/resource.h" 2 3 4 > > > > > > > > > > > > > >typedef enum __rlimit_resource __rlimit_resource_t; >typedef enum __rusage_who __rusage_who_t; >typedef enum __priority_which __priority_which_t; ># 51 "/usr/include/sys/resource.h" 3 4 >extern int getrlimit (__rlimit_resource_t __resource, > struct rlimit *__rlimits) ; ># 63 "/usr/include/sys/resource.h" 3 4 >extern int getrlimit64 (__rlimit_resource_t __resource, > struct rlimit64 *__rlimits) ; > > > > > > >extern int setrlimit (__rlimit_resource_t __resource, > __const struct rlimit *__rlimits) ; ># 83 "/usr/include/sys/resource.h" 3 4 >extern int setrlimit64 (__rlimit_resource_t __resource, > __const struct rlimit64 *__rlimits) ; > > > > >extern int getrusage (__rusage_who_t __who, struct rusage *__usage) ; > > > > > >extern int getpriority (__priority_which_t __which, id_t __who) ; > > > >extern int setpriority (__priority_which_t __which, id_t __who, int __prio) > ; > > ># 32 "/usr/include/sys/wait.h" 2 3 4 ># 98 "/usr/include/sys/wait.h" 3 4 >typedef enum >{ > P_ALL, > P_PID, > P_PGID >} idtype_t; ># 112 "/usr/include/sys/wait.h" 3 4 >extern __pid_t wait (__WAIT_STATUS __stat_loc); ># 135 "/usr/include/sys/wait.h" 3 4 >extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); > > > ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 ># 140 "/usr/include/sys/wait.h" 2 3 4 ># 151 "/usr/include/sys/wait.h" 3 4 >extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, > int __options); > > > > > >struct rusage; > > > > > > >extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, > struct rusage * __usage) ; > > > > > >struct rusage; > > >extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, > struct rusage *__usage) ; > > > > ># 88 "iozone.c" 2 > > > > > >int atoi(); >int close(); >int unlink(); >int main(); >void record_command_line(); > > > >int fsync(); >void srand48(); >long lrand48(); >void create_list(); >void Poll(); >void print_header(); >void Kill(); >long long l_min(); >long long l_max(); >long long mythread_create(); > > ># 1 "/usr/include/fcntl.h" 1 3 4 ># 29 "/usr/include/fcntl.h" 3 4 > > > > ># 1 "/usr/include/bits/fcntl.h" 1 3 4 ># 136 "/usr/include/bits/fcntl.h" 3 4 >struct flock > { > short int l_type; > short int l_whence; > > __off_t l_start; > __off_t l_len; > > > > > __pid_t l_pid; > }; > > >struct flock64 > { > short int l_type; > short int l_whence; > __off64_t l_start; > __off64_t l_len; > __pid_t l_pid; > }; ># 181 "/usr/include/bits/fcntl.h" 3 4 > > > >extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) > ; > > ># 34 "/usr/include/fcntl.h" 2 3 4 > > > ># 1 "/usr/include/sys/stat.h" 1 3 4 ># 103 "/usr/include/sys/stat.h" 3 4 > > ># 1 "/usr/include/bits/stat.h" 1 3 4 ># 36 "/usr/include/bits/stat.h" 3 4 >struct stat > { > __dev_t st_dev; > unsigned short int __pad1; > > __ino_t st_ino; > > > > __mode_t st_mode; > __nlink_t st_nlink; > __uid_t st_uid; > __gid_t st_gid; > __dev_t st_rdev; > unsigned short int __pad2; > > __off_t st_size; > > > > __blksize_t st_blksize; > > > __blkcnt_t st_blocks; ># 70 "/usr/include/bits/stat.h" 3 4 > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 85 "/usr/include/bits/stat.h" 3 4 > unsigned long int __unused4; > unsigned long int __unused5; > > > > }; > > >struct stat64 > { > __dev_t st_dev; > unsigned int __pad1; > > __ino_t __st_ino; > __mode_t st_mode; > __nlink_t st_nlink; > __uid_t st_uid; > __gid_t st_gid; > __dev_t st_rdev; > unsigned int __pad2; > __off64_t st_size; > __blksize_t st_blksize; > > __blkcnt64_t st_blocks; > > > > > > > > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 127 "/usr/include/bits/stat.h" 3 4 > __ino64_t st_ino; > }; ># 106 "/usr/include/sys/stat.h" 2 3 4 ># 207 "/usr/include/sys/stat.h" 3 4 >extern int stat (__const char *__restrict __file, > struct stat *__restrict __buf) ; > > > >extern int fstat (int __fd, struct stat *__buf) ; ># 226 "/usr/include/sys/stat.h" 3 4 >extern int stat64 (__const char *__restrict __file, > struct stat64 *__restrict __buf) ; >extern int fstat64 (int __fd, struct stat64 *__buf) ; > > > > > > >extern int lstat (__const char *__restrict __file, > struct stat *__restrict __buf) ; ># 248 "/usr/include/sys/stat.h" 3 4 >extern int lstat64 (__const char *__restrict __file, > struct stat64 *__restrict __buf) ; > > > > > >extern int chmod (__const char *__file, __mode_t __mode) ; > > > > > >extern int lchmod (__const char *__file, __mode_t __mode) ; > > > > >extern int fchmod (int __fd, __mode_t __mode) ; > > > > > >extern __mode_t umask (__mode_t __mask) ; > > > > >extern __mode_t getumask (void) ; > > > >extern int mkdir (__const char *__path, __mode_t __mode) ; > > > > > >extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) > ; > > > > >extern int mkfifo (__const char *__path, __mode_t __mode) ; ># 319 "/usr/include/sys/stat.h" 3 4 >extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) ; >extern int __xstat (int __ver, __const char *__filename, > struct stat *__stat_buf) ; >extern int __lxstat (int __ver, __const char *__filename, > struct stat *__stat_buf) ; ># 343 "/usr/include/sys/stat.h" 3 4 >extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) > ; >extern int __xstat64 (int __ver, __const char *__filename, > struct stat64 *__stat_buf) ; >extern int __lxstat64 (int __ver, __const char *__filename, > struct stat64 *__stat_buf) ; > >extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, > __dev_t *__dev) ; > > > > >extern __inline__ int stat (__const char *__path, > struct stat *__statbuf) >{ > return __xstat (3, __path, __statbuf); >} > > >extern __inline__ int lstat (__const char *__path, > struct stat *__statbuf) >{ > return __lxstat (3, __path, __statbuf); >} > > >extern __inline__ int fstat (int __fd, struct stat *__statbuf) >{ > return __fxstat (3, __fd, __statbuf); >} > > >extern __inline__ int mknod (__const char *__path, __mode_t __mode, > __dev_t __dev) >{ > return __xmknod (1, __path, __mode, &__dev); >} > > > > > >extern __inline__ int stat64 (__const char *__path, > struct stat64 *__statbuf) >{ > return __xstat64 (3, __path, __statbuf); >} > > >extern __inline__ int lstat64 (__const char *__path, > struct stat64 *__statbuf) >{ > return __lxstat64 (3, __path, __statbuf); >} > > >extern __inline__ int fstat64 (int __fd, struct stat64 *__statbuf) >{ > return __fxstat64 (3, __fd, __statbuf); >} > > > > > ># 38 "/usr/include/fcntl.h" 2 3 4 ># 63 "/usr/include/fcntl.h" 3 4 >extern int fcntl (int __fd, int __cmd, ...); ># 72 "/usr/include/fcntl.h" 3 4 >extern int open (__const char *__file, int __oflag, ...); ># 81 "/usr/include/fcntl.h" 3 4 >extern int open64 (__const char *__file, int __oflag, ...); ># 90 "/usr/include/fcntl.h" 3 4 >extern int creat (__const char *__file, __mode_t __mode); ># 100 "/usr/include/fcntl.h" 3 4 >extern int creat64 (__const char *__file, __mode_t __mode); ># 119 "/usr/include/fcntl.h" 3 4 >extern int lockf (int __fd, int __cmd, __off_t __len); ># 128 "/usr/include/fcntl.h" 3 4 >extern int lockf64 (int __fd, int __cmd, __off64_t __len); > > > > > > > >extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len, > int __advise) ; ># 148 "/usr/include/fcntl.h" 3 4 >extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, > int __advise) ; ># 158 "/usr/include/fcntl.h" 3 4 >extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len); ># 169 "/usr/include/fcntl.h" 3 4 >extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); > > > > ># 114 "iozone.c" 2 > >char *help[] = { >" Usage: iozone [-s filesize_Kb] [-r record_size_Kb] [-f [path]filename] [-h]", >" [-i test] [-E] [-p] [-a] [-A] [-z] [-Z] [-m] [-M] [-t children]", >" [-l min_number_procs] [-u max_number_procs] [-v] [-R] [-x] [-o]", >" [-d microseconds] [-F path1 path2...] [-V pattern] [-j stride]", >" [-T] [-C] [-B] [-D] [-G] [-I] [-H depth] [-k depth] [-U mount_point]", >" [-S cache_size] [-O] [-L cacheline_size] [-K] [-g maxfilesize_Kb]", >" [-n minfilesize_Kb] [-N] [-Q] [-P start_cpu] [-e] [-c] [-b Excel.xls]", >" [-J milliseconds] [-X write_telemetry_filename] [-w] [-W]", >" [-Y read_telemetry_filename] [-y minrecsize_Kb] [-q maxrecsize_Kb]", >" [-+u] [-+m cluster_filename] [-+d] [-+x multiplier] [-+p # ]", >" [-+r] [-+t]", >" ", >" -a Auto mode", >" -A Auto2 mode", >" -b Filename Create Excel worksheet file", >" -B Use mmap() files", >" -c Include close in the timing calculations", >" -C Show bytes transferred by each child in throughput testing", >" -d # Microsecond delay out of barrier", >" -D Use msync(MS_ASYNC) on mmap files", >" -e Include flush (fsync,fflush) in the timing calculations", >" -E Run extension tests", >" -f filename to use", >" -F filenames for each process/thread in throughput test", >" -g # Set maximum file size (in Kbytes) for auto mode (or #m or #g)", >" -G Use msync(MS_SYNC) on mmap files", >" -h help", >" -H # Use POSIX async I/O with # async operations", >" -i # Test to run (0=write/rewrite, 1=read/re-read, 2=random-read/write", >" 3=Read-backwards, 4=Re-write-record, 5=stride-read, 6=fwrite/re-fwrite", >" 7=fread/Re-fread, 8=random_mix, 9=pwrite/Re-pwrite, 10=pread/Re-pread", >" 11=pwritev/Re-pwritev, 12=preadv/Re-preadv)", >" -I Use VxFS VX_DIRECT, O_DIRECT,or O_DIRECTIO for all file operations", >" -j # Set stride of file accesses to (# * record size)", >" -J # milliseconds of compute cycle before each I/O operation", >" -k # Use POSIX async I/O (no bcopy) with # async operations", >" -K Create jitter in the access pattern for readers", >" -l # Lower limit on number of processes to run", >" -L # Set processor cache line size to value (in bytes)", >" -m Use multiple buffers", >" -M Report uname -a output", >" -n # Set minimum file size (in Kbytes) for auto mode (or #m or #g)", >" -N Report results in microseconds per operation", >" -o Writes are synch (O_SYNC)", >" -O Give results in ops/sec.", >" -p Purge on", >" -P # Bind processes/threads to processors, starting with this cpu", >" -q # Set maximum record size (in Kbytes) for auto mode (or #m or #g)", >" -Q Create offset/latency files", >" -r # record size in Kb", >" or -r #k .. size in Kb", >" or -r #m .. size in Mb", >" or -r #g .. size in Gb", >" -R Generate Excel report", >" -s # file size in Kb", >" or -s #k .. size in Kb", >" or -s #m .. size in Mb", >" or -s #g .. size in Gb", >" -S # Set processor cache size to value (in Kbytes)", >" -t # Number of threads or processes to use in throughput test", >" -T Use POSIX pthreads for throughput tests", >" -u # Upper limit on number of processes to run", >" -U Mount point to remount between tests", >" -v version information", >" -V # Verify data pattern write/read", >" -w Do not unlink temporary file", >" -W Lock file when reading or writing", >" -x Turn off stone-walling", >" -X filename Write telemetry file. Contains lines with (offset reclen compute_time) in ascii", >" -y # Set minimum record size (in Kbytes) for auto mode (or #m or #g)", >" -Y filename Read telemetry file. Contains lines with (offset reclen compute_time) in ascii", >" -z Used in conjunction with -a to test all possible record sizes", >" -Z Enable mixing of mmap I/O and file I/O", >" -+m Cluster_filename Enable Cluster testing", >" -+d File I/O diagnostic mode. (To troubleshoot a broken file I/O subsystem)", >" -+u Enable CPU utilization output (Experimental)", >" -+x # Multiplier to use for incrementing file and record sizes", >" -+p # Percentage of mix to be reads", >" -+r Enable O_RSYNC|O_SYNC for all testing.", >" -+t Enable network performance test. Requires -+m ", >" -+n No retests selected.", >" -+k Use constant aggregate data set size.", >" -+q Delay in seconds between tests.", >" -+l Enable record locking mode.", >" -+L Enable record locking mode, with shared file.", > >" -+D Enable O_DSYNC mode.", > > >" -+A # Enable madvise. 0 = normal, 1=random, 2=sequential", >" 3=dontneed, 4=willneed", > >"" }; > >char *head1[] = { > " 'Iozone' Filesystem Benchmark Program", > " ", >" Version $Revision: 3.218 $", > "\tCompiled for 32 bit mode.", > " ", > " Original Author: William Norcott (wnorcott@us.oracle.com)", > " 4 Dunlap Drive", > " Nashua, NH 03060", > " ", > " Enhancements: Don Capps (capps@iozone.org)", > " 7417 Crenshaw", > " Plano, TX 75025", > " ", > " Copyright 1991, 1992, 1994, 1998, 1999, 2002 William D. Norcott", > " ", > " 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", > " ", > " Other contributors:", > " ", > " Don Capps (Hewlett Packard) capps@iozone.org", > " ", > ""}; > > > > > > ># 1 "/usr/include/sys/mman.h" 1 3 4 ># 26 "/usr/include/sys/mman.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 27 "/usr/include/sys/mman.h" 2 3 4 ># 42 "/usr/include/sys/mman.h" 3 4 ># 1 "/usr/include/bits/mman.h" 1 3 4 ># 43 "/usr/include/sys/mman.h" 2 3 4 > > > > > ># 58 "/usr/include/sys/mman.h" 3 4 >extern void *mmap (void *__addr, size_t __len, int __prot, > int __flags, int __fd, __off_t __offset) ; ># 71 "/usr/include/sys/mman.h" 3 4 >extern void *mmap64 (void *__addr, size_t __len, int __prot, > int __flags, int __fd, __off64_t __offset) ; > > > > >extern int munmap (void *__addr, size_t __len) ; > > > > >extern int mprotect (void *__addr, size_t __len, int __prot) ; > > > > > > > >extern int msync (void *__addr, size_t __len, int __flags); > > > > >extern int madvise (void *__addr, size_t __len, int __advice) ; > > > >extern int posix_madvise (void *__addr, size_t __len, int __advice) ; > > > > >extern int mlock (__const void *__addr, size_t __len) ; > > >extern int munlock (__const void *__addr, size_t __len) ; > > > > >extern int mlockall (int __flags) ; > > > >extern int munlockall (void) ; > > > > > >extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, > int __may_move) ; > > > > > > >extern int mincore (void *__start, size_t __len, unsigned char *__vec) > ; > > > >extern int remap_file_pages (void *__start, size_t __size, int __prot, > size_t __pgoff, int __flags) ; > > > > >extern int shm_open (__const char *__name, int __oflag, mode_t __mode); > > >extern int shm_unlink (__const char *__name); > > ># 244 "iozone.c" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 30 "/usr/include/stdio.h" 3 4 > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 35 "/usr/include/stdio.h" 2 3 4 ># 44 "/usr/include/stdio.h" 3 4 > > >typedef struct _IO_FILE FILE; > > > > > ># 62 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 72 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 14 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 354 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 3 4 >typedef unsigned int wint_t; ># 15 "/usr/include/_G_config.h" 2 3 4 ># 24 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 > ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 51 "/usr/include/wchar.h" 2 3 4 ># 76 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > wint_t __wch; > char __wchb[4]; > } __value; >} __mbstate_t; ># 25 "/usr/include/_G_config.h" 2 3 4 > >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 44 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/gconv.h" 1 3 4 ># 28 "/usr/include/gconv.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 ># 29 "/usr/include/gconv.h" 2 3 4 > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 32 "/usr/include/gconv.h" 2 3 4 > > > > > >enum >{ > __GCONV_OK = 0, > __GCONV_NOCONV, > __GCONV_NODB, > __GCONV_NOMEM, > > __GCONV_EMPTY_INPUT, > __GCONV_FULL_OUTPUT, > __GCONV_ILLEGAL_INPUT, > __GCONV_INCOMPLETE_INPUT, > > __GCONV_ILLEGAL_DESCRIPTOR, > __GCONV_INTERNAL_ERROR >}; > > > >enum >{ > __GCONV_IS_LAST = 0x0001, > __GCONV_IGNORE_ERRORS = 0x0002 >}; > > > >struct __gconv_step; >struct __gconv_step_data; >struct __gconv_loaded_object; >struct __gconv_trans_data; > > > >typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, > __const unsigned char **, __const unsigned char *, > unsigned char **, size_t *, int, int); > > >typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); > > >typedef int (*__gconv_init_fct) (struct __gconv_step *); >typedef void (*__gconv_end_fct) (struct __gconv_step *); > > > >typedef int (*__gconv_trans_fct) (struct __gconv_step *, > struct __gconv_step_data *, void *, > __const unsigned char *, > __const unsigned char **, > __const unsigned char *, unsigned char **, > size_t *); > > >typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, > __const unsigned char *, > unsigned char *, unsigned char *); > > >typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, > size_t *); > > >typedef int (*__gconv_trans_init_fct) (void **, const char *); >typedef void (*__gconv_trans_end_fct) (void *); > >struct __gconv_trans_data >{ > > __gconv_trans_fct __trans_fct; > __gconv_trans_context_fct __trans_context_fct; > __gconv_trans_end_fct __trans_end_fct; > void *__data; > struct __gconv_trans_data *__next; >}; > > > >struct __gconv_step >{ > struct __gconv_loaded_object *__shlib_handle; > __const char *__modname; > > int __counter; > > char *__from_name; > char *__to_name; > > __gconv_fct __fct; > __gconv_btowc_fct __btowc_fct; > __gconv_init_fct __init_fct; > __gconv_end_fct __end_fct; > > > > int __min_needed_from; > int __max_needed_from; > int __min_needed_to; > int __max_needed_to; > > > int __stateful; > > void *__data; >}; > > > >struct __gconv_step_data >{ > unsigned char *__outbuf; > unsigned char *__outbufend; > > > > int __flags; > > > > int __invocation_counter; > > > > int __internal_use; > > __mbstate_t *__statep; > __mbstate_t __state; > > > > struct __gconv_trans_data *__trans; >}; > > > >typedef struct __gconv_info >{ > size_t __nsteps; > struct __gconv_step *__steps; > __extension__ struct __gconv_step_data __data []; >} *__gconv_t; ># 45 "/usr/include/_G_config.h" 2 3 4 >typedef union >{ > struct __gconv_info __cd; > struct > { > struct __gconv_info __cd; > struct __gconv_step_data __data; > } __combined; >} _G_iconv_t; > >typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); >typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); ># 33 "/usr/include/libio.h" 2 3 4 ># 53 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stdarg.h" 1 3 4 ># 43 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/libio.h" 2 3 4 ># 163 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 173 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 196 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 264 "/usr/include/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 312 "/usr/include/libio.h" 3 4 > __off64_t _offset; > > > > > > void *__pad1; > void *__pad2; > > int _mode; > > char _unused2[15 * sizeof (int) - 2 * sizeof (void *)]; > >}; > > >typedef struct _IO_FILE _IO_FILE; > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 351 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); > > > > >typedef __io_read_fn cookie_read_function_t; >typedef __io_write_fn cookie_write_function_t; >typedef __io_seek_fn cookie_seek_function_t; >typedef __io_close_fn cookie_close_function_t; > > >typedef struct >{ > __io_read_fn *read; > __io_write_fn *write; > __io_seek_fn *seek; > __io_close_fn *close; >} _IO_cookie_io_functions_t; >typedef _IO_cookie_io_functions_t cookie_io_functions_t; > >struct _IO_cookie_file; > > >extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, > void *__cookie, _IO_cookie_io_functions_t __fns); > > > > > > > >extern int __underflow (_IO_FILE *) ; >extern int __uflow (_IO_FILE *) ; >extern int __overflow (_IO_FILE *, int) ; >extern wint_t __wunderflow (_IO_FILE *) ; >extern wint_t __wuflow (_IO_FILE *) ; >extern wint_t __woverflow (_IO_FILE *, wint_t) ; ># 441 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp) ; >extern int _IO_putc (int __c, _IO_FILE *__fp) ; >extern int _IO_feof (_IO_FILE *__fp) ; >extern int _IO_ferror (_IO_FILE *__fp) ; > >extern int _IO_peekc_locked (_IO_FILE *__fp) ; > > > > > >extern void _IO_flockfile (_IO_FILE *) ; >extern void _IO_funlockfile (_IO_FILE *) ; >extern int _IO_ftrylockfile (_IO_FILE *) ; ># 471 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict) ; >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list) ; >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) ; >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) ; > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) ; >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) ; > >extern void _IO_free_backup_area (_IO_FILE *) ; ># 73 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 86 "/usr/include/stdio.h" 3 4 > > >typedef _G_fpos_t fpos_t; > > > > > >typedef _G_fpos64_t fpos64_t; ># 138 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 139 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > > >extern int remove (__const char *__filename) ; > >extern int rename (__const char *__old, __const char *__new) ; > > > > > > > > > >extern FILE *tmpfile (void); ># 174 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile64 (void); > > > >extern char *tmpnam (char *__s) ; > > > > > >extern char *tmpnam_r (char *__s) ; ># 196 "/usr/include/stdio.h" 3 4 >extern char *tempnam (__const char *__dir, __const char *__pfx) > __attribute__ ((__malloc__)); > > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); > ># 221 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 231 "/usr/include/stdio.h" 3 4 >extern int fcloseall (void); > > > > > > > > > >extern FILE *fopen (__const char *__restrict __filename, > __const char *__restrict __modes); > > > > >extern FILE *freopen (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream); ># 262 "/usr/include/stdio.h" 3 4 > > >extern FILE *fopen64 (__const char *__restrict __filename, > __const char *__restrict __modes); >extern FILE *freopen64 (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream); > > > > >extern FILE *fdopen (int __fd, __const char *__modes) ; > > > > > >extern FILE *fopencookie (void *__restrict __magic_cookie, > __const char *__restrict __modes, > _IO_cookie_io_functions_t __io_funcs) ; > > >extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) ; > > > > >extern FILE *open_memstream (char **__restrict __bufloc, > size_t *__restrict __sizeloc) ; > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ; > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) ; > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) ; > > >extern void setlinebuf (FILE *__stream) ; > > > > > > > > >extern int fprintf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int printf (__const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > __const char *__restrict __format, ...) ; > > > > > >extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) ; > > > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, ...) > __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 3, 0))); > > > > > > >extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int __asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); >extern int asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > >extern int vdprintf (int __fd, __const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > > >extern int fscanf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int scanf (__const char *__restrict __format, ...); > >extern int sscanf (__const char *__restrict __s, > __const char *__restrict __format, ...) ; > > > > > > > > >extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))); > > >extern int vsscanf (__const char *__restrict __s, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 454 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 465 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); > > > > > > > > > > > >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); > ># 498 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream); > > > > > > >extern char *gets (char *__s); > ># 543 "/usr/include/stdio.h" 3 4 >extern char *fgets_unlocked (char *__restrict __s, int __n, > FILE *__restrict __stream); ># 559 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream); >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream); > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream); > > > > > > > > >extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (__const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > >extern size_t fwrite (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s); > ># 620 "/usr/include/stdio.h" 3 4 >extern int fputs_unlocked (__const char *__restrict __s, > FILE *__restrict __stream); ># 631 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); >extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream); > > > > >extern void rewind (FILE *__stream); > ># 667 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream); ># 686 "/usr/include/stdio.h" 3 4 > > > > > > >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, __const fpos_t *__pos); ># 709 "/usr/include/stdio.h" 3 4 > > > >extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); >extern __off64_t ftello64 (FILE *__stream); >extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); >extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); > > > > >extern void clearerr (FILE *__stream) ; > >extern int feof (FILE *__stream) ; > >extern int ferror (FILE *__stream) ; > > > > >extern void clearerr_unlocked (FILE *__stream) ; >extern int feof_unlocked (FILE *__stream) ; >extern int ferror_unlocked (FILE *__stream) ; > > > > > > > > >extern void perror (__const char *__s); > > > > > > ># 1 "/usr/include/bits/sys_errlist.h" 1 3 4 ># 27 "/usr/include/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern __const char *__const sys_errlist[]; > > >extern int _sys_nerr; >extern __const char *__const _sys_errlist[]; ># 748 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) ; > > > > >extern int fileno_unlocked (FILE *__stream) ; ># 767 "/usr/include/stdio.h" 3 4 >extern FILE *popen (__const char *__command, __const char *__modes); > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) ; > > > > > >extern char *cuserid (char *__s); > > > > >struct obstack; > > >extern int obstack_printf (struct obstack *__restrict __obstack, > __const char *__restrict __format, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); >extern int obstack_vprintf (struct obstack *__restrict __obstack, > __const char *__restrict __format, > __gnuc_va_list __args) > __attribute__ ((__format__ (__printf__, 2, 0))); > > > > > > > >extern void flockfile (FILE *__stream) ; > > > >extern int ftrylockfile (FILE *__stream) ; > > >extern void funlockfile (FILE *__stream) ; ># 828 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio.h" 1 3 4 ># 33 "/usr/include/bits/stdio.h" 3 4 >extern __inline__ int >vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) >{ > return vfprintf (stdout, __fmt, __arg); >} > > >extern __inline__ int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline__ int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end, 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline__ int >getchar_unlocked (void) >{ > return (__builtin_expect ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end, 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline__ int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline__ int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline__ int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline__ int >putchar_unlocked (int __c) >{ > return (__builtin_expect ((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end, 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline__ __ssize_t >getline (char **__lineptr, size_t *__n, FILE *__stream) >{ > return __getdelim (__lineptr, __n, '\n', __stream); >} > > > > > >extern __inline__ int >feof_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline__ int >ferror_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 829 "/usr/include/stdio.h" 2 3 4 > > > ># 245 "iozone.c" 2 > ># 1 "/usr/include/unistd.h" 1 3 4 ># 28 "/usr/include/unistd.h" 3 4 > ># 171 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/posix_opt.h" 1 3 4 ># 172 "/usr/include/unistd.h" 2 3 4 > > > ># 1 "/usr/include/bits/environments.h" 1 3 4 ># 23 "/usr/include/bits/environments.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 24 "/usr/include/bits/environments.h" 2 3 4 ># 176 "/usr/include/unistd.h" 2 3 4 ># 195 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 196 "/usr/include/unistd.h" 2 3 4 ># 236 "/usr/include/unistd.h" 3 4 >typedef __intptr_t intptr_t; > > > > > > >typedef __socklen_t socklen_t; ># 256 "/usr/include/unistd.h" 3 4 >extern int access (__const char *__name, int __type) ; > > > > >extern int euidaccess (__const char *__name, int __type) ; ># 286 "/usr/include/unistd.h" 3 4 >extern __off_t lseek (int __fd, __off_t __offset, int __whence) ; ># 298 "/usr/include/unistd.h" 3 4 >extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) ; > > > > > > >extern int close (int __fd); > > > > > > >extern ssize_t read (int __fd, void *__buf, size_t __nbytes); > > > > > >extern ssize_t write (int __fd, __const void *__buf, size_t __n); ># 328 "/usr/include/unistd.h" 3 4 >extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, > __off_t __offset); > > > > > > >extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, > __off_t __offset); ># 356 "/usr/include/unistd.h" 3 4 >extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, > __off64_t __offset); > > >extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, > __off64_t __offset); > > > > > > > >extern int pipe (int __pipedes[2]) ; ># 378 "/usr/include/unistd.h" 3 4 >extern unsigned int alarm (unsigned int __seconds) ; ># 390 "/usr/include/unistd.h" 3 4 >extern unsigned int sleep (unsigned int __seconds); > > > > > > >extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) > ; > > > > > > >extern int usleep (__useconds_t __useconds); ># 414 "/usr/include/unistd.h" 3 4 >extern int pause (void); > > > >extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) > ; > > > >extern int fchown (int __fd, __uid_t __owner, __gid_t __group) ; > > > > >extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) > ; > > > > >extern int chdir (__const char *__path) ; > > > >extern int fchdir (int __fd) ; ># 448 "/usr/include/unistd.h" 3 4 >extern char *getcwd (char *__buf, size_t __size) ; > > > > > >extern char *get_current_dir_name (void) ; > > > > > > >extern char *getwd (char *__buf) ; > > > > >extern int dup (int __fd) ; > > >extern int dup2 (int __fd, int __fd2) ; > > >extern char **__environ; > >extern char **environ; > > > > > >extern int execve (__const char *__path, char *__const __argv[], > char *__const __envp[]) ; > > > > >extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) > ; > > > > >extern int execv (__const char *__path, char *__const __argv[]) ; > > > >extern int execle (__const char *__path, __const char *__arg, ...) ; > > > >extern int execl (__const char *__path, __const char *__arg, ...) ; > > > >extern int execvp (__const char *__file, char *__const __argv[]) ; > > > > >extern int execlp (__const char *__file, __const char *__arg, ...) ; > > > > >extern int nice (int __inc) ; > > > > >extern void _exit (int __status) __attribute__ ((__noreturn__)); > > > > > ># 1 "/usr/include/bits/confname.h" 1 3 4 ># 26 "/usr/include/bits/confname.h" 3 4 >enum > { > _PC_LINK_MAX, > > _PC_MAX_CANON, > > _PC_MAX_INPUT, > > _PC_NAME_MAX, > > _PC_PATH_MAX, > > _PC_PIPE_BUF, > > _PC_CHOWN_RESTRICTED, > > _PC_NO_TRUNC, > > _PC_VDISABLE, > > _PC_SYNC_IO, > > _PC_ASYNC_IO, > > _PC_PRIO_IO, > > _PC_SOCK_MAXBUF, > > _PC_FILESIZEBITS, > > _PC_REC_INCR_XFER_SIZE, > > _PC_REC_MAX_XFER_SIZE, > > _PC_REC_MIN_XFER_SIZE, > > _PC_REC_XFER_ALIGN, > > _PC_ALLOC_SIZE_MIN, > > _PC_SYMLINK_MAX, > > _PC_2_SYMLINKS > > }; > > >enum > { > _SC_ARG_MAX, > > _SC_CHILD_MAX, > > _SC_CLK_TCK, > > _SC_NGROUPS_MAX, > > _SC_OPEN_MAX, > > _SC_STREAM_MAX, > > _SC_TZNAME_MAX, > > _SC_JOB_CONTROL, > > _SC_SAVED_IDS, > > _SC_REALTIME_SIGNALS, > > _SC_PRIORITY_SCHEDULING, > > _SC_TIMERS, > > _SC_ASYNCHRONOUS_IO, > > _SC_PRIORITIZED_IO, > > _SC_SYNCHRONIZED_IO, > > _SC_FSYNC, > > _SC_MAPPED_FILES, > > _SC_MEMLOCK, > > _SC_MEMLOCK_RANGE, > > _SC_MEMORY_PROTECTION, > > _SC_MESSAGE_PASSING, > > _SC_SEMAPHORES, > > _SC_SHARED_MEMORY_OBJECTS, > > _SC_AIO_LISTIO_MAX, > > _SC_AIO_MAX, > > _SC_AIO_PRIO_DELTA_MAX, > > _SC_DELAYTIMER_MAX, > > _SC_MQ_OPEN_MAX, > > _SC_MQ_PRIO_MAX, > > _SC_VERSION, > > _SC_PAGESIZE, > > > _SC_RTSIG_MAX, > > _SC_SEM_NSEMS_MAX, > > _SC_SEM_VALUE_MAX, > > _SC_SIGQUEUE_MAX, > > _SC_TIMER_MAX, > > > > > _SC_BC_BASE_MAX, > > _SC_BC_DIM_MAX, > > _SC_BC_SCALE_MAX, > > _SC_BC_STRING_MAX, > > _SC_COLL_WEIGHTS_MAX, > > _SC_EQUIV_CLASS_MAX, > > _SC_EXPR_NEST_MAX, > > _SC_LINE_MAX, > > _SC_RE_DUP_MAX, > > _SC_CHARCLASS_NAME_MAX, > > > _SC_2_VERSION, > > _SC_2_C_BIND, > > _SC_2_C_DEV, > > _SC_2_FORT_DEV, > > _SC_2_FORT_RUN, > > _SC_2_SW_DEV, > > _SC_2_LOCALEDEF, > > > _SC_PII, > > _SC_PII_XTI, > > _SC_PII_SOCKET, > > _SC_PII_INTERNET, > > _SC_PII_OSI, > > _SC_POLL, > > _SC_SELECT, > > _SC_UIO_MAXIOV, > > _SC_IOV_MAX = _SC_UIO_MAXIOV, > > _SC_PII_INTERNET_STREAM, > > _SC_PII_INTERNET_DGRAM, > > _SC_PII_OSI_COTS, > > _SC_PII_OSI_CLTS, > > _SC_PII_OSI_M, > > _SC_T_IOV_MAX, > > > > _SC_THREADS, > > _SC_THREAD_SAFE_FUNCTIONS, > > _SC_GETGR_R_SIZE_MAX, > > _SC_GETPW_R_SIZE_MAX, > > _SC_LOGIN_NAME_MAX, > > _SC_TTY_NAME_MAX, > > _SC_THREAD_DESTRUCTOR_ITERATIONS, > > _SC_THREAD_KEYS_MAX, > > _SC_THREAD_STACK_MIN, > > _SC_THREAD_THREADS_MAX, > > _SC_THREAD_ATTR_STACKADDR, > > _SC_THREAD_ATTR_STACKSIZE, > > _SC_THREAD_PRIORITY_SCHEDULING, > > _SC_THREAD_PRIO_INHERIT, > > _SC_THREAD_PRIO_PROTECT, > > _SC_THREAD_PROCESS_SHARED, > > > _SC_NPROCESSORS_CONF, > > _SC_NPROCESSORS_ONLN, > > _SC_PHYS_PAGES, > > _SC_AVPHYS_PAGES, > > _SC_ATEXIT_MAX, > > _SC_PASS_MAX, > > > _SC_XOPEN_VERSION, > > _SC_XOPEN_XCU_VERSION, > > _SC_XOPEN_UNIX, > > _SC_XOPEN_CRYPT, > > _SC_XOPEN_ENH_I18N, > > _SC_XOPEN_SHM, > > > _SC_2_CHAR_TERM, > > _SC_2_C_VERSION, > > _SC_2_UPE, > > > _SC_XOPEN_XPG2, > > _SC_XOPEN_XPG3, > > _SC_XOPEN_XPG4, > > > _SC_CHAR_BIT, > > _SC_CHAR_MAX, > > _SC_CHAR_MIN, > > _SC_INT_MAX, > > _SC_INT_MIN, > > _SC_LONG_BIT, > > _SC_WORD_BIT, > > _SC_MB_LEN_MAX, > > _SC_NZERO, > > _SC_SSIZE_MAX, > > _SC_SCHAR_MAX, > > _SC_SCHAR_MIN, > > _SC_SHRT_MAX, > > _SC_SHRT_MIN, > > _SC_UCHAR_MAX, > > _SC_UINT_MAX, > > _SC_ULONG_MAX, > > _SC_USHRT_MAX, > > > _SC_NL_ARGMAX, > > _SC_NL_LANGMAX, > > _SC_NL_MSGMAX, > > _SC_NL_NMAX, > > _SC_NL_SETMAX, > > _SC_NL_TEXTMAX, > > > _SC_XBS5_ILP32_OFF32, > > _SC_XBS5_ILP32_OFFBIG, > > _SC_XBS5_LP64_OFF64, > > _SC_XBS5_LPBIG_OFFBIG, > > > _SC_XOPEN_LEGACY, > > _SC_XOPEN_REALTIME, > > _SC_XOPEN_REALTIME_THREADS, > > > _SC_ADVISORY_INFO, > > _SC_BARRIERS, > > _SC_BASE, > > _SC_C_LANG_SUPPORT, > > _SC_C_LANG_SUPPORT_R, > > _SC_CLOCK_SELECTION, > > _SC_CPUTIME, > > _SC_THREAD_CPUTIME, > > _SC_DEVICE_IO, > > _SC_DEVICE_SPECIFIC, > > _SC_DEVICE_SPECIFIC_R, > > _SC_FD_MGMT, > > _SC_FIFO, > > _SC_PIPE, > > _SC_FILE_ATTRIBUTES, > > _SC_FILE_LOCKING, > > _SC_FILE_SYSTEM, > > _SC_MONOTONIC_CLOCK, > > _SC_MULTI_PROCESS, > > _SC_SINGLE_PROCESS, > > _SC_NETWORKING, > > _SC_READER_WRITER_LOCKS, > > _SC_SPIN_LOCKS, > > _SC_REGEXP, > > _SC_REGEX_VERSION, > > _SC_SHELL, > > _SC_SIGNALS, > > _SC_SPAWN, > > _SC_SPORADIC_SERVER, > > _SC_THREAD_SPORADIC_SERVER, > > _SC_SYSTEM_DATABASE, > > _SC_SYSTEM_DATABASE_R, > > _SC_TIMEOUTS, > > _SC_TYPED_MEMORY_OBJECTS, > > _SC_USER_GROUPS, > > _SC_USER_GROUPS_R, > > _SC_2_PBS, > > _SC_2_PBS_ACCOUNTING, > > _SC_2_PBS_LOCATE, > > _SC_2_PBS_MESSAGE, > > _SC_2_PBS_TRACK, > > _SC_SYMLOOP_MAX, > > _SC_STREAMS, > > _SC_2_PBS_CHECKPOINT, > > > _SC_V6_ILP32_OFF32, > > _SC_V6_ILP32_OFFBIG, > > _SC_V6_LP64_OFF64, > > _SC_V6_LPBIG_OFFBIG, > > > _SC_HOST_NAME_MAX, > > _SC_TRACE, > > _SC_TRACE_EVENT_FILTER, > > _SC_TRACE_INHERIT, > > _SC_TRACE_LOG, > > > _SC_LEVEL1_ICACHE_SIZE, > > _SC_LEVEL1_ICACHE_ASSOC, > > _SC_LEVEL1_ICACHE_LINESIZE, > > _SC_LEVEL1_DCACHE_SIZE, > > _SC_LEVEL1_DCACHE_ASSOC, > > _SC_LEVEL1_DCACHE_LINESIZE, > > _SC_LEVEL2_CACHE_SIZE, > > _SC_LEVEL2_CACHE_ASSOC, > > _SC_LEVEL2_CACHE_LINESIZE, > > _SC_LEVEL3_CACHE_SIZE, > > _SC_LEVEL3_CACHE_ASSOC, > > _SC_LEVEL3_CACHE_LINESIZE, > > _SC_LEVEL4_CACHE_SIZE, > > _SC_LEVEL4_CACHE_ASSOC, > > _SC_LEVEL4_CACHE_LINESIZE > > > }; > > >enum > { > _CS_PATH, > > > _CS_V6_WIDTH_RESTRICTED_ENVS, > > > _CS_GNU_LIBC_VERSION, > > _CS_GNU_LIBPTHREAD_VERSION, > > > _CS_LFS_CFLAGS = 1000, > > _CS_LFS_LDFLAGS, > > _CS_LFS_LIBS, > > _CS_LFS_LINTFLAGS, > > _CS_LFS64_CFLAGS, > > _CS_LFS64_LDFLAGS, > > _CS_LFS64_LIBS, > > _CS_LFS64_LINTFLAGS, > > > _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, > > _CS_XBS5_ILP32_OFF32_LDFLAGS, > > _CS_XBS5_ILP32_OFF32_LIBS, > > _CS_XBS5_ILP32_OFF32_LINTFLAGS, > > _CS_XBS5_ILP32_OFFBIG_CFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LDFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LIBS, > > _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, > > _CS_XBS5_LP64_OFF64_CFLAGS, > > _CS_XBS5_LP64_OFF64_LDFLAGS, > > _CS_XBS5_LP64_OFF64_LIBS, > > _CS_XBS5_LP64_OFF64_LINTFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_CFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LIBS, > > _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, > > > _CS_POSIX_V6_ILP32_OFF32_CFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LIBS, > > _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LIBS, > > _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, > > _CS_POSIX_V6_LP64_OFF64_CFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LDFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LIBS, > > _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS > > }; ># 526 "/usr/include/unistd.h" 2 3 4 > > >extern long int pathconf (__const char *__path, int __name) ; > > >extern long int fpathconf (int __fd, int __name) ; > > >extern long int sysconf (int __name) __attribute__ ((__const__)); > > > >extern size_t confstr (int __name, char *__buf, size_t __len) ; > > > > >extern __pid_t getpid (void) ; > > >extern __pid_t getppid (void) ; > > > > >extern __pid_t getpgrp (void) ; ># 561 "/usr/include/unistd.h" 3 4 >extern __pid_t __getpgid (__pid_t __pid) ; > >extern __pid_t getpgid (__pid_t __pid) ; > > > > > > >extern int setpgid (__pid_t __pid, __pid_t __pgid) ; ># 587 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) ; ># 605 "/usr/include/unistd.h" 3 4 >extern __pid_t setsid (void) ; > > > >extern __pid_t getsid (__pid_t __pid) ; > > > >extern __uid_t getuid (void) ; > > >extern __uid_t geteuid (void) ; > > >extern __gid_t getgid (void) ; > > >extern __gid_t getegid (void) ; > > > > >extern int getgroups (int __size, __gid_t __list[]) ; > > > >extern int group_member (__gid_t __gid) ; > > > > > > >extern int setuid (__uid_t __uid) ; > > > > >extern int setreuid (__uid_t __ruid, __uid_t __euid) ; > > > > >extern int seteuid (__uid_t __uid) ; > > > > > > >extern int setgid (__gid_t __gid) ; > > > > >extern int setregid (__gid_t __rgid, __gid_t __egid) ; > > > > >extern int setegid (__gid_t __gid) ; > > > > > >extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid); > > > >extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid); > > > >extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid); > > > >extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid); > > > > > > >extern __pid_t fork (void) ; > > > > > > >extern __pid_t vfork (void) ; > > > > > >extern char *ttyname (int __fd) ; > > > >extern int ttyname_r (int __fd, char *__buf, size_t __buflen) ; > > > >extern int isatty (int __fd) ; > > > > > >extern int ttyslot (void) ; > > > > >extern int link (__const char *__from, __const char *__to) ; > > > >extern int symlink (__const char *__from, __const char *__to) ; > > > > >extern int readlink (__const char *__restrict __path, char *__restrict __buf, > size_t __len) ; > > > >extern int unlink (__const char *__name) ; > > >extern int rmdir (__const char *__path) ; > > > >extern __pid_t tcgetpgrp (int __fd) ; > > >extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) ; > > > > > > >extern char *getlogin (void); > > > > > > > >extern int getlogin_r (char *__name, size_t __name_len); > > > > >extern int setlogin (__const char *__name) ; ># 775 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/getopt.h" 1 3 4 ># 59 "/usr/include/getopt.h" 3 4 >extern char *optarg; ># 73 "/usr/include/getopt.h" 3 4 >extern int optind; > > > > >extern int opterr; > > > >extern int optopt; ># 152 "/usr/include/getopt.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) > ; ># 776 "/usr/include/unistd.h" 2 3 4 > > > > > > > >extern int gethostname (char *__name, size_t __len) ; > > > > > > >extern int sethostname (__const char *__name, size_t __len) ; > > > >extern int sethostid (long int __id) ; > > > > > >extern int getdomainname (char *__name, size_t __len) ; >extern int setdomainname (__const char *__name, size_t __len) ; > > > > > >extern int vhangup (void) ; > > >extern int revoke (__const char *__file) ; > > > > > > > >extern int profil (unsigned short int *__sample_buffer, size_t __size, > size_t __offset, unsigned int __scale) ; > > > > > >extern int acct (__const char *__name) ; > > > >extern char *getusershell (void) ; >extern void endusershell (void) ; >extern void setusershell (void) ; > > > > > >extern int daemon (int __nochdir, int __noclose) ; > > > > > > >extern int chroot (__const char *__path) ; > > > >extern char *getpass (__const char *__prompt); ># 857 "/usr/include/unistd.h" 3 4 >extern int fsync (int __fd); > > > > > > >extern long int gethostid (void); > > >extern void sync (void) ; > > > > >extern int getpagesize (void) __attribute__ ((__const__)); > > > > >extern int truncate (__const char *__file, __off_t __length) ; ># 888 "/usr/include/unistd.h" 3 4 >extern int truncate64 (__const char *__file, __off64_t __length) ; > > > > >extern int ftruncate (int __fd, __off_t __length) ; ># 903 "/usr/include/unistd.h" 3 4 >extern int ftruncate64 (int __fd, __off64_t __length) ; > > > > > >extern int getdtablesize (void) ; ># 918 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) ; > > > > > >extern void *sbrk (intptr_t __delta) ; ># 939 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) ; ># 993 "/usr/include/unistd.h" 3 4 >extern int fdatasync (int __fildes) ; > > > > > > > >extern char *crypt (__const char *__key, __const char *__salt) ; > > > >extern void encrypt (char *__block, int __edflag) ; > > > > > > >extern void swab (__const void *__restrict __from, void *__restrict __to, > ssize_t __n) ; > > > > > > > >extern char *ctermid (char *__s) ; > > > ># 247 "iozone.c" 2 > > > ># 1 "/usr/include/malloc.h" 1 3 4 ># 46 "/usr/include/malloc.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 151 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 47 "/usr/include/malloc.h" 2 3 4 ># 118 "/usr/include/malloc.h" 3 4 >extern void * malloc (size_t __size) __attribute__ ((__malloc__)); > > >extern void * calloc (size_t __nmemb, size_t __size) > __attribute__ ((__malloc__)); > > > >extern void * realloc (void * __ptr, size_t __size) > > __attribute__ ((__malloc__)); > > >extern void free (void * __ptr) ; > > >extern void cfree (void * __ptr) ; > > >extern void * memalign (size_t __alignment, size_t __size) ; > > >extern void * valloc (size_t __size) __attribute__ ((__malloc__)); > > > >extern void * pvalloc (size_t __size) > __attribute__ ((__malloc__)); > > > >extern void * (*__morecore) (ptrdiff_t __size); > > >extern void * __default_morecore (ptrdiff_t __size) > __attribute__ ((__malloc__)); > > > >struct mallinfo { > int arena; > int ordblks; > int smblks; > int hblks; > int hblkhd; > int usmblks; > int fsmblks; > int uordblks; > int fordblks; > int keepcost; >}; > > >extern struct mallinfo mallinfo (void) ; ># 195 "/usr/include/malloc.h" 3 4 >extern int mallopt (int __param, int __val) ; > > > >extern int malloc_trim (size_t __pad) ; > > > >extern size_t malloc_usable_size (void * __ptr) ; > > >extern void malloc_stats (void) ; > > >extern void * malloc_get_state (void) ; > > > >extern int malloc_set_state (void * __ptr) ; > > > > >extern void (*__malloc_initialize_hook) (void); > >extern void (*__free_hook) (void * __ptr, __const void *); > >extern void * (*__malloc_hook) (size_t __size, __const void *); > >extern void * (*__realloc_hook) (void * __ptr, size_t __size, __const void *); > > >extern void * (*__memalign_hook) (size_t __alignment, size_t __size, __const void *); > > >extern void (*__after_morecore_hook) (void); > > >extern void __malloc_check_init (void) ; ># 251 "iozone.c" 2 ># 281 "iozone.c" ># 1 "/usr/include/string.h" 1 3 4 ># 28 "/usr/include/string.h" 3 4 > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 34 "/usr/include/string.h" 2 3 4 > > > > >extern void *memcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; > > >extern void *memmove (void *__dest, __const void *__src, size_t __n) > ; > > > > > > >extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, > int __c, size_t __n) > ; > > > > > >extern void *memset (void *__s, int __c, size_t __n) ; > > >extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern void *memchr (__const void *__s, int __c, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern void *rawmemchr (__const void *__s, int __c) __attribute__ ((__pure__)); > > >extern void *memrchr (__const void *__s, int __c, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) > ; > >extern char *strncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > > >extern char *strcat (char *__restrict __dest, __const char *__restrict __src) > ; > >extern char *strncat (char *__restrict __dest, __const char *__restrict __src, > size_t __n) ; > > >extern int strcmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > >extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern int strcoll (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > >extern size_t strxfrm (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > ># 117 "/usr/include/string.h" 3 4 >extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) > __attribute__ ((__pure__)); > >extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, > __locale_t __l) ; > > > > >extern char *strdup (__const char *__s) __attribute__ ((__malloc__)); > > > > > > >extern char *strndup (__const char *__string, size_t __n) > __attribute__ ((__malloc__)); ># 160 "/usr/include/string.h" 3 4 > > >extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__)); > >extern char *strrchr (__const char *__s, int __c) __attribute__ ((__pure__)); > > > > > >extern char *strchrnul (__const char *__s, int __c) __attribute__ ((__pure__)); > > > > > >extern size_t strcspn (__const char *__s, __const char *__reject) > __attribute__ ((__pure__)); > > >extern size_t strspn (__const char *__s, __const char *__accept) > __attribute__ ((__pure__)); > >extern char *strpbrk (__const char *__s, __const char *__accept) > __attribute__ ((__pure__)); > >extern char *strstr (__const char *__haystack, __const char *__needle) > __attribute__ ((__pure__)); > > > >extern char *strtok (char *__restrict __s, __const char *__restrict __delim) > ; > > > > >extern char *__strtok_r (char *__restrict __s, > __const char *__restrict __delim, > char **__restrict __save_ptr) ; > >extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, > char **__restrict __save_ptr) ; > > > > >extern char *strcasestr (__const char *__haystack, __const char *__needle) > __attribute__ ((__pure__)); > > > > > > >extern void *memmem (__const void *__haystack, size_t __haystacklen, > __const void *__needle, size_t __needlelen) > __attribute__ ((__pure__)); > > > >extern void *__mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; >extern void *mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; > > > > > >extern size_t strlen (__const char *__s) __attribute__ ((__pure__)); > > > > > >extern size_t strnlen (__const char *__string, size_t __maxlen) > __attribute__ ((__pure__)); > > > > > >extern char *strerror (int __errnum) ; > ># 268 "/usr/include/string.h" 3 4 >extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) ; > > > > > >extern void __bzero (void *__s, size_t __n) ; > > > >extern void bcopy (__const void *__src, void *__dest, size_t __n) ; > > >extern void bzero (void *__s, size_t __n) ; > > >extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern char *index (__const char *__s, int __c) __attribute__ ((__pure__)); > > >extern char *rindex (__const char *__s, int __c) __attribute__ ((__pure__)); > > > >extern int ffs (int __i) __attribute__ ((__const__)); > > > > >extern int ffsl (long int __l) __attribute__ ((__const__)); > >__extension__ extern int ffsll (long long int __ll) > __attribute__ ((__const__)); > > > > >extern int strcasecmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > > >extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern int strcasecmp_l (__const char *__s1, __const char *__s2, > __locale_t __loc) __attribute__ ((__pure__)); > >extern int strncasecmp_l (__const char *__s1, __const char *__s2, > size_t __n, __locale_t __loc) > __attribute__ ((__pure__)); > > > > > >extern char *strsep (char **__restrict __stringp, > __const char *__restrict __delim) ; > > > > >extern int strverscmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > > >extern char *strsignal (int __sig) ; > > >extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) > ; >extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) > ; > > > >extern char *__stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; >extern char *stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > > >extern char *strfry (char *__string) ; > > >extern void *memfrob (void *__s, size_t __n) ; > > > > > > >extern char *basename (__const char *__filename) ; ># 393 "/usr/include/string.h" 3 4 ># 1 "/usr/include/bits/string.h" 1 3 4 ># 394 "/usr/include/string.h" 2 3 4 > > ># 1 "/usr/include/bits/string2.h" 1 3 4 ># 389 "/usr/include/bits/string2.h" 3 4 >extern void *__rawmemchr (const void *__s, int __c); ># 919 "/usr/include/bits/string2.h" 3 4 >extern __inline__ size_t __strcspn_c1 (__const char *__s, int __reject); >extern __inline__ size_t >__strcspn_c1 (__const char *__s, int __reject) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject) > ++__result; > return __result; >} > >extern __inline__ size_t __strcspn_c2 (__const char *__s, int __reject1, > int __reject2); >extern __inline__ size_t >__strcspn_c2 (__const char *__s, int __reject1, int __reject2) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2) > ++__result; > return __result; >} > >extern __inline__ size_t __strcspn_c3 (__const char *__s, int __reject1, > int __reject2, int __reject3); >extern __inline__ size_t >__strcspn_c3 (__const char *__s, int __reject1, int __reject2, > int __reject3) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2 && __s[__result] != __reject3) > ++__result; > return __result; >} ># 976 "/usr/include/bits/string2.h" 3 4 >extern __inline__ size_t __strspn_c1 (__const char *__s, int __accept); >extern __inline__ size_t >__strspn_c1 (__const char *__s, int __accept) >{ > register size_t __result = 0; > > while (__s[__result] == __accept) > ++__result; > return __result; >} > >extern __inline__ size_t __strspn_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline__ size_t >__strspn_c2 (__const char *__s, int __accept1, int __accept2) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2) > ++__result; > return __result; >} > >extern __inline__ size_t __strspn_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline__ size_t >__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2 > || __s[__result] == __accept3) > ++__result; > return __result; >} ># 1033 "/usr/include/bits/string2.h" 3 4 >extern __inline__ char *__strpbrk_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline__ char * >__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} > >extern __inline__ char *__strpbrk_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline__ char * >__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, > int __accept3) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 > && *__s != __accept3) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} ># 1085 "/usr/include/bits/string2.h" 3 4 >extern __inline__ char *__strtok_r_1c (char *__s, char __sep, char **__nextp); >extern __inline__ char * >__strtok_r_1c (char *__s, char __sep, char **__nextp) >{ > char *__result; > if (__s == ((void *)0)) > __s = *__nextp; > while (*__s == __sep) > ++__s; > __result = ((void *)0); > if (*__s != '\0') > { > __result = __s++; > while (*__s != '\0') > if (*__s++ == __sep) > { > __s[-1] = '\0'; > break; > } > *__nextp = __s; > } > return __result; >} ># 1117 "/usr/include/bits/string2.h" 3 4 >extern char *__strsep_g (char **__stringp, __const char *__delim); ># 1135 "/usr/include/bits/string2.h" 3 4 >extern __inline__ char *__strsep_1c (char **__s, char __reject); >extern __inline__ char * >__strsep_1c (char **__s, char __reject) >{ > register char *__retval = *__s; > if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : strchr (__retval, __reject)))) != ((void *)0)) > *(*__s)++ = '\0'; > return __retval; >} > >extern __inline__ char *__strsep_2c (char **__s, char __reject1, char __reject2); >extern __inline__ char * >__strsep_2c (char **__s, char __reject1, char __reject2) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} > >extern __inline__ char *__strsep_3c (char **__s, char __reject1, char __reject2, > char __reject3); >extern __inline__ char * >__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} ># 1216 "/usr/include/bits/string2.h" 3 4 >extern char *__strdup (__const char *__string) __attribute__ ((__malloc__)); ># 1235 "/usr/include/bits/string2.h" 3 4 >extern char *__strndup (__const char *__string, size_t __n) > __attribute__ ((__malloc__)); ># 397 "/usr/include/string.h" 2 3 4 > > > > ># 282 "iozone.c" 2 > > > ># 1 "/usr/include/sys/socket.h" 1 3 4 ># 25 "/usr/include/sys/socket.h" 3 4 > > ># 1 "/usr/include/sys/uio.h" 1 3 4 ># 26 "/usr/include/sys/uio.h" 3 4 > > > ># 1 "/usr/include/bits/uio.h" 1 3 4 ># 42 "/usr/include/bits/uio.h" 3 4 >struct iovec > { > void *iov_base; > size_t iov_len; > }; ># 30 "/usr/include/sys/uio.h" 2 3 4 ># 40 "/usr/include/sys/uio.h" 3 4 >extern ssize_t readv (int __fd, __const struct iovec *__vector, int __count); ># 50 "/usr/include/sys/uio.h" 3 4 >extern ssize_t writev (int __fd, __const struct iovec *__vector, int __count); > > ># 28 "/usr/include/sys/socket.h" 2 3 4 > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 30 "/usr/include/sys/socket.h" 2 3 4 > > > > > ># 1 "/usr/include/bits/socket.h" 1 3 4 ># 29 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 30 "/usr/include/bits/socket.h" 2 3 4 > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 ># 11 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 ># 122 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 3 4 ># 1 "/usr/include/limits.h" 1 3 4 ># 144 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/posix1_lim.h" 1 3 4 ># 130 "/usr/include/bits/posix1_lim.h" 3 4 ># 1 "/usr/include/bits/local_lim.h" 1 3 4 ># 36 "/usr/include/bits/local_lim.h" 3 4 ># 1 "/usr/include/linux/limits.h" 1 3 4 ># 37 "/usr/include/bits/local_lim.h" 2 3 4 ># 131 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 145 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/posix2_lim.h" 1 3 4 ># 149 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/xopen_lim.h" 1 3 4 ># 34 "/usr/include/bits/xopen_lim.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 35 "/usr/include/bits/xopen_lim.h" 2 3 4 ># 153 "/usr/include/limits.h" 2 3 4 ># 123 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 2 3 4 ># 8 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/syslimits.h" 2 3 4 ># 12 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 2 3 4 ># 32 "/usr/include/bits/socket.h" 2 3 4 ># 41 "/usr/include/bits/socket.h" 3 4 >enum __socket_type >{ > SOCK_STREAM = 1, > > > SOCK_DGRAM = 2, > > > SOCK_RAW = 3, > > SOCK_RDM = 4, > > SOCK_SEQPACKET = 5, > > > SOCK_PACKET = 10 > > > >}; ># 142 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/bits/sockaddr.h" 1 3 4 ># 29 "/usr/include/bits/sockaddr.h" 3 4 >typedef unsigned short int sa_family_t; ># 143 "/usr/include/bits/socket.h" 2 3 4 > > >struct sockaddr > { > sa_family_t sa_family; > char sa_data[14]; > }; ># 162 "/usr/include/bits/socket.h" 3 4 >struct sockaddr_storage > { > sa_family_t ss_family; > __uint32_t __ss_align; > char __ss_padding[(128 - (2 * sizeof (__uint32_t)))]; > }; > > > >enum > { > MSG_OOB = 0x01, > > MSG_PEEK = 0x02, > > MSG_DONTROUTE = 0x04, > > > > MSG_TRYHARD = MSG_DONTROUTE, > > > MSG_CTRUNC = 0x08, > > MSG_PROXY = 0x10, > > MSG_TRUNC = 0x20, > > MSG_DONTWAIT = 0x40, > > MSG_EOR = 0x80, > > MSG_WAITALL = 0x100, > > MSG_FIN = 0x200, > > MSG_SYN = 0x400, > > MSG_CONFIRM = 0x800, > > MSG_RST = 0x1000, > > MSG_ERRQUEUE = 0x2000, > > MSG_NOSIGNAL = 0x4000, > > MSG_MORE = 0x8000 > > }; > > > > >struct msghdr > { > void *msg_name; > socklen_t msg_namelen; > > struct iovec *msg_iov; > size_t msg_iovlen; > > void *msg_control; > size_t msg_controllen; > > int msg_flags; > }; > > >struct cmsghdr > { > size_t cmsg_len; > > int cmsg_level; > int cmsg_type; > > __extension__ unsigned char __cmsg_data []; > > }; ># 257 "/usr/include/bits/socket.h" 3 4 >extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, > struct cmsghdr *__cmsg) ; > > > > >extern __inline__ struct cmsghdr * >__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) >{ > if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) > > return 0; > > __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg > + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); > if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control > + __mhdr->msg_controllen) > || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) > > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) > > return 0; > return __cmsg; >} > > > > >enum > { > SCM_RIGHTS = 0x01, > > > SCM_CREDENTIALS = 0x02, > > > __SCM_CONNECT = 0x03 > }; > > > >struct ucred >{ > pid_t pid; > uid_t uid; > gid_t gid; >}; > > ># 1 "/usr/include/asm/socket.h" 1 3 4 > > > ># 1 "/usr/include/asm/sockios.h" 1 3 4 ># 5 "/usr/include/asm/socket.h" 2 3 4 ># 306 "/usr/include/bits/socket.h" 2 3 4 > > > >struct linger > { > int l_onoff; > int l_linger; > }; ># 36 "/usr/include/sys/socket.h" 2 3 4 > > > > >struct osockaddr > { > unsigned short int sa_family; > unsigned char sa_data[14]; > }; > > > > >enum >{ > SHUT_RD = 0, > > SHUT_WR, > > SHUT_RDWR > >}; ># 87 "/usr/include/sys/socket.h" 3 4 >typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__; > } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); > > >typedef union { __const struct sockaddr *__restrict __sockaddr__; __const struct sockaddr_at *__restrict __sockaddr_at__; __const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; __const struct sockaddr_dl *__restrict __sockaddr_dl__; __const struct sockaddr_eon *__restrict __sockaddr_eon__; __const struct sockaddr_in *__restrict __sockaddr_in__; __const struct sockaddr_in6 *__restrict __sockaddr_in6__; __const struct sockaddr_inarp *__restrict __sockaddr_inarp__; __const struct sockaddr_ipx *__restrict __sockaddr_ipx__; __const struct sockaddr_iso *__restrict __sockaddr_iso__; __const struct sockaddr_ns *__restrict __sockaddr_ns__; __const struct sockaddr_un *__restrict __sockaddr_un__; __const struct sockaddr_x25 *__restrict __sockaddr_x25__; > } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); > > > > > > > >extern int socket (int __domain, int __type, int __protocol) ; > > > > > >extern int socketpair (int __domain, int __type, int __protocol, > int __fds[2]) ; > > >extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) > ; > > >extern int getsockname (int __fd, __SOCKADDR_ARG __addr, > socklen_t *__restrict __len) ; ># 124 "/usr/include/sys/socket.h" 3 4 >extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); > > > >extern int getpeername (int __fd, __SOCKADDR_ARG __addr, > socklen_t *__restrict __len) ; > > > > > > >extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t sendto (int __fd, __const void *__buf, size_t __n, > int __flags, __CONST_SOCKADDR_ARG __addr, > socklen_t __addr_len); ># 161 "/usr/include/sys/socket.h" 3 4 >extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, > int __flags, __SOCKADDR_ARG __addr, > socklen_t *__restrict __addr_len); > > > > > > > >extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, > int __flags); > > > > > > >extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); > > > > > >extern int getsockopt (int __fd, int __level, int __optname, > void *__restrict __optval, > socklen_t *__restrict __optlen) ; > > > > >extern int setsockopt (int __fd, int __level, int __optname, > __const void *__optval, socklen_t __optlen) ; > > > > > >extern int listen (int __fd, int __n) ; ># 209 "/usr/include/sys/socket.h" 3 4 >extern int accept (int __fd, __SOCKADDR_ARG __addr, > socklen_t *__restrict __addr_len); > > > > > > > >extern int shutdown (int __fd, int __how) ; > > > > >extern int sockatmark (int __fd) ; > > > > > > > >extern int isfdtype (int __fd, int __fdtype) ; > > > ># 286 "iozone.c" 2 ># 1 "/usr/include/netinet/in.h" 1 3 4 ># 23 "/usr/include/netinet/in.h" 3 4 ># 1 "/usr/include/stdint.h" 1 3 4 ># 28 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/stdint.h" 2 3 4 ># 49 "/usr/include/stdint.h" 3 4 >typedef unsigned char uint8_t; >typedef unsigned short int uint16_t; > >typedef unsigned int uint32_t; > > > > > >__extension__ >typedef unsigned long long int uint64_t; > > > > > > >typedef signed char int_least8_t; >typedef short int int_least16_t; >typedef int int_least32_t; > > > >__extension__ >typedef long long int int_least64_t; > > > >typedef unsigned char uint_least8_t; >typedef unsigned short int uint_least16_t; >typedef unsigned int uint_least32_t; > > > >__extension__ >typedef unsigned long long int uint_least64_t; > > > > > > >typedef signed char int_fast8_t; > > > > > >typedef int int_fast16_t; >typedef int int_fast32_t; >__extension__ >typedef long long int int_fast64_t; > > > >typedef unsigned char uint_fast8_t; > > > > > >typedef unsigned int uint_fast16_t; >typedef unsigned int uint_fast32_t; >__extension__ >typedef unsigned long long int uint_fast64_t; ># 129 "/usr/include/stdint.h" 3 4 >typedef unsigned int uintptr_t; ># 138 "/usr/include/stdint.h" 3 4 >__extension__ >typedef long long int intmax_t; >__extension__ >typedef unsigned long long int uintmax_t; ># 24 "/usr/include/netinet/in.h" 2 3 4 > > > > > > > >enum > { > IPPROTO_IP = 0, > > IPPROTO_HOPOPTS = 0, > > IPPROTO_ICMP = 1, > > IPPROTO_IGMP = 2, > > IPPROTO_IPIP = 4, > > IPPROTO_TCP = 6, > > IPPROTO_EGP = 8, > > IPPROTO_PUP = 12, > > IPPROTO_UDP = 17, > > IPPROTO_IDP = 22, > > IPPROTO_TP = 29, > > IPPROTO_IPV6 = 41, > > IPPROTO_ROUTING = 43, > > IPPROTO_FRAGMENT = 44, > > IPPROTO_RSVP = 46, > > IPPROTO_GRE = 47, > > IPPROTO_ESP = 50, > > IPPROTO_AH = 51, > > IPPROTO_ICMPV6 = 58, > > IPPROTO_NONE = 59, > > IPPROTO_DSTOPTS = 60, > > IPPROTO_MTP = 92, > > IPPROTO_ENCAP = 98, > > IPPROTO_PIM = 103, > > IPPROTO_COMP = 108, > > IPPROTO_SCTP = 132, > > IPPROTO_RAW = 255, > > IPPROTO_MAX > }; > > > >typedef uint16_t in_port_t; > > >enum > { > IPPORT_ECHO = 7, > IPPORT_DISCARD = 9, > IPPORT_SYSTAT = 11, > IPPORT_DAYTIME = 13, > IPPORT_NETSTAT = 15, > IPPORT_FTP = 21, > IPPORT_TELNET = 23, > IPPORT_SMTP = 25, > IPPORT_TIMESERVER = 37, > IPPORT_NAMESERVER = 42, > IPPORT_WHOIS = 43, > IPPORT_MTP = 57, > > IPPORT_TFTP = 69, > IPPORT_RJE = 77, > IPPORT_FINGER = 79, > IPPORT_TTYLINK = 87, > IPPORT_SUPDUP = 95, > > > IPPORT_EXECSERVER = 512, > IPPORT_LOGINSERVER = 513, > IPPORT_CMDSERVER = 514, > IPPORT_EFSSERVER = 520, > > > IPPORT_BIFFUDP = 512, > IPPORT_WHOSERVER = 513, > IPPORT_ROUTESERVER = 520, > > > IPPORT_RESERVED = 1024, > > > IPPORT_USERRESERVED = 5000 > }; > > > >typedef uint32_t in_addr_t; >struct in_addr > { > in_addr_t s_addr; > }; ># 193 "/usr/include/netinet/in.h" 3 4 >struct in6_addr > { > union > { > uint8_t u6_addr8[16]; > uint16_t u6_addr16[8]; > uint32_t u6_addr32[4]; > } in6_u; > > > > }; > >extern const struct in6_addr in6addr_any; >extern const struct in6_addr in6addr_loopback; ># 219 "/usr/include/netinet/in.h" 3 4 >struct sockaddr_in > { > sa_family_t sin_family; > in_port_t sin_port; > struct in_addr sin_addr; > > > unsigned char sin_zero[sizeof (struct sockaddr) - > (sizeof (unsigned short int)) - > sizeof (in_port_t) - > sizeof (struct in_addr)]; > }; > > >struct sockaddr_in6 > { > sa_family_t sin6_family; > in_port_t sin6_port; > uint32_t sin6_flowinfo; > struct in6_addr sin6_addr; > uint32_t sin6_scope_id; > }; > > >struct ipv6_mreq > { > > struct in6_addr ipv6mr_multiaddr; > > > unsigned int ipv6mr_interface; > }; > > ># 1 "/usr/include/bits/in.h" 1 3 4 ># 66 "/usr/include/bits/in.h" 3 4 >struct ip_opts > { > struct in_addr ip_dst; > char ip_opts[40]; > }; > > >struct ip_mreq > { > struct in_addr imr_multiaddr; > struct in_addr imr_interface; > }; > > >struct ip_mreqn > { > struct in_addr imr_multiaddr; > struct in_addr imr_address; > int imr_ifindex; > }; > > >struct in_pktinfo > { > int ipi_ifindex; > struct in_addr ipi_spec_dst; > struct in_addr ipi_addr; > }; ># 254 "/usr/include/netinet/in.h" 2 3 4 ># 262 "/usr/include/netinet/in.h" 3 4 >extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__const__)); >extern uint16_t ntohs (uint16_t __netshort) > __attribute__ ((__const__)); >extern uint32_t htonl (uint32_t __hostlong) > __attribute__ ((__const__)); >extern uint16_t htons (uint16_t __hostshort) > __attribute__ ((__const__)); > > > > ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 274 "/usr/include/netinet/in.h" 2 3 4 ># 336 "/usr/include/netinet/in.h" 3 4 >extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) ; > > >extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) > ; ># 364 "/usr/include/netinet/in.h" 3 4 >struct in6_pktinfo > { > struct in6_addr ipi6_addr; > unsigned int ipi6_ifindex; > }; > > > > >extern int inet6_option_space (int __nbytes); >extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, > int __type); >extern int inet6_option_append (struct cmsghdr *__cmsg, > __const uint8_t *__typep, int __multx, > int __plusy); >extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, > int __multx, int __plusy); >extern int inet6_option_next (__const struct cmsghdr *__cmsg, > uint8_t **__tptrp); >extern int inet6_option_find (__const struct cmsghdr *__cmsg, > uint8_t **__tptrp, int __type); > > > ># 287 "iozone.c" 2 ># 1 "/usr/include/arpa/inet.h" 1 3 4 ># 31 "/usr/include/arpa/inet.h" 3 4 > > > > >extern in_addr_t inet_addr (__const char *__cp) ; > > >extern in_addr_t inet_lnaof (struct in_addr __in) ; > > > >extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) > ; > > >extern in_addr_t inet_netof (struct in_addr __in) ; > > > >extern in_addr_t inet_network (__const char *__cp) ; > > > >extern char *inet_ntoa (struct in_addr __in) ; > > > > >extern int inet_pton (int __af, __const char *__restrict __cp, > void *__restrict __buf) ; > > > > >extern __const char *inet_ntop (int __af, __const void *__restrict __cp, > char *__restrict __buf, socklen_t __len) > ; > > > > > > >extern in_addr_t inet_aton (__const char *__cp, struct in_addr *__inp) ; > > > >extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) ; > > > > >extern char *inet_net_ntop (int __af, __const void *__cp, int __bits, > char *__buf, size_t __len) ; > > > > >extern int inet_net_pton (int __af, __const char *__cp, > void *__buf, size_t __len) ; > > > > >extern unsigned int inet_nsap_addr (__const char *__cp, > unsigned char *__buf, int __len) ; > > > >extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp, > char *__buf) ; > > > ># 288 "iozone.c" 2 ># 326 "iozone.c" ># 1 "/usr/include/sys/times.h" 1 3 4 ># 32 "/usr/include/sys/times.h" 3 4 > > > >struct tms > { > clock_t tms_utime; > clock_t tms_stime; > > clock_t tms_cutime; > clock_t tms_cstime; > }; > > > > > > >extern clock_t times (struct tms *__buffer) ; > > ># 327 "iozone.c" 2 ># 1 "/usr/include/sys/file.h" 1 3 4 ># 28 "/usr/include/sys/file.h" 3 4 > ># 51 "/usr/include/sys/file.h" 3 4 >extern int flock (int __fd, int __operation) ; > > > ># 328 "iozone.c" 2 > > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 ># 335 "iozone.c" 2 ># 344 "iozone.c" ># 1 "/usr/include/sys/time.h" 1 3 4 ># 28 "/usr/include/sys/time.h" 3 4 ># 1 "/usr/include/bits/time.h" 1 3 4 ># 29 "/usr/include/sys/time.h" 2 3 4 ># 38 "/usr/include/sys/time.h" 3 4 > ># 56 "/usr/include/sys/time.h" 3 4 >struct timezone > { > int tz_minuteswest; > int tz_dsttime; > }; > >typedef struct timezone *__restrict __timezone_ptr_t; ># 72 "/usr/include/sys/time.h" 3 4 >extern int gettimeofday (struct timeval *__restrict __tv, > __timezone_ptr_t __tz) ; > > > > >extern int settimeofday (__const struct timeval *__tv, > __const struct timezone *__tz) ; > > > > > >extern int adjtime (__const struct timeval *__delta, > struct timeval *__olddelta) ; > > > > >enum __itimer_which > { > > ITIMER_REAL = 0, > > > ITIMER_VIRTUAL = 1, > > > > ITIMER_PROF = 2 > > }; > > > >struct itimerval > { > > struct timeval it_interval; > > struct timeval it_value; > }; > > > > >typedef enum __itimer_which __itimer_which_t; > > > > > > >extern int getitimer (__itimer_which_t __which, > struct itimerval *__value) ; > > > > >extern int setitimer (__itimer_which_t __which, > __const struct itimerval *__restrict __new, > struct itimerval *__restrict __old) ; > > > > >extern int utimes (__const char *__file, __const struct timeval __tvp[2]) > ; > > > >extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) > ; > > >extern int futimes (int __fd, __const struct timeval __tvp[2]) ; ># 181 "/usr/include/sys/time.h" 3 4 > ># 345 "iozone.c" 2 > > ># 1 "/usr/include/sys/shm.h" 1 3 4 ># 25 "/usr/include/sys/shm.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 26 "/usr/include/sys/shm.h" 2 3 4 > > ># 1 "/usr/include/sys/ipc.h" 1 3 4 ># 29 "/usr/include/sys/ipc.h" 3 4 ># 1 "/usr/include/bits/ipctypes.h" 1 3 4 ># 31 "/usr/include/bits/ipctypes.h" 3 4 >typedef unsigned short int __ipc_pid_t; ># 30 "/usr/include/sys/ipc.h" 2 3 4 ># 1 "/usr/include/bits/ipc.h" 1 3 4 ># 43 "/usr/include/bits/ipc.h" 3 4 >struct ipc_perm > { > __key_t __key; > __uid_t uid; > __gid_t gid; > __uid_t cuid; > __gid_t cgid; > unsigned short int mode; > unsigned short int __pad1; > unsigned short int __seq; > unsigned short int __pad2; > unsigned long int __unused1; > unsigned long int __unused2; > }; ># 31 "/usr/include/sys/ipc.h" 2 3 4 ># 52 "/usr/include/sys/ipc.h" 3 4 > > > >extern key_t ftok (__const char *__pathname, int __proj_id) ; > > ># 29 "/usr/include/sys/shm.h" 2 3 4 > > ># 1 "/usr/include/bits/shm.h" 1 3 4 ># 40 "/usr/include/bits/shm.h" 3 4 >extern int __getpagesize (void) __attribute__ ((__const__)); > > > >typedef unsigned long int shmatt_t; > > >struct shmid_ds > { > struct ipc_perm shm_perm; > size_t shm_segsz; > __time_t shm_atime; > unsigned long int __unused1; > __time_t shm_dtime; > unsigned long int __unused2; > __time_t shm_ctime; > unsigned long int __unused3; > __pid_t shm_cpid; > __pid_t shm_lpid; > shmatt_t shm_nattch; > unsigned long int __unused4; > unsigned long int __unused5; > }; ># 75 "/usr/include/bits/shm.h" 3 4 >struct shminfo > { > unsigned long int shmmax; > unsigned long int shmmin; > unsigned long int shmmni; > unsigned long int shmseg; > unsigned long int shmall; > unsigned long int __unused1; > unsigned long int __unused2; > unsigned long int __unused3; > unsigned long int __unused4; > }; > >struct shm_info > { > int used_ids; > unsigned long int shm_tot; > unsigned long int shm_rss; > unsigned long int shm_swp; > unsigned long int swap_attempts; > unsigned long int swap_successes; > }; ># 32 "/usr/include/sys/shm.h" 2 3 4 ># 45 "/usr/include/sys/shm.h" 3 4 > > > > > > >extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) ; > > >extern int shmget (key_t __key, size_t __size, int __shmflg) ; > > >extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg) > ; > > >extern int shmdt (__const void *__shmaddr) ; > > ># 348 "iozone.c" 2 ># 374 "iozone.c" >long long page_size = 4096; ># 391 "iozone.c" >struct child_stats { > long long flag; > long long flag1; > float walltime; > float cputime; > float throughput; > float actual; >} __volatile__ *child_stat; > > > > >struct runtime { > float walltime; > float cputime; > float cpuutil; >}; > > > > > > > ># 1 "/usr/include/netdb.h" 1 3 4 ># 33 "/usr/include/netdb.h" 3 4 ># 1 "/usr/include/rpc/netdb.h" 1 3 4 ># 42 "/usr/include/rpc/netdb.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 ># 43 "/usr/include/rpc/netdb.h" 2 3 4 > > > >struct rpcent >{ > char *r_name; > char **r_aliases; > int r_number; >}; > >extern void setrpcent (int __stayopen) ; >extern void endrpcent (void) ; >extern struct rpcent *getrpcbyname (__const char *__name) ; >extern struct rpcent *getrpcbynumber (int __number) ; >extern struct rpcent *getrpcent (void) ; > > >extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, > char *__buffer, size_t __buflen, > struct rpcent **__result) ; > >extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, > char *__buffer, size_t __buflen, > struct rpcent **__result) ; > >extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, > size_t __buflen, struct rpcent **__result) ; > > > ># 34 "/usr/include/netdb.h" 2 3 4 > > > > ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 ># 39 "/usr/include/netdb.h" 2 3 4 > > > > ># 1 "/usr/include/bits/netdb.h" 1 3 4 ># 27 "/usr/include/bits/netdb.h" 3 4 >struct netent >{ > char *n_name; > char **n_aliases; > int n_addrtype; > uint32_t n_net; >}; ># 44 "/usr/include/netdb.h" 2 3 4 ># 54 "/usr/include/netdb.h" 3 4 > > > > > > > >extern int *__h_errno_location (void) __attribute__ ((__const__)); ># 88 "/usr/include/netdb.h" 3 4 >extern void herror (__const char *__str) ; > > >extern __const char *hstrerror (int __err_num) ; > > > > >struct hostent >{ > char *h_name; > char **h_aliases; > int h_addrtype; > int h_length; > char **h_addr_list; > >}; > > > > > > >extern void sethostent (int __stay_open); > > > > > >extern void endhostent (void); > > > > > > >extern struct hostent *gethostent (void); > > > > > > >extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len, > int __type); > > > > > >extern struct hostent *gethostbyname (__const char *__name); ># 149 "/usr/include/netdb.h" 3 4 >extern struct hostent *gethostbyname2 (__const char *__name, int __af); ># 161 "/usr/include/netdb.h" 3 4 >extern int gethostent_r (struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len, > int __type, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyname_r (__const char *__restrict __name, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyname2_r (__const char *__restrict __name, int __af, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); ># 192 "/usr/include/netdb.h" 3 4 >extern void setnetent (int __stay_open); > > > > > >extern void endnetent (void); > > > > > > >extern struct netent *getnetent (void); > > > > > > >extern struct netent *getnetbyaddr (uint32_t __net, int __type); > > > > > >extern struct netent *getnetbyname (__const char *__name); ># 231 "/usr/include/netdb.h" 3 4 >extern int getnetent_r (struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > >extern int getnetbyaddr_r (uint32_t __net, int __type, > struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > >extern int getnetbyname_r (__const char *__restrict __name, > struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > > > > >struct servent >{ > char *s_name; > char **s_aliases; > int s_port; > char *s_proto; >}; > > > > > > >extern void setservent (int __stay_open); > > > > > >extern void endservent (void); > > > > > > >extern struct servent *getservent (void); > > > > > > >extern struct servent *getservbyname (__const char *__name, > __const char *__proto); > > > > > > >extern struct servent *getservbyport (int __port, __const char *__proto); ># 303 "/usr/include/netdb.h" 3 4 >extern int getservent_r (struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > >extern int getservbyname_r (__const char *__restrict __name, > __const char *__restrict __proto, > struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > >extern int getservbyport_r (int __port, __const char *__restrict __proto, > struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > > > > >struct protoent >{ > char *p_name; > char **p_aliases; > int p_proto; >}; > > > > > > >extern void setprotoent (int __stay_open); > > > > > >extern void endprotoent (void); > > > > > > >extern struct protoent *getprotoent (void); > > > > > >extern struct protoent *getprotobyname (__const char *__name); > > > > > >extern struct protoent *getprotobynumber (int __proto); ># 369 "/usr/include/netdb.h" 3 4 >extern int getprotoent_r (struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); > >extern int getprotobyname_r (__const char *__restrict __name, > struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); > >extern int getprotobynumber_r (int __proto, > struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); ># 390 "/usr/include/netdb.h" 3 4 >extern int setnetgrent (__const char *__netgroup); > > > > > > > >extern void endnetgrent (void); ># 407 "/usr/include/netdb.h" 3 4 >extern int getnetgrent (char **__restrict __hostp, > char **__restrict __userp, > char **__restrict __domainp); ># 418 "/usr/include/netdb.h" 3 4 >extern int innetgr (__const char *__netgroup, __const char *__host, > __const char *, __const char *domain); > > > > > > > >extern int getnetgrent_r (char **__restrict __hostp, > char **__restrict __userp, > char **__restrict __domainp, > char *__restrict __buffer, size_t __buflen); ># 446 "/usr/include/netdb.h" 3 4 >extern int rcmd (char **__restrict __ahost, unsigned short int __rport, > __const char *__restrict __locuser, > __const char *__restrict __remuser, > __const char *__restrict __cmd, int *__restrict __fd2p); ># 458 "/usr/include/netdb.h" 3 4 >extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, > __const char *__restrict __locuser, > __const char *__restrict __remuser, > __const char *__restrict __cmd, int *__restrict __fd2p, > sa_family_t __af); ># 474 "/usr/include/netdb.h" 3 4 >extern int rexec (char **__restrict __ahost, int __rport, > __const char *__restrict __name, > __const char *__restrict __pass, > __const char *__restrict __cmd, int *__restrict __fd2p); ># 486 "/usr/include/netdb.h" 3 4 >extern int rexec_af (char **__restrict __ahost, int __rport, > __const char *__restrict __name, > __const char *__restrict __pass, > __const char *__restrict __cmd, int *__restrict __fd2p, > sa_family_t __af); ># 500 "/usr/include/netdb.h" 3 4 >extern int ruserok (__const char *__rhost, int __suser, > __const char *__remuser, __const char *__locuser); ># 510 "/usr/include/netdb.h" 3 4 >extern int ruserok_af (__const char *__rhost, int __suser, > __const char *__remuser, __const char *__locuser, > sa_family_t __af); ># 522 "/usr/include/netdb.h" 3 4 >extern int rresvport (int *__alport); ># 531 "/usr/include/netdb.h" 3 4 >extern int rresvport_af (int *__alport, sa_family_t __af); > > > > > > >struct addrinfo >{ > int ai_flags; > int ai_family; > int ai_socktype; > int ai_protocol; > socklen_t ai_addrlen; > struct sockaddr *ai_addr; > char *ai_canonname; > struct addrinfo *ai_next; >}; > > > >struct gaicb >{ > const char *ar_name; > const char *ar_service; > const struct addrinfo *ar_request; > struct addrinfo *ar_result; > > int __return; > int __unused[5]; >}; ># 630 "/usr/include/netdb.h" 3 4 >extern int getaddrinfo (__const char *__restrict __name, > __const char *__restrict __service, > __const struct addrinfo *__restrict __req, > struct addrinfo **__restrict __pai); > > >extern void freeaddrinfo (struct addrinfo *__ai) ; > > >extern __const char *gai_strerror (int __ecode) ; > > > > > >extern int getnameinfo (__const struct sockaddr *__restrict __sa, > socklen_t __salen, char *__restrict __host, > socklen_t __hostlen, char *__restrict __serv, > socklen_t __servlen, unsigned int __flags); ># 660 "/usr/include/netdb.h" 3 4 >extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict], > int __ent, struct sigevent *__restrict __sig); ># 671 "/usr/include/netdb.h" 3 4 >extern int gai_suspend (__const struct gaicb *__const __list[], int __ent, > __const struct timespec *__timeout); > > >extern int gai_error (struct gaicb *__req) ; > > >extern int gai_cancel (struct gaicb *__gaicbp) ; > > > ># 416 "iozone.c" 2 > > > > > > > >struct client_command { > char c_host_name[128]; > char c_client_name[128]; > char c_working_dir[256]; > char c_path_dir[256]; > char c_execute_name[256]; > char c_write_traj_filename[256]; > char c_read_traj_filename[256]; > int c_oflag; > int c_noretest; > int c_read_sync; > int c_jflag; > int c_async_flag; > int c_k_flag; > int c_h_flag; > int c_mflag; > int c_pflag; > int c_stride_flag; > int c_verify; > int c_sverify; > int c_odsync; > int c_diag_v; > int c_Q_flag; > int c_OPS_flag; > int c_mmapflag; > int c_mmapasflag; > int c_mmapnsflag; > int c_mmapssflag; > int c_no_copy_flag; > int c_include_close; > int c_include_flush; > int c_disrupt_flag; > int c_compute_flag; > int c_xflag; > int c_MS_flag; > int c_mmap_mix; > int c_stop_flag; > int c_w_traj_flag; > int c_r_traj_flag; > int c_direct_flag; > int c_cpuutilflag; > int c_client_number; > int c_command; > int c_testnum; > int c_no_unlink; > int c_file_lock; > int c_rec_lock; > int c_multiplier; > int c_share_file; > int c_pattern; > int c_version; > int c_base_time; > int c_num_child; > int c_pct_read; > int c_advise_op; > int c_advise_flag; > int c_restf; > long long c_stride; > long long c_rest_val; > long long c_delay; > long long c_purge; > long long c_fetchon; > long long c_numrecs64; > long long c_reclen; > long long c_child_flag; > long long c_delay_start; > long long c_depth; > float c_compute_time; >}; ># 504 "iozone.c" >struct client_neutral_command { > char c_host_name[40]; > char c_client_name[128]; > char c_working_dir[100]; > char c_path_dir[100]; > char c_execute_name[100]; > char c_write_traj_filename[100]; > char c_read_traj_filename[100]; > char c_oflag[2]; > char c_noretest[2]; > char c_read_sync[2]; > char c_jflag[2]; > char c_async_flag[2]; > char c_k_flag[2]; > char c_h_flag[2]; > char c_mflag[2]; > char c_pflag[2]; > char c_stride_flag[2]; > char c_verify[2]; > char c_sverify[2]; > char c_odsync[2]; > char c_diag_v[2]; > char c_Q_flag[2]; > char c_OPS_flag[2]; > char c_mmapflag[2]; > char c_mmapasflag[2]; > char c_mmapnsflag[2]; > char c_mmapssflag[2]; > char c_no_copy_flag[2]; > char c_include_close[2]; > char c_include_flush[2]; > char c_disrupt_flag[2]; > char c_compute_flag[2]; > char c_stop_flag[2]; > char c_xflag[2]; > char c_MS_flag[2]; > char c_mmap_mix[2]; > char c_w_traj_flag[2]; > char c_r_traj_flag[2]; > char c_direct_flag[2]; > char c_cpuutilflag[2]; > char c_stride[10]; > char c_rest_val[10]; > char c_purge[10]; > char c_fetchon[10]; > char c_multiplier[10]; > char c_share_file[10]; > char c_file_lock[10]; > char c_rec_lock[10]; > char c_client_number[20]; > char c_command[20]; > char c_testnum[20]; > char c_no_unlink[20]; > char c_pattern[20]; > char c_version[20]; > char c_base_time[20]; > char c_num_child[20]; > char c_pct_read[6]; > char c_advise_op[4]; > char c_advise_flag[4]; > char c_restf[4]; > char c_depth[20]; > char c_child_flag[40]; > char c_delay[80]; > char c_numrecs64[80]; > char c_reclen[80]; > char c_delay_start[80]; > char c_compute_time[80]; >}; > > > > > > >struct master_command { > char m_host_name[128]; > char m_client_name[128]; > char m_stop_flag; > int m_client_number; > int m_child_port; > int m_child_async_port; > int m_command; > int m_testnum; > int m_version; > float m_throughput; > float m_cputime; > float m_walltime; > float m_actual; > long long m_child_flag; >}; > > > > > > > >struct master_neutral_command { > char m_host_name[128]; > char m_client_name[128]; > char m_client_number[20]; > char m_stop_flag[4]; > char m_child_port[20]; > char m_child_async_port[20]; > char m_command[20]; > char m_testnum[20]; > char m_version[20]; > char m_throughput[80]; > char m_cputime[80]; > char m_walltime[80]; > char m_actual[80]; > char m_child_flag[80]; >}; ># 847 "iozone.c" >char *initfile(); >void mmap_end(); >void auto_test(); >void show_help(); >static double time_so_far(); > >static double utime_so_far(); >static double stime_so_far(); >static double clk_tck(); >static double cputime_so_far(); > > > >static double time_so_far1(); >void get_resolution(); >void get_rusage_resolution(); >void signal_handler(); >void begin(); >void fetchit(); >void purgeit(); >void throughput_test(); >void multi_throughput_test(); >void prepage(); > >float do_compute(float); > > > >void write_perf_test(); >void fwrite_perf_test(); >void fread_perf_test(); >void read_perf_test(); >void mix_perf_test(); >void random_perf_test(); >void reverse_perf_test(); >void rewriterec_perf_test(); >void read_stride_perf_test(); > >void pread_perf_test(); >void pwrite_perf_test(); > > > > > >void store_dvalue(); >void dump_excel(); >void dump_throughput(); >int sp_start_child_send(); >int sp_start_master_listen(); > > >ssize_t pwrite64(); >ssize_t pread64(); > > > > > > >void my_nap(); >int thread_exit(); > >size_t async_write(); >void async_release(); >int async_read(); >int async_read_no_copy(); >size_t async_write_no_copy(); >void end_async(); >void async_init(); > >void do_float(); >int create_xls(); >void close_xls(); >void do_label(); >int mylockf(int, int, int); >int mylockr(int,int, int, off64_t, off64_t); >int rand(void); >void srand(unsigned int); >int get_client_info(void); >void exit(int); >void find_remote_shell(char *); >void takeoff_cache(); >void del_cache(); >void fill_area(long long *, long long *, long long); >void fill_buffer(char *,long long ,long long ,char, long long ); >void store_value(off64_t); >void store_times(double, double); >static double cpu_util(double, double); >void dump_cputimes(void); >void purge_buffer_cache(void); >char *alloc_mem(long long,int); >void *(thread_rwrite_test)(void *); >void *(thread_write_test)(void *); >void *(thread_read_test)(void*); > >void *(thread_pread_test)(void*); >void *(thread_pwrite_test)(void*); > >void *(thread_cleanup_test)(void*); >void *(thread_cleanup_quick)(void*); >void *(thread_ranread_test)(void *); >void *(thread_mix_test)(void *); >void *(thread_ranwrite_test)(void *); >void *(thread_rread_test)(void *); >void *(thread_reverse_read_test)(void *); >void *(thread_stride_read_test)(void *); >void *(thread_set_base)(void *); >void *(thread_join)(long long, void *); >void disrupt(int); >long long get_traj(FILE *, long long *, float *, long); >void create_temp(off64_t, long long ); >FILE *open_w_traj(void); >FILE *open_r_traj(void); >void traj_vers(void); >void r_traj_size(void); >long long w_traj_size(void); >void init_file_sizes(); >off64_t get_next_file_size(off64_t); >void add_file_size(off64_t); >void init_file_sizes( off64_t, off64_t); >off64_t get_next_record_size(off64_t); >void add_record_size(off64_t); >void init_record_sizes( off64_t, off64_t); >void del_record_sizes( void ); >void do_speed_check(int); ># 1059 "iozone.c" >void (*func[])() = { > write_perf_test, > read_perf_test, > random_perf_test, > reverse_perf_test, > rewriterec_perf_test, > read_stride_perf_test, > fwrite_perf_test, > fread_perf_test, > mix_perf_test > > , > pwrite_perf_test, > pread_perf_test > > > > > > > }; ># 1095 "iozone.c" >char *test_output[] = {" ", > " ", > " ", > " ", > " ", > " ", > " ", > " ", > "", > " ", > " ", > " \n" }; >long long test_soutput[] = {2,2,2,1,1,1,2,2,2,2,2,2}; ># 1124 "iozone.c" >__volatile__ struct child_stats *shmaddr; >double totaltime,total_time, temp_time ,total_kilos; >off64_t report_array[100][512]; >double report_darray[100][256]; >double time_res,cputime_res; >long long throughput_array[100]; >short current_x, current_y; >long long max_x, max_y; >unsigned long long goodkilos; >off64_t kilobytes64 = (off64_t)512; >long long goodrecl; >off64_t offset = 0; >off64_t offset64 = 0; >off64_t filebytes64; >off64_t r_range[100]; >off64_t s_range[100]; >int r_count,s_count; >char *barray[256]; >char *haveshm; >extern int optind; >long long onetime, auto_mode, sfd, multi_buffer; >int fd; >int sp_msfd,sp_mrfd,sp_csfd,sp_crfd; >int begin_proc,num_processors,ioz_processor_bind; >long long res_prob,rec_prob; >char silent,read_sync; >char master_iozone, client_iozone,distributed; >int bif_fd,s_count; >int bif_row,bif_column; >char aflag, Eflag, hflag, Rflag, rflag, sflag; >char diag_v,sent_stop; >char bif_flag; >int rlocking; >int share_file; >char gflag,nflag; >char yflag,qflag; > > > >char *build_name = "linux"; > >char trflag; >char cpuutilflag; >long base_time; >long long mint, maxt; >long long w_traj_ops, r_traj_ops, w_traj_fsize,r_traj_fsize; >long long r_traj_ops_completed,r_traj_bytes_completed; >long long w_traj_ops_completed,w_traj_bytes_completed; >int w_traj_items, r_traj_items; >char fflag, Uflag,uflag,lflag,include_tflag; >struct runtime runtimes [100] [512]; >long long include_test[50]; >long long include_mask; >char RWONLYflag, NOCROSSflag; >char mfflag; >long long status, x, y, childids[256 +1], myid, num_child; >int pct_read,speed_code; > >pthread_t p_childids[256 +1]; > >off64_t next64; >char wol_opened, rol_opened; >FILE *wqfd,*rwqfd,*rqfd,*rrqfd; > >extern char *optarg; > >long long ret; > > > >struct size_entry { > struct size_entry *next; > off64_t size; >}; >struct size_entry *size_list=0; >struct size_entry *rec_size_list=0; >off64_t maximum_file_size; >off64_t minimum_file_size; > >char bif_filename [1000]; >char filename [1000]; >char mountname [1000]; >char dummyfile [256][1000]; >char dummyfile1 [1000]; >char *filearray[256]; >char tfile[] = "iozone"; >char *buffer, *mbuffer,*mainbuffer; >FILE *pi,*r_traj_fd,*w_traj_fd; >__volatile__ char *pbuffer; >char *default_filename="iozone.tmp"; >__volatile__ char stoptime; >char Cflag; >char use_thread = 0; >long long debug1=0; >long long debug=0; >unsigned long cache_size=( 1024 * 1024 ); >unsigned long cache_line_size=32; >long long *pstatus; >off64_t min_file_size = 64; >off64_t max_file_size = (1024*512); >long long min_rec_size = 4096; >long long max_rec_size = ((16*1024*1024)); >long long orig_min_rec_size = 4096; >long long orig_max_rec_size = ((16*1024*1024)); >long long xover = (16*1024); >char *throughput_tests[] = {"Initial write","Rewrite","Read","Re-read", > "Reverse Read","Stride read","Random read","Random mix","Random write","Pwrite","Pread"}; >char command_line[1024] = "\0"; > >double sc_clk_tck; > > >int argcsave; >char **argvsave; >char splash[80][80]; >int splash_line; >char client_filename[256]; >char remote_shell[256]; ># 1290 "iozone.c" >int c_port,a_port; >int child_port; >int child_async_port; >int client_listen_pid; >int master_join_count; >int l_sock,s_sock,l_async_sock; >char master_rcv_buf[4096]; >int master_listen_pid; >char master_send_buf[4096]; >char child_rcv_buf[4096]; >char child_async_rcv_buf[4096]; >char child_send_buf[4096]; >int child_send_socket; >int child_listen_socket; >int child_listen_socket_async; >int master_send_socket; >int master_send_sockets[256]; >int master_send_async_sockets[256]; >int master_listen_port; >int master_listen_socket; >int clients_found; >FILE *newstdin, *newstdout, *newstderr; >char toutput[20][20]; >int toutputindex; >int cdebug = 0; >int mdebug = 0; >int aggflag; >struct sockaddr_in child_sync_sock, child_async_sock; > > > > >int proto_version = 14; > > > > > > >char controlling_host_name[256]; >struct child_ident { > char child_name[100]; > char workdir[256]; > char execute_path[256]; > int state; > int child_number; > int child_port; > int child_async_port; > int master_socket_num; > int master_async_socket_num; >}child_idents[256]; >char write_traj_filename [1000]; >char read_traj_filename [1000]; >char oflag,jflag,k_flag,h_flag,mflag,pflag; >char noretest; >char async_flag,stride_flag,mmapflag,mmapasflag,mmapssflag,mmapnsflag,mmap_mix; >char verify = 1; >int restf; >char sverify = 1; >char odsync = 0; >char Q_flag,OPS_flag; >char no_copy_flag,include_close,include_flush; >char disrupt_flag,compute_flag,xflag; >int no_unlink = 0; >int r_traj_flag,w_traj_flag; >char MS_flag; >int advise_op,advise_flag; >int direct_flag; >int current_client_number; >long long chid; >int file_lock; >unsigned int pattern; >long long stride = 17; >long long delay,purge,fetchon; >off64_t numrecs64 = (off64_t)(512*1024)/1024; >long long reclen = 1024; >long long delay_start,depth; >__volatile__ char *stop_flag; >float compute_time; >int multiplier = 2; >long long rest_val; ># 1382 "iozone.c" >void child_send(); >int start_child_send(); >int start_child_listen(); >int start_child_listen_async(); >void start_child_listen_loop(); >void child_listen(); >void child_listen_async(); >void stop_child_send(); >void stop_child_listen(); >void cleanup_comm(); >void master_send(); >int start_master_send(); >int start_master_listen(); >void master_listen(); >void stop_master_send(); >void stop_master_listen(); >long long start_child_proc(); >int parse_client_line(); >void wait_dist_join(); >void tell_children_begin(); >void start_master_listen_loop(); >void wait_for_master_go(); >void tell_master_ready(); >void stop_master_listen_loop(); >void tell_master_stats(); >void become_client(); >int pick_client(); >long long start_child_proc(); >int start_master_send(); >void child_listen(); >int start_child_listen(); >void stop_master_send(); >void stop_master_listen(); >void stop_child_send(); >void stop_child_listen(); >int start_child_send(); >void master_send(); >void child_send(); >void master_listen(); >int start_master_listen(); >void child_remove_files(); >void terminate_child_async(); >void distribute_stop(); >void send_stop(); >void cleanup_children(); ># 1435 "iozone.c" >int >main(argc,argv) >int argc; >char **argv; >{ > > long long fileindx,i,tval; > long long ind; > int ret; > FILE *pi; > char reply[100]; > unsigned char inp_pat; > time_t time_run; > char *port,*m,*subarg; > int num_child1; > int cret; > int anwser,bind_cpu; > > anwser=bind_cpu=0; > > setvbuf( stdout, ((void *)0), 2, (size_t) ((void *)0) ); > setvbuf( stderr, ((void *)0), 2, (size_t) ((void *)0) ); > > > gethostname(controlling_host_name,256); > > > > > page_size=getpagesize(); > > > > > sc_clk_tck = clk_tck(); > > for(ind=0;ind<256;ind++) > filearray[ind]=(char *)tfile; > > base_time=(long)time_so_far(); > myid=(long long)getpid(); > get_resolution(); > time_run = time(0); > > > > > > sprintf(splash[splash_line++],"\tIozone: Performance Test of File I/O\n"); > sprintf(splash[splash_line++],"\t%s\n\t%s\n", " Version $Revision: 3.218 $","\tCompiled for 32 bit mode."); > sprintf(splash[splash_line++],"\t\tBuild: %s \n\n",build_name); > sprintf(splash[splash_line++],"\tContributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins\n"); > sprintf(splash[splash_line++],"\t Al Slater, Scott Rhine, Mike Wisner, Ken Goss\n"); > sprintf(splash[splash_line++],"\t Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,\n"); > sprintf(splash[splash_line++],"\t Randy Dunlap, Mark Montague, Dan Million, \n"); > sprintf(splash[splash_line++],"\t Jean-Marc Zucconi, Jeff Blomberg,\n"); > sprintf(splash[splash_line++],"\t Erik Habbinga, Kris Strecker.\n\n"); > sprintf(splash[splash_line++],"\tRun began: %s\n",ctime(&time_run)); > argcsave=argc; > argvsave=argv; > > signal(2, signal_handler); > signal(15, signal_handler); > > > > > > > buffer = (char *) alloc_mem((long long)((16*1024*1024) + (2 * cache_size)),(int)0); > if(buffer == 0) { > perror("Memory allocation failed:"); > exit(1); > } > > > > > > buffer = (char *) ((long)(buffer + cache_size ) & > ~((long)cache_size-1)); > > mainbuffer = buffer; > fetchon++; > strcpy(filename,default_filename); > sprintf(dummyfile[0],"%s.DUMMY",default_filename); > if(argc <=1){ > printf("\tUsage: For usage information type iozone -h \n\n"); > exit(0); > } > auto_mode = 0; > inp_pat = 0xA5; > > pattern = ((inp_pat << 24) | (inp_pat << 16) | (inp_pat << 8) | inp_pat); > > > > > while((cret = getopt(argc,argv,"ZQNIBDGCTOMREWovAxamwphcezKJ:j:k:V:r:t:s:f:F:d:l:u:U:S:L:H:+:P:i:b:X:Y:g:n:y:q: ")) != (-1)){ > switch(cret){ > case 'k': > depth = (long long)(atoi(optarg)); > if(depth <0) > depth=0; > > > > > > > > sprintf(splash[splash_line++],"\tPOSIX Async I/O (no bcopy). Depth %lld \n",depth); > > no_copy_flag=1; > async_flag++; > k_flag++; > break; > case 'T': > > use_thread++; > > > > > break; > case 'H': > h_flag++; > depth = (long long)(atoi(optarg)); > if(depth <0) > depth=0; ># 1576 "iozone.c" > sprintf(splash[splash_line++],"\tPOSIX async I/O (with bcopy). Depth %lld\n",depth); > > async_flag++; > break; > case 'I': > > > > > > > > direct_flag++; > sprintf(splash[splash_line++],"\tO_DIRECT feature enabled\n"); > break; > > > > > > > > case 'B': > sprintf(splash[splash_line++],"\tUsing mmap files\n"); > mmapflag++; > mmapnsflag++; > break; > case 'D': > sprintf(splash[splash_line++],"\tUsing msync(MS_ASYNC) on mmap files\n"); > mmapflag++; > mmapasflag++; > mmapnsflag=0; > break; > case 'G': > sprintf(splash[splash_line++],"\tUsing msync(MS_SYNC) on mmap files\n"); > mmapssflag++; > mmapnsflag=0; > break; > case 'C': > Cflag++; > break; > case 'Q': > sprintf(splash[splash_line++],"\tOffset/latency files enabled.\n"); > Q_flag++; > break; > case 'x': > sprintf(splash[splash_line++],"\tStonewall disabled\n"); > xflag++; > break; > > case 'a': > fetchon=1; > purge=0; > multi_buffer=0; > auto_mode = 1; > aflag++; > sprintf(splash[splash_line++],"\tAuto Mode\n"); > break; > case 'c': > include_close++; > sprintf(splash[splash_line++],"\tInclude close in write timing\n"); > break; > case 'e': > include_flush++; > sprintf(splash[splash_line++],"\tInclude fsync in write timing\n"); > break; > case 'A': > fetchon=1; > purge=0; > multi_buffer=0; > auto_mode = 1; > aflag++; > sprintf(splash[splash_line++],"\tAuto Mode 2. This option is obsolete. Use -az -i0 -i1 \n"); > RWONLYflag++; > NOCROSSflag++; > include_tflag++; > include_test[0]++; > include_test[1]++; > break; > case 's': > > > > sscanf(optarg,"%lld",&kilobytes64); > > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > ; > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > kilobytes64 = kilobytes64 * 1024; > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > kilobytes64 = kilobytes64 *1024 * 1024; > } > if(kilobytes64 <= 0) > kilobytes64=512; > > s_range[s_count++]=kilobytes64; > max_file_size = (off64_t)s_range[s_count-1]; > min_file_size = (off64_t)s_range[0]; > > > > > sprintf(splash[splash_line++],"\tFile size set to %lld KB\n",kilobytes64); > > sflag++; > break; > case 'l': > mint = (long long)(atoi(optarg)); > if(mint <= 0) > { > mint=1; > num_child=1; > }else > num_child=mint; > if(mint > (unsigned long long)256){ > printf("Invalid options: maximum streams for "); > printf("throughput is MAXSTREAMS\n"); > exit(4); > } > lflag++; > trflag++; > if(Uflag) > { > printf("Can not run throughput tests with unmount & remounts.\n"); > exit(5); > } > break; > case 'u': > maxt = (long long)(atoi(optarg)); > if(maxt <= 0) > maxt=1; > if(maxt > 256){ > printf("Invalid options: maximum streams for "); > printf("throughput is MAXSTREAMS\n"); > exit(6); > } > uflag++; > trflag++; > if(Uflag) > { > printf("Can not run throughput tests with unmount & remounts.\n"); > exit(7); > } > break; > case 'm': > fetchon=0; > multi_buffer=1; > mflag++; > mbuffer = (char *) alloc_mem((long long)(16*1024*1024),(int)0); > if(mbuffer == 0) { > perror("Memory allocation failed:"); > exit(8); > } > sprintf(splash[splash_line++],"\tMulti_buffer. Work area %d bytes\n", > (16*1024*1024)); > break; > case 'M': > bzero(reply,sizeof(reply)); > pi=popen("uname -a", "r"); > if(pi == (FILE *)0) > { > sprintf(splash[splash_line++],"\n\tError using popen() on uname\n"); > sprintf(splash[splash_line++],"\t-M option suppressed.\n"); > } > else > { > fread(reply,100 -1,1,pi); > pclose(pi); > m=reply; > while(*m) > { > if(*m=='\n') > *m=0; > else > m++; > } > sprintf(splash[splash_line++],"\n\tMachine = %s\n",reply); > } > break; > > case 'P': ># 1773 "iozone.c" > sprintf(splash[splash_line++],"\tProcessor binding not available in this version\n"); > > > break; > case 'p': > sprintf(splash[splash_line++],"\tPurge Mode On\n"); > fetchon=0; > pflag++; > purge=1; > break; > case 'h': > hflag++; > show_help(); > exit(0); > break; > case 'E': > Eflag++; > break; > case 'R': > Rflag++; > sprintf(splash[splash_line++],"\tExcel chart generation enabled\n"); > break; > case 'o': > sprintf(splash[splash_line++],"\tSYNC Mode. \n"); > oflag++; > break; > case 'O': > sprintf(splash[splash_line++],"\tOPS Mode. Output is in operations per second.\n"); > OPS_flag++; > break; > case 'N': > sprintf(splash[splash_line++],"\tMicroseconds/op Mode. Output is in microseconds per operation.\n"); > MS_flag++; > break; > case 'V': > sverify=0; > inp_pat = (char)(atoi(optarg)); > if(inp_pat == 0) > inp_pat = 0xA5; > pattern = ((inp_pat << 24) | (inp_pat << 16) | (inp_pat << 8) > | inp_pat); > verify++; > sprintf(splash[splash_line++],"\tVerify Mode. Pattern %x\n",pattern); > sprintf(splash[splash_line++],"\tPerformance measurements are invalid in this mode.\n"); > break; > case 'S': > cache_size = (long)(atoi(optarg)*1024); > if(cache_size == 0) > cache_size = ( 1024 * 1024 ); > break; > case 'L': > cache_line_size = (long)(atoi(optarg)); > if(cache_line_size == 0) > cache_line_size = 32; > break; > case 'f': > if(mfflag) { > printf("invalid options: -f and -F are mutually exclusive\n"); > exit(10); > } > fflag++; > strcpy(filename,optarg); > sprintf(dummyfile[0],"%s.DUMMY",optarg); > break; > case 'b': > Rflag++; > bif_flag++; > strcpy(bif_filename,optarg); > break; > case 'F': > mfflag++; > if(fflag) { > printf("invalid options: -f and -F are mutually exclusive\n"); > exit(11); > } > if(!trflag) { > printf("invalid options: must specify -t N before -F\n"); > exit(12); > } > optind--; > for(fileindx=0;fileindx<maxt;fileindx++) { > filearray[fileindx]=argv[optind++]; > if(optind > argc) { > > > > printf("invalid options: not enough filenames for %lld streams\n",num_child); > > exit(13); > } > } > break; > case 'r': > rflag++; > reclen = ((long long)(atoi(optarg))*1024); > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > reclen = (long long)(1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > reclen = (long long)(1024 * 1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > reclen = (long long)(1024 * 1024 * 1024 *(long long)atoi(optarg)); > } > if(reclen <= 0) > reclen=(long long)4096; > > r_range[r_count++]=reclen; > max_rec_size = (off64_t)r_range[r_count-1]; > min_rec_size = (off64_t)r_range[0]; > > > > sprintf(splash[splash_line++],"\tRecord Size %lld KB\n",reclen/1024); > > break; > case 'J': > compute_time = (float)(atoi(optarg)); > compute_time=compute_time/1000; > if(compute_time < (float)0) > compute_time=(float)0; > else > compute_flag=1; > jflag++; > break; > case 'j': > stride = (long long)(atoi(optarg)); > if(stride < 0) > stride=0; > stride_flag=1; > break; > case 't': > num_child1=(atoi(optarg)); > num_child = (long long)num_child1; > if(num_child > (long long)256) { > printf("invalid options: maximum streams for throughput is MAXSTREAMS\n"); > > > > printf("Numchild %lld %s\n",num_child,optarg); > > exit(14); > } > if(num_child <= 0) > num_child = 8; > if(num_child == 0) > num_child=1; > mint=maxt=num_child; > trflag++; > if(Uflag) > { > printf("Can not run throughput tests with unmount & remounts.\n"); > exit(15); > } > break; > case 'd': > delay_start = (long long)(atoi(optarg)); > if(delay_start < 0) > delay_start=0; > break; > case 'i': > tval=(long long)(atoi(optarg)); > if(tval < 0) tval=0; > > > > > > > > if(tval > sizeof(func)/sizeof(char *)) > { > tval=0; > sprintf(splash[splash_line++],"\tSelected test not available on the version.\n"); > } > include_test[tval]++; > include_tflag++; > break; > case 'v': > for(ind=0; strlen(head1[ind]); ind++) > { > printf("%s\n", head1[ind]); > } > exit(0); > break; > case 'U': > Uflag++; > strcpy(mountname,optarg); > if(trflag) > { > printf("Can not run throughput tests with unmount & remounts.\n"); > exit(16); > } > break; > case 'w': > sprintf(splash[splash_line++],"\tSetting no_unlink\n"); > no_unlink = 1; > break; > case 'Z': > sprintf(splash[splash_line++],"\tEnable mmap & file I/O mixing.\n"); > mmap_mix = 1; > break; > case 'W': > file_lock=1; > sprintf(splash[splash_line++],"\tLock file when reading/writing.\n"); > break; > case 'K': > disrupt_flag=1; > sprintf(splash[splash_line++],"\tDisrupted read patterns selected.\n"); > break; > case 'X': > compute_flag=1; > sverify=2; > w_traj_flag=1; > strcpy(write_traj_filename,optarg); > traj_vers(); > w_traj_size(); > sprintf(splash[splash_line++],"\tUsing write telemetry file \"%s\"\n", > write_traj_filename); > w_traj_fd=open_w_traj(); > if(w_traj_fd == (FILE *)0) > exit(200); > break; > case 'Y': > compute_flag=1; > sverify=2; > r_traj_flag=1; > strcpy(read_traj_filename,optarg); > sprintf(splash[splash_line++],"\tUsing read telemetry file \"%s\"\n", > read_traj_filename); > traj_vers(); > r_traj_size(); > r_traj_fd=open_r_traj(); > if(r_traj_fd == (FILE*) 0) > exit(200); > break; > case 'n': > nflag=1; > minimum_file_size = (off64_t)atoi(optarg); > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > ; > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > minimum_file_size = (long long)(1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > minimum_file_size = (long long)(1024 * 1024 * (long long)atoi(optarg)); > } > if(minimum_file_size < 4096/1024) > minimum_file_size=(off64_t)(4096/1024); > > > > sprintf(splash[splash_line++],"\tUsing minimum file size of %lld kilobytes.\n",minimum_file_size); > > break; > case 'g': > gflag=1; > maximum_file_size = (off64_t)atoi(optarg); > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > ; > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > maximum_file_size = (long long)(1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > maximum_file_size = (long long)(1024 * 1024 * (long long)atoi(optarg)); > } > if(maximum_file_size < 4096/1024) > maximum_file_size=(off64_t)(4096/1024); > > > > sprintf(splash[splash_line++],"\tUsing maximum file size of %lld kilobytes.\n",maximum_file_size); > > break; > case 'z': > sprintf(splash[splash_line++],"\tCross over of record size disabled.\n"); > NOCROSSflag=1; > break; > case 'y': > yflag=1; > min_rec_size = ((long long)(atoi(optarg))*1024); > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > min_rec_size = (long long)(1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > min_rec_size = (long long)(1024 * 1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > min_rec_size = (long long)(1024 * 1024 * 1024 *(long long)atoi(optarg)); > } > if(min_rec_size <= 0) > min_rec_size=(long long)4096; > > > > sprintf(splash[splash_line++],"\tUsing Minimum Record Size %lld KB\n", min_rec_size/1024); > > break; > case 'q': > qflag=1; > max_rec_size = ((long long)(atoi(optarg))*1024); > if(optarg[strlen(optarg)-1]=='k' || > optarg[strlen(optarg)-1]=='K'){ > max_rec_size = (long long)(1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='m' || > optarg[strlen(optarg)-1]=='M'){ > max_rec_size = (long long)(1024 * 1024 * atoi(optarg)); > } > if(optarg[strlen(optarg)-1]=='g' || > optarg[strlen(optarg)-1]=='G'){ > max_rec_size = (long long)(1024 * 1024 * 1024 *(long long)atoi(optarg)); > } > if(max_rec_size <= 0) > min_rec_size=(long long)((16*1024*1024)); > if(max_rec_size > (16*1024*1024)) { > > > > > printf("Error: maximum record size %lld KB is greater than maximum buffer size %lld KB\n ", > (long long)(max_rec_size/1024LL), (long long)(16*1024*1024)/1024LL); > > exit(23); > } > > > > sprintf(splash[splash_line++],"\tUsing Maximum Record Size %lld KB\n", max_rec_size/1024); > > break; ># 2126 "iozone.c" > case '+': > > switch (*((char *)optarg)) > { > case 'a': > subarg=argv[optind++]; > > > break; > case 'b': > break; > case 'c': > > subarg=argv[optind++]; > if(subarg==(char *)0) > { > printf("-+c takes an operand !!\n"); > exit(200); > } > strcpy(controlling_host_name,subarg); > distributed=1; > client_iozone=1; > master_iozone=0; > break; > case 'm': > > subarg=argv[optind++]; > if(subarg==(char *)0) > { > printf("-+m takes an operand. ( filename )\n"); > exit(201); > } > strcpy(client_filename,subarg); > ret=get_client_info(); > if(ret <= 0) > { > printf("Error reading client file\n"); > exit(178); > } > clients_found=ret; > distributed=1; > master_iozone=1; > client_iozone=0; > sprintf(splash[splash_line++],"\tNetwork distribution mode enabled.\n"); > break; > case 'u': > cpuutilflag = 1; > get_rusage_resolution(); > sprintf(splash[splash_line++],"\tCPU utilization Resolution = %5.3f seconds.\n",cputime_res); > sprintf(splash[splash_line++],"\tCPU utilization Excel chart enabled\n"); > break; > case 's': > > silent=1; > break; > case 'd': > sprintf(splash[splash_line++],"\t>>> I/O Diagnostic mode enabled. <<<\n"); > sprintf(splash[splash_line++],"\tPerformance measurements are invalid in this mode.\n"); > diag_v=1; > sverify=0; > break; > case 'x': > subarg=argv[optind++]; > if(subarg==(char *)0) > { > printf("-+c takes an operand !!\n"); > exit(200); > } > multiplier = atoi(subarg); > if(multiplier <=1) > multiplier = 2; > break; > case 'p': > subarg=argv[optind++]; > if(subarg==(char *)0) > { > printf("-+p takes an operand !!\n"); > exit(200); > } > pct_read = atoi(subarg); > if(pct_read < 1) > pct_read = 1; > if(pct_read >=100) > pct_read = 100; > sprintf(splash[splash_line++],"\tPercent read in mix test is %d\n",pct_read); > break; > case 't': > speed_code=1; > break; > > case 'r': > read_sync=1; > sprintf(splash[splash_line++],"\tRead & Write sync mode active.\n"); > break; > > > case 'A': > subarg=argv[optind++]; > advise_flag=1; > advise_op=atoi(subarg); > sprintf(splash[splash_line++],"\tMadvise enabled: %d\n",advise_op); > break; > > case 'n': > noretest = 1; > sprintf(splash[splash_line++],"\tNo retest option selected\n"); > break; > case 'k': > aggflag=1; > break; > case 'q': > subarg=argv[optind++]; > if(subarg==(char *)0) > { > printf("-+q takes an operand !!\n"); > exit(200); > } > rest_val = (long long)atoi(subarg); > if(rest_val <=0) > rest_val = 0; > restf=1; > sprintf(splash[splash_line++],"\tDelay %d seconds between tests enabled.\n",atoi(subarg)); > break; > > case 'D': > sprintf(splash[splash_line++],"\t>>> O_DSYNC mode enabled. <<<\n"); > odsync=1; > break; > > case 'l': > sprintf(splash[splash_line++],"\t>>> Record locking mode enabled. <<<\n"); > rlocking=1; > break; > case 'L': > sprintf(splash[splash_line++],"\t>>> Record locking, shared file mode enabled. <<<\n"); > share_file=1; > rlocking=1; > break; > default: > printf("Unsupported Plus option -> %s <-\n",optarg); > exit(0); > break; > } > break; > } > } > if(speed_code) > { > do_speed_check(client_iozone); > exit(0); > } > if(r_count > 1) > { > aflag=1; > rflag=0; > NOCROSSflag=1; > } > if(s_count > 1) > { > aflag=1; > sflag=0; > NOCROSSflag=1; > } > > > > for(i=0;i<splash_line;i++) > if(!silent) printf("%s",splash[i]); > > > > record_command_line(argcsave, argvsave); > > if(pflag) > { > pbuffer = (char *) alloc_mem((long long)(3 * cache_size),(int)0); > if(pbuffer == 0) { > perror("Memory allocation failed:"); > exit(9); > } > > > > > > pbuffer = (char *) > (((long)pbuffer + (long)cache_size ) > & ~((long)cache_size-1)); > > } > if(distributed && master_iozone) > { > if(maxt > clients_found) > { > printf("You can not specify more threads/processes than you have in the client file list\n"); > exit(202); > } > } > > if(!OPS_flag && !MS_flag) > { > if(!silent) printf("\tOutput is in Kbytes/sec\n"); > } > if (min_rec_size > max_rec_size) { > > > > > printf("Error: minimum record size %lld KB is greater than maximum record size %lld KB\n ", > min_rec_size/1024, max_rec_size/1024); > > exit(23); > } > orig_min_rec_size=min_rec_size; > orig_max_rec_size=max_rec_size; > > > > if(compute_flag && jflag && !(r_traj_flag || w_traj_flag)) > if(!silent) printf("\tCompute time %f seconds for reads and writes.\n",compute_time); > > > > if(compute_flag && r_traj_flag && !w_traj_flag) > { > if(r_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for reads.\n"); > } > else > { > if(jflag) > if(!silent) printf("\tCompute time %f seconds for reads.\n",compute_time); > } > if(jflag) > if(!silent) printf("\tCompute time %f seconds for writes.\n",compute_time); > } > > > > if(compute_flag && !r_traj_flag && w_traj_flag) > { > if(w_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for writes.\n"); > } > else > { > if(jflag) > if(!silent) printf("\tCompute time %f seconds for writes.\n",compute_time); > } > if(jflag) > if(!silent) printf("\tCompute time %f seconds for reads.\n",compute_time); > } > if(compute_flag && r_traj_flag && w_traj_flag && jflag) > { > if(r_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for reads.\n"); > } > else > { > if(!silent) printf("\tCompute time %f seconds for reads.\n",compute_time); > } > if(w_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for writes.\n"); > } > else > { > if(!silent) printf("\tCompute time %f seconds for writes.\n",compute_time); > } > } > if(compute_flag && r_traj_flag && w_traj_flag && !jflag) > { > if(r_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for reads.\n"); > } > else > { > if(!silent) printf("\tNo compute time for reads.\n"); > } > > if(w_traj_items==3) > { > if(!silent) printf("\tCompute time from telemetry files for writes.\n"); > } > else > { > if(!silent) printf("\tNo compute time for writes.\n"); > } > } > > > if(w_traj_flag || r_traj_flag) > { > for(i=2;i<sizeof(func)/sizeof(char *);i++) > include_test[i] = 0; > } > if(r_traj_flag) > { > if(include_test[1] == 0) > { > include_test[0]=1; > include_test[1]=1; > include_tflag=1; > } > } > if(w_traj_flag) > { > if(include_test[0] == 0) > { > include_test[0]=1; > include_tflag=1; > } > } > if(w_traj_flag && w_traj_fsize != 0) > kilobytes64=w_traj_fsize/1024; > if(r_traj_flag && r_traj_fsize != 0) > kilobytes64=r_traj_fsize/1024; > > if( sverify==0 && (w_traj_flag || r_traj_flag)) > { > printf("\n\tFull verification not supported in telemetry mode.\n\n"); > exit(17); > } > ; > if(disrupt_flag &&(w_traj_flag || r_traj_flag) ) > { > printf("\n\tDisrupt not supported in telemetry mode.\n\n"); > exit(17); > } > if(aflag &&(w_traj_flag || r_traj_flag) ) > { > printf("\n\tAuto mode not supported in telemetry mode.\n"); > printf("\tTry: -i 0 -i 1 \n\n"); > exit(17); > } > if(sflag && w_traj_flag ) > { > printf("\n\tSize of file is determined by telemetry file.\n\n"); > exit(17); > } > if(rflag && w_traj_flag ) > { > printf("\n\tRecord size of file is determined by telemetry file.\n\n"); > exit(17); > } > if(stride_flag && (w_traj_flag || r_traj_flag)) > { > printf("\n\tStride size is determined by telemetry file.\n\n"); > exit(17); > } > if(trflag && MS_flag) > { > printf("\n\tMicrosecond mode not supported in throughput mode.\n\n"); > exit(17); > } > if (trflag > && (auto_mode || aflag || yflag || qflag || nflag || gflag)) > { > printf("\n\tCan not mix throughput mode and auto-mode flags.\n\n"); > exit(17); > } > if(async_flag && mmapflag) > { > printf("\n\tSorry ... Only mmap or async but not both\n\n"); > exit(18); > } > > > > > > > > if(include_tflag) > { > for(i=0;i<sizeof(func)/sizeof(char *);i++) > if(include_test[i]) > include_mask|=(long long)(1<<i); > > } > > if(h_flag && k_flag) > { > printf("\n\tCan not do both -H and -k\n"); > exit(20); > } > > if(!aflag && !rflag) > max_rec_size=min_rec_size; > > init_record_sizes(min_rec_size,max_rec_size); > if(!silent) printf("\tTime Resolution = %1.6f seconds.\n",time_res); > > > > > > if(!silent) printf("\tProcessor cache size set to %ld Kbytes.\n",cache_size/1024); > if(!silent) printf("\tProcessor cache line size set to %ld bytes.\n",cache_line_size); > if(!silent) printf("\tFile stride size set to %lld * record size.\n",stride); > > if(!rflag) > reclen=(long long)4096; > > if(uflag && !lflag) > num_child=mint = 1; > if(lflag && !uflag) > maxt = mint; > if(use_thread) > port="thread"; > else > port="process"; > if(lflag || uflag){ > > > > > if(!silent) printf("\tMin %s = %lld \n",port,mint); > if(!silent) printf("\tMax %s = %lld \n",port,maxt); > > } > if(trflag) > { > if(num_child > 1) > { > if(use_thread) > { > port="threads"; > } > else > { > port="processes"; > } > } > > > > > if(!silent) printf("\tThroughput test with %lld %s\n", num_child,port); > > } > numrecs64 = (long long)(kilobytes64*1024)/reclen; > if (reclen > (long long)(16*1024*1024)) { > > > > > printf("Error: Maximum record length is %lld bytes\n", > (long long)(16*1024*1024)); > > exit(21); > } > if (reclen < (long long)128) { > > > > > printf("Error: Minimum record length is %lld bytes\n", > (long long)128); > > exit(22); > } > if (reclen > (long long)(kilobytes64*1024)) { > > > > > printf("Error: record length %lld is greater than filesize %lld KB\n ", > reclen,kilobytes64); > > exit(23); > } > > if(verify ) > { > fill_buffer((char *)buffer,l_min(reclen,(long long)cache_size),(long long)pattern,(char)sverify,(long long)0); > if(pflag) > fill_buffer((char *)pbuffer,l_min(reclen,(long long)cache_size),(long long)pattern,(char)sverify,(long long)0); > if(mflag) > fill_buffer((char *)mbuffer,l_min(reclen,(long long)cache_size),(long long)pattern,(char)sverify,(long long)0); > } > else > { > bzero(buffer,(size_t)l_min(reclen,(long long)cache_size)); > } ># 2627 "iozone.c" > if(trflag){ > (void)multi_throughput_test(mint,maxt); > goto out; > } > if(trflag && (mint == maxt)){ > auto_mode=0; > throughput_test(); > goto out; > } > if (aflag) { > print_header(); > auto_test(); > goto out; > } > print_header(); > (void) begin(kilobytes64,reclen); >out: > if(r_traj_flag) > fclose(r_traj_fd); > if(w_traj_flag) > fclose(w_traj_fd); > if (!no_unlink) > unlink(dummyfile[0]); > if(!silent) printf("\niozone test complete.\n"); > if(res_prob) > { > printf("Timer resolution is poor. Some small transfers may have \n"); > printf("reported inaccurate results. Sizes %ld Kbytes and below.\n", > (long)(rec_prob/(long long)1024)); > } > > if(Rflag && !trflag){ > dump_excel(); > } > return(0); >} > > >void >record_command_line(int argc, char **argv) > > > > > > >{ > int ix, len = 0; > > > if(!silent) printf("\tCommand line used:"); > for (ix=0; ix < argc; ix++) { > if(!silent) printf(" %s", argv[ix]); > if ((len + strlen(argv[ix])) < sizeof(command_line)) { > strcat (command_line, argv[ix]); > strcat (command_line, " "); > len += strlen(argv[ix]) + 1; > } > else { > printf ("Command line too long to save completely.\n"); > break; > } > } > if(!silent) printf("\n"); >} > > > > > > > >void >begin(off64_t kilos64,long long reclength) > > > > > > >{ > long long num_tests,test_num,i,j; > long long data1[10], data2[10]; > num_tests = sizeof(func)/sizeof(char *); > > if(!Eflag) > { > > > > num_tests -= 2; > > if(mmapflag || async_flag) > { > num_tests -= 2; > } > } > else > { > if(mmapflag || async_flag) > > > > num_tests -= 4; > > } > > > > > > > > if(RWONLYflag) num_tests = 2; > sync(); > sync(); > kilobytes64=kilos64; > reclen=reclength; > numrecs64 = (kilobytes64*1024)/reclen; > store_value(kilobytes64); > if(r_traj_flag || w_traj_flag) > store_value((off64_t)0); > else > store_value((off64_t)(reclen/1024)); ># 2763 "iozone.c" > if(!silent) printf("%16lld",kilobytes64); > if(r_traj_flag || w_traj_flag) > { > if(!silent) printf("%8lld",(long long )0); > } > else > { > if(!silent) printf("%8lld",reclen/1024); > } > > if(include_tflag) > { > for(i=0;i<num_tests;i++) > { > if(include_mask & (long long)(1<<i)) > func[i](kilobytes64,reclen,&data1[i],&data2[i]); > else > { > if(!silent) printf("%s",test_output[i]); > fflush(stdout); > for(j=0;j<test_soutput[i];j++) > store_value((off64_t)0); > } > } > } > else > { > for(test_num=0;test_num < num_tests;test_num++) > { > func[test_num](kilobytes64,reclen,&data1[test_num],&data2[test_num]); > }; > } > if(!silent) printf("\n"); > if(!OPS_flag && !include_tflag){ > if(data1[1]!=0 && data2[1] != 0) > { > totaltime = data1[1] + data1[0]; > if (totaltime < 10) > { > goodkilos = (10/totaltime)*2*kilobytes64; > printf("\nThe test completed too quickly to give a good result\n"); > printf("You will get a more precise measure of this machine's\n"); > printf("performance by re-running iozone using the command:\n"); > > > > > printf("\n\tiozone %lld ", goodkilos); > printf("\t(i.e., file size = %lld kilobytes64)\n", goodkilos); > > } > } else { > goodrecl = reclen/2; > printf("\nI/O error during read. Try again with the command:\n"); > > > > > printf("\n\tiozone %lld %lld ", kilobytes64, goodrecl); > printf("\t(i.e. record size = %lld bytes)\n", goodrecl); > > } > } > if (!no_unlink) > unlink(filename); > > return ; >} > > > > > > >void show_help(void) > > > >{ > long long i; > if(!silent) printf("iozone: help mode\n\n"); > for(i=0; strlen(help[i]); i++) > { > if(!silent) printf("%s\n", help[i]); > } >} > > > > > > >void signal_handler(void) > > > >{ > long long i; > if(distributed) > { > if(master_iozone) > cleanup_children(); > } > if((long long)getpid()==myid) > { > if(!silent) printf("\niozone: interrupted\n\n"); > > if (!no_unlink) > unlink(filename); > for(i=1;i<num_child;i++) > unlink(dummyfile[i]); > if (!no_unlink) > unlink(dummyfile[0]); > > > if(Rflag && !trflag){ > dump_excel(); > } > if(Rflag && trflag){ > dump_throughput(); > } > > if(!silent) printf("exiting iozone\n\n"); > if(res_prob) > { > printf("Timer resolution is poor. Some small transfers may have \n"); > printf("reported inaccurate results. Sizes %ld Kbytes and below.\n", > (long)rec_prob/1024); > } > if(trflag && !use_thread) > for(i=0;i<num_child;i++) > kill((pid_t)childids[i],15); > if(r_traj_flag) > fclose(r_traj_fd); > if(w_traj_flag) > fclose(w_traj_fd); > } > if(sp_msfd) > close(sp_msfd); > if(sp_mrfd) > close(sp_mrfd); > exit(0); >} > > > > > > > >void >auto_test(void) > > > >{ > off64_t kilosi; > long long recszi,count1; > long long mult; > long long xx; ># 2939 "iozone.c" > if(gflag) > max_file_size = maximum_file_size; > if(nflag) > min_file_size = minimum_file_size; > > if(NOCROSSflag) xover = max_file_size; > > init_file_sizes(min_file_size, max_file_size); > del_record_sizes(); > orig_min_rec_size=min_rec_size; > orig_max_rec_size=max_rec_size; > init_record_sizes(min_rec_size, max_rec_size); > > for(kilosi=get_next_file_size((off64_t)0); kilosi>0; kilosi=get_next_file_size(kilosi)) > { > > > > > > > > if(!rflag && !sflag ) > if(kilosi > xover){ > min_rec_size = 65536; > mult = orig_min_rec_size/1024; > del_record_sizes(); > init_record_sizes(min_rec_size, max_rec_size); > > > > > > for(count1=min_rec_size; > (count1 != orig_min_rec_size) && ( > mult <= (kilosi*1024)) ; > count1=(count1>>1)) > { > current_x=0; > store_value((off64_t)kilosi); > store_value((off64_t)mult); > for(xx=0;xx<20;xx++) > store_value((off64_t)0); > mult=mult*2; > current_y++; > if(current_y>max_y) > max_y=current_y; > current_x=0; > } > } > > for (recszi=get_next_record_size((off64_t)0);recszi!=0;recszi=get_next_record_size(recszi)) > { > if(recszi > (kilosi*1024)) > break; > begin(kilosi, recszi ); > current_x=0; > current_y++; > } > } >} ># 3027 "iozone.c" >void >throughput_test(void) > > > > >{ > char *unit; > double starttime1 = 0; > double jstarttime = 0; > double jtime = 0; > double walltime = 0; > double cputime = 0; > char *port; > char getout; > long long throughsize = 512; > long long xx,xy,i; > long long xyz; > double ptotal; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > __volatile__ char *temp; > double min_throughput = 0; > double max_throughput = 0; > double avg_throughput = 0; > double min_xfer = 0; > > > toutputindex=0; > strcpy(&toutput[0][0],throughput_tests[0]); > ptotal=written_so_far=read_so_far=re_written_so_far=re_read_so_far=0 ; > > if(OPS_flag) > unit="ops"; > else > unit="KB"; > > if(!haveshm) > { > shmaddr=(struct child_stats *)alloc_mem((long long)((( sizeof(struct child_stats) * 256) )+4096 ),(int)1); > > > > if((long )shmaddr==(long)-1) > > { > printf("\nShared memory not working\n"); > exit(24); > } > haveshm=(char*)shmaddr; > } > else > shmaddr=(struct child_stats *)haveshm; > > if(use_thread) > stop_flag = &stoptime; > else > { > temp = (char *)&shmaddr[0]; > stop_flag = (char *)&temp[(long long)((( sizeof(struct child_stats) * 256) )+4096 )]-4; > } > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > child_stat->flag=0; > child_stat->actual=0; > child_stat->throughput=0; > child_stat->cputime=0; > child_stat->walltime=0; > } > *stop_flag = 0; > if(!sflag) > kilobytes64=throughsize; > if(!rflag) > reclen=(long long)4096; > if(aggflag) > kilobytes64=kilobytes64/num_child; > numrecs64 = (long long)(kilobytes64*1024)/reclen; > buffer=mainbuffer; > if(use_thread) > port="thread"; > else > port="process"; > if(w_traj_flag) > { > > > > > if(!silent) printf("\tEach %s writes a %lld Kbyte file in telemetry controlled records\n", > port,kilobytes64); > > } > else > { > > > > > if(!silent) printf("\tEach %s writes a %lld Kbyte file in %lld Kbyte records\n", > port,kilobytes64,reclen/1024); > > } > > if(fflag) > for(xx=0;xx<num_child;xx++) > filearray[xx] = filename; > myid = (long long)getpid(); > > > if(include_tflag) > if(!(include_mask & (long long)(1 << 0))) > { > store_dvalue( (double)0); > store_dvalue( (double)0); > toutputindex++; > goto next0; > } > > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(1,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > if(!use_thread) > kill((pid_t)childids[xy],15); > } > exit(25); > } > if(childids[xx]!=0 && debug1) > > > > printf("Parent starting slot %lld\n",xx); > > if( childids[xx] == 0 ){ > > > > thread_write_test((void *)(long)xx); > > }else { > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx], xx); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx], xx); > > if(!barray[xx]) > { > barray[xx]=(char *) alloc_mem((long long)((16*1024*1024)+cache_size),(int)0); > if(barray[xx] == 0) { > perror("Memory allocation failed:"); > exit(26); > } > barray[xx] =(char *)(((long)barray[xx] + cache_size ) & > ~(cache_size-1)); > } > > > > > childids[xx] = mythread_create(thread_write_test,(void*)(long)xx); > > if(childids[xx]==-1){ > printf("Thread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,15); > } > exit(27); > } > } > } > > if((long long)getpid() == myid) > { > prepage(buffer,reclen); > > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++) > { > if(delay_start!=0) > Poll((long long)delay_start); > > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag=2; > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > goto waitout; > } > >waitout: > getout=0; > if((long long)getpid() == myid) { > starttime1 = time_so_far(); > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *) &shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > > total_kilos=0; > ptotal=0; > walltime = 0.0; > cputime = 0.0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *) &shmaddr[xyz]; > total_kilos += child_stat->throughput; > ptotal += child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > > cputime += child_stat->cputime; > > > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *) &shmaddr[xyz]; > child_stat->flag = 0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %2lld initial writers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %2lld initial writers \t= %10.2f %s/sec\n",num_child,((double)(ptotal)/total_time),unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU Utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) > printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > > > > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > *stop_flag=0; > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > > > > > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > total_kilos=0; > toutputindex=1; > strcpy(&toutput[1][0],throughput_tests[1]); > if(noretest) > { > store_dvalue( (double)0); > goto next0; > } > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(2,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(28); > } > if(childids[xx] == 0){ > > > > thread_rwrite_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > > > > childids[xx] = mythread_create( thread_rwrite_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)myid,(long long)15); > } > exit(29); > } > } > } > > if((long long)myid == getpid()) > { > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++) > { > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > goto jump3; > } > >jump3: > getout=0; > if((long long)myid == getpid()){ > for( i = 0; i < num_child; i++){ > child_stat=(struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > > > total_kilos=0; > ptotal=0; > > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat=(struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > > > > > if (cputime < cputime_res) > cputime = 0.0; > } > > for(xyz=0;xyz<num_child;xyz++){ > child_stat=(struct child_stats *)&shmaddr[xyz]; > child_stat->flag = 0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %2lld rewriters \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %2lld rewriters \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > *stop_flag=0; > > > > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } >next0: > if(include_tflag) > if(!(include_mask & (long long)(1 << 1))) > goto next1; > > > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[2]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > total_kilos=0; > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket=start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(3,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(30); > } > if(childids[xx]==0){ > > > > thread_read_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > > > > childids[xx] = mythread_create( thread_read_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(31); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat=(struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++) > { > child_stat=(struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > goto jumpend; > } >jumpend: > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat=(struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %2lld readers \t\t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %2lld readers \t\t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > > > > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > > if (no_unlink) > { > store_dvalue( (double)0); > toutputindex++; > goto next1; > } > > > > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[3]); > if(noretest) > { > store_dvalue( (double)0); > goto next1; > } > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(4, numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(32); > } > if(childids[xx]==0){ > > > > thread_rread_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_rread_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(33); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > goto jumpend2; > } > >jumpend2: > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > min_throughput=max_throughput=min_xfer=0; > total_kilos=0; > ptotal=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > > > > > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld re-readers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld re-readers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > > > > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > >next1: > if(include_tflag) > if(!(include_mask & (long long)(1 << 3))) > goto next2; > sync(); > sleep(2); > > > > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[4]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(8,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(34); > } > if(childids[xx]==0){ > > > > thread_reverse_read_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_reverse_read_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(35); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > > > > > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld reverse readers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld reverse readers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } >next2: > if(include_tflag) > if(!(include_mask & (long long)(1 << 5))) > goto next3; > > > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[5]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(5,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(36); > } > if(childids[xx]==0){ > > > > thread_stride_read_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_stride_read_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(37); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > > > > > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld stride readers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld stride readers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > > > >next3: > if(include_tflag) > if(!(include_mask & (long long)(1 << 2))) > goto next4; > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[6]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(6,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(38); > } > if(childids[xx]==0){ > > > > thread_ranread_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_ranread_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(39); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld random readers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld random readers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > > > >next4: > if(include_tflag) > if(!(include_mask & (long long)(1 << 8))) > goto next5; > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[7]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(9,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(38); > } > if(childids[xx]==0){ > > > > thread_mix_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_mix_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(39); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld random mix \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld random mix \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } >next5: > > > > if(include_tflag) > if(!(include_mask & (long long)(1 << 2))) > goto next6; > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[8]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(7,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(38); > } > if(childids[xx]==0){ > > > > thread_ranwrite_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_ranwrite_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(39); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld random writers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld random writers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } >next6: > > > > > > > if(include_tflag) > if(!(include_mask & (long long)(1 << 9))) > goto next7; > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[9]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(10,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(38); > } > if(childids[xx]==0){ > > > > thread_pwrite_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_pwrite_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(39); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld pwrite writers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld pwrite writers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > > > > >next7: > > > > > if(include_tflag) > if(!(include_mask & (long long)(1 << 10))) > goto next8; > > toutputindex++; > strcpy(&toutput[toutputindex][0],throughput_tests[10]); > walltime = 0.0; > cputime = 0.0; > jstarttime=0; > sync(); > sleep(2); > *stop_flag=0; > total_kilos=0; > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(11,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(38); > } > if(childids[xx]==0){ > > > > thread_pread_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > > > > childids[xx] = mythread_create( thread_pread_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > kill((pid_t)myid,(int)15); > } > exit(39); > } > } > } > > if(myid == (long long)getpid()){ > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > starttime1 = time_so_far(); > } > > getout=0; > if(myid == (long long)getpid()){ > for( i = 0; i < num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest running:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > if(!jstarttime) > jstarttime = time_so_far(); > } > jtime = (time_so_far()-jstarttime)-time_res; > if(jtime < (double).000001) > { > jtime=time_res; > } > } > total_time = (time_so_far() - starttime1)-time_res; > if(total_time < (double).000001) > { > total_time=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > > > > total_kilos=0; > ptotal=0; > min_throughput=max_throughput=min_xfer=0; > if(!silent) printf("\n"); > for(xyz=0;xyz<num_child;xyz++){ > child_stat = (struct child_stats *)&shmaddr[xyz]; > total_kilos+=child_stat->throughput; > ptotal+=child_stat->actual; > if(!min_xfer) > min_xfer=child_stat->actual; > if(child_stat->actual < min_xfer) > min_xfer=child_stat->actual; > if(!min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput < min_throughput) > min_throughput=child_stat->throughput; > if(child_stat->throughput > max_throughput) > max_throughput=child_stat->throughput; > cputime += child_stat->cputime; > > if (child_stat->walltime < child_stat->cputime) > child_stat->walltime = child_stat->cputime; > if (child_stat->walltime > walltime) > walltime = child_stat->walltime; > } > avg_throughput=total_kilos/num_child; > if(cpuutilflag) > { > if (cputime < cputime_res) > cputime = 0.0; > } > if(cpuutilflag) > store_times (walltime, cputime); > store_dvalue(total_kilos); > > > > > if(!silent) printf("\tChildren see throughput for %lld pread readers \t= %10.2f %s/sec\n", num_child, total_kilos,unit); > if(!silent && !distributed) printf("\tParent sees throughput for %lld pread readers \t= %10.2f %s/sec\n", num_child, (double)(ptotal)/total_time,unit); > > if(!silent) printf("\tMin throughput per %s \t\t\t= %10.2f %s/sec \n", port,min_throughput,unit); > if(!silent) printf("\tMax throughput per %s \t\t\t= %10.2f %s/sec\n", port,max_throughput,unit); > if(!silent) printf("\tAvg throughput per %s \t\t\t= %10.2f %s/sec\n", port,avg_throughput,unit); > if(!silent) printf("\tMin xfer \t\t\t\t\t= %10.2f %s\n", min_xfer,unit); > > if(cpuutilflag) > { > if(walltime == 0.0) > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 0.0); > } > else > { > if(!silent) printf("\tCPU utilization: Wall time %8.3f CPU time %8.3f CPU utilization %6.2f %%\n\n", > walltime, cputime, 100.0 * cputime / walltime); > } > } > if(Cflag) > { > for(xyz=0;xyz<num_child;xyz++) > { > child_stat = (struct child_stats *) &shmaddr[xyz]; > if(cpuutilflag) > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec, wall=%6.3f, cpu=%6.3f, %%=%6.2f\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit, child_stat->walltime, > child_stat->cputime, cpu_util(child_stat->cputime, child_stat->walltime)); > } > else > { > if(!silent) printf("\tChild[%ld] xfer count = %10.2f %s, Throughput = %10.2f %s/sec\n", > (long)xyz, child_stat->actual, unit, child_stat->throughput, unit); > } > } > } > sync(); > sleep(2); > if(restf) > sleep((int)rest_val); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > cleanup_comm(); > } > >next8: > sleep(2); > > if (!no_unlink) { > > > > > > > > if(distributed) > { > use_thread=0; > if(master_iozone) > master_listen_socket = start_master_listen(); > else > become_client(); > } > if(!use_thread) > { > for(xx = 0; xx< num_child ; xx++){ > chid=xx; > childids[xx] = start_child_proc(12,numrecs64,reclen); > if(childids[xx]==-1){ > printf("\nFork failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)childids[xy],(long long)15); > } > exit(28); > } > if(childids[xx] == 0){ > > > > thread_cleanup_test((void *)((long)xx)); > > } > } > } > > else > { > for(xx = 0; xx< num_child ; xx++){ > > > > childids[xx] = mythread_create( thread_cleanup_test,(void *)(long)xx); > > if(childids[xx]==-1){ > printf("\nThread create failed\n"); > for(xy = 0; xy< xx ; xy++){ > Kill((long long)myid,(long long)15); > } > exit(29); > } > } > } > > if((long long)myid == getpid()) > { > if(distributed && master_iozone) > { > start_master_listen_loop((int) num_child); > } > for(i=0;i<num_child; i++){ > child_stat = (struct child_stats *)&shmaddr[i]; > > while(child_stat->flag==0) > Poll((long long)1); > } > for(i=0;i<num_child; i++) > { > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = 2; > if(delay_start!=0) > Poll((long long)delay_start); > if(distributed && master_iozone) > tell_children_begin(i); > } > } > > getout=0; > if((long long)myid == getpid()){ > for( i = 0; i < num_child; i++){ > child_stat=(struct child_stats *)&shmaddr[i]; > if(distributed && master_iozone) > { > printf("\n\tTest cleanup:"); > wait_dist_join(); > break; > } > else > { > if(use_thread) > { > thread_join(childids[i],(void *)&pstatus); > } > else > { > wait(0); > } > } > } > } > > for(xyz=0;xyz<num_child;xyz++){ > child_stat=(struct child_stats *)&shmaddr[xyz]; > child_stat->flag = 0; > } > sync(); > sleep(2); > if(distributed && master_iozone) > { > stop_master_listen(master_listen_socket); > > > > > cleanup_comm(); > } > } > > > > sync(); > if(!silent) printf("\n"); > if(!silent) printf("\n"); > return; >} > > > > > > > >static double >time_so_far(void) > > > > >{ ># 5773 "iozone.c" > struct timeval tp; > > if (gettimeofday(&tp, (struct timezone *) ((void *)0)) == -1) > perror("gettimeofday"); > return ((double) (tp.tv_sec)) + > (((double) tp.tv_usec) * 0.000001 ); > > >} ># 5793 "iozone.c" >void fetchit(char *buffer,long long length) > > > > > >{ > char *where; > __volatile__ long long x[4]; > long long i; > where=(char *)buffer; > for(i=0;i<(length/cache_line_size);i++) > { > x[(i & 3)]=*(where); > where+=cache_line_size; > > } >} ># 5821 "iozone.c" >long long >verify_buffer(__volatile__ char *buffer,long long length, off64_t recnum, long long recsize,unsigned long long patt, > char sverify) ># 5834 "iozone.c" >{ > __volatile__ unsigned long long *where; > __volatile__ unsigned long long dummy; > long long j,k; > off64_t file_position=0; > off64_t i; > char *where2; > char *pattern_ptr; > long long mpattern,xx2; > unsigned int seed; > unsigned long x; > unsigned long long value,value1; > unsigned long long a= 0x01020304; > unsigned long long b = 0x05060708; > unsigned long long c= 0x01010101; > unsigned long long d = 0x01010101; > unsigned long long pattern_buf; > > value = (a<<32) | b; > value1 = (c<<32) | d; > > > x=0; > xx2=chid; > if(share_file) > xx2=(long long)0; > mpattern=patt; > pattern_buf=patt; > if(diag_v) > { > if(no_unlink) > base_time=0; > seed= (unsigned int)(base_time+xx2+recnum); > srand(seed); > mpattern=(long long)rand(); > mpattern=(mpattern<<48) | (mpattern<<32) | (mpattern<<16) | mpattern; > mpattern=mpattern+value; > } > > > where=(unsigned long long *)buffer; > > if(!verify) > printf("\nOOPS You have entered verify_buffer unexpectedly !!! \n"); > > if(sverify == 2) > { > for(i=0;i<(length);i+=page_size) > { > dummy = *where; > where+=(page_size/sizeof(long long)); > } > return(0); > } > if(sverify == 1) > { > for(i=0;i<(length);i+=page_size) > { > if((unsigned long long)(*where) != (unsigned long long)((pattern_buf<<32) | pattern_buf)) > { > file_position = (off64_t)( (recnum * recsize)+ i); > printf("\n\n"); > > > > > > > printf("Error in file: Found ?%llx? Expecting ?%llx? addr %lx\n",*where, (long long)((pattern_buf<<32)|pattern_buf),((long)where)); > printf("Error in file: Position %lld \n",file_position); > printf("Record # %lld Record size %lld kb \n",recnum,recsize/1024); > printf("where %8.8lx loop %lld\n",(long)where,(long long)i); > > return(1); > } > where+=(page_size/sizeof(long long)); > } > } > if(sverify == 0) > { > for(i=0;i<(length/cache_line_size);i++) > { > for(j=0;j<(cache_line_size/sizeof(long long));j++) > { > if(diag_v) > { > pattern_buf=mpattern; > } > else > { > pattern_buf= mpattern<<32 | mpattern; > } > > pattern_ptr =(char *)&pattern_buf; > > if(*where != (unsigned long long)pattern_buf) > { > file_position = (off64_t)( (recnum * recsize))+ > ((i*cache_line_size)+(j*sizeof(long long))); > where2=(char *)where; > for(k=0;k<sizeof(long long);k++){ > if(*where2 != *pattern_ptr) > break; > where2++; > pattern_ptr++; > } > file_position+=k; > printf("\n\n"); > > > > > > printf("Error in file: Position %lld %lld %lld \n",i,j,k); > printf("Error in file: Position %lld \n",file_position); > printf("Record # %lld Record size %lld kb \n",recnum,recsize/1024); > > printf("Found pattern: Char >>%c<< Expecting >>%c<<\n", *where2,*pattern_ptr); > return(1); > } > where++; > if(diag_v) > mpattern=mpattern+value1; > } > } > } > return(0); >} > > > > >void >fill_buffer(char *buffer,long long length,long long pattern,char sverify,long long recnum) ># 5977 "iozone.c" >{ > unsigned long long *where; > long long i,j,xx2; > long long mpattern; > unsigned int seed; > unsigned long x; > unsigned long long value,value1; > unsigned long long a = 0x01020304; > unsigned long long b = 0x05060708; > unsigned long long c = 0x01010101; > unsigned long long d = 0x01010101; > > value = (a << 32) | b; > value1 = (c << 32) | d; > > xx2=chid; > if(share_file) > xx2=(long long)0; > x=0; > mpattern=pattern; > > if(diag_v) > { > > > > if(no_unlink) > base_time=0; > seed= (unsigned int)(base_time+xx2+recnum); > srand(seed); > mpattern=(long long)rand(); > mpattern=(mpattern<<48) | (mpattern<<32) | (mpattern<<16) | mpattern; > mpattern=mpattern+value; > } > where=(unsigned long long *)buffer; > if(sverify == 1) > { > for(i=0;i<(length);i+=page_size) > { > *where = (long long)((pattern<<32) | pattern); > where+=(page_size/sizeof(long long)); > > } > } > else > { > for(i=0;i<(length/cache_line_size);i++) > { > for(j=0;j<(cache_line_size/sizeof(long long));j++) > { > if(diag_v) > { > *where = (long long)(mpattern); > mpattern=mpattern+value1; > } > else > *where = (long long)((pattern<<32) | pattern); > where++; > } > } > } >} ># 6049 "iozone.c" >void >purgeit(char *buffer,long long reclen) > > > > > > >{ > char *where; > long rsize; > long tsize; > __volatile__ long long x[200]; > long i,cache_lines_per_rec; > long cache_lines_per_cache; > tsize = 200; > cache_lines_per_rec = (long)(reclen/cache_line_size); > cache_lines_per_cache = (long)(cache_size/cache_line_size); > rsize = (long)l_min((long long)cache_lines_per_rec,(long long)cache_lines_per_cache); > > > > where=(char *)pbuffer + ((long)buffer & ((long)cache_size-1)); > > for(i=0;i<(rsize);i++) > { > x[i%tsize]=*(where); > where+=cache_line_size; > > } >} > > >void >prepage(char *buffer,long long reclen) > > > > > > >{ > char *where; > long long i; > where=(char *)buffer; > for(i=0;i<(reclen/cache_line_size);i++) > { > *(where)=0xA5; > where+=cache_line_size; > } >} > > > > > > >void write_perf_test(off64_t kilo64,long long reclen ,long long *data1,long long *data2) > > > > > > > >{ > double starttime1; > double writetime[2]; > double walltime[2], cputime[2]; > double qtime_start,qtime_stop; > double compute_val = (double)0; > > double qtime_u_start,qtime_u_stop; > double qtime_s_start,qtime_s_stop; > > long long i,j; > off64_t numrecs64,traj_offset; > off64_t lock_offset=0; > long long Index = 0; > long long file_flags = 0; > long long traj_size; > unsigned long long writerate[2]; > off64_t filebytes64; > int ltest; > char *maddr; > char *wmaddr,*free_addr; > char *pbuff; > char *nbuff; > int fd,wval; > > struct cache *gc=0; > > > > int test_foo; > > > qtime_u_start=qtime_u_stop=0; > qtime_s_start=qtime_s_stop=0; > > nbuff=wmaddr=free_addr=0; > traj_offset=0; > test_foo=0; > qtime_start=qtime_stop=0; > maddr=0; > pbuff=mainbuffer; > if(w_traj_flag) > { > filebytes64 = w_traj_fsize; > numrecs64=w_traj_ops; > } > else > { > numrecs64 = (kilo64*1024)/reclen; > filebytes64 = numrecs64*reclen; > } > > if(Q_flag && (!wol_opened)) > { > wol_opened++; > wqfd=fopen("wol.dat","a"); > if(wqfd==0) > { > printf("Unable to open wol.dat\n"); > exit(40); > } > fprintf(wqfd,"Offset in Kbytes Latency in microseconds\n"); > rwqfd=fopen("rwol.dat","a"); > if(rwqfd==0) > { > printf("Unable to open rwol.dat\n"); > exit(41); > } > fprintf(rwqfd,"Offset in Kbytes Latency in microseconds\n"); > } > fd = 0; > if(oflag) > file_flags = 02|010000; > else > file_flags = 02; > > if(odsync) > file_flags |= 010000; > > > if(read_sync) > file_flags |=010000|010000; > > > > > if(direct_flag) > file_flags |=040000; > > > > > > > > if(noretest) > ltest=1; > else > ltest=2; > > for( j=0; j<ltest; j++) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if(j==0) > { > if((fd = creat64(filename,(int)(0640)))<0) > { > printf("\nCan not create temp file: %s\n", > filename); > perror("creat"); > exit(42); > } > } > if(fd) > close(fd); > > if((fd = open64(filename,(int)((int)file_flags),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(44); > } ># 6258 "iozone.c" > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)0)!=0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,1,0x1|0x2); > } > if(mmap_mix) > { > wval=write(fd, pbuff, (size_t) page_size); > if(wval != page_size) > { > > > > printf("\nError writing block %lld, fd= %d\n", (long long)0, fd); > > if(wval==-1) > perror("write"); > signal_handler(); > } > lseek64(fd,(off64_t)(0),0); > }; > fsync(fd); > > if(async_flag) > async_init(&gc,fd,direct_flag); > > pbuff=mainbuffer; > if(fetchon) > fetchit(pbuff,reclen); > if(verify) > fill_buffer(pbuff,reclen,(long long)pattern,sverify,(long long)0); > starttime1 = time_so_far(); > > if(Q_flag) > { > qtime_u_start=utime_so_far(); > qtime_s_start=stime_so_far(); > } > > if(w_traj_flag) > { > rewind(w_traj_fd); > } > compute_val=(double)0; > w_traj_ops_completed=0; > w_traj_bytes_completed=0; > for(i=0; i<numrecs64; i++){ > if(w_traj_flag) > { > traj_offset=get_traj(w_traj_fd, (long long *)&traj_size,(float *)&compute_time,(long)1); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(verify & diag_v) > fill_buffer(pbuff,reclen,(long long)pattern,sverify,i); > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > pbuff = mbuffer + Index; > } > if(async_flag && no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > if(purge) > purgeit(nbuff,reclen); > } > if(purge) > purgeit(pbuff,reclen); > if(Q_flag) > { > qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[i*reclen]; > fill_area((long long*)pbuff,(long long*)wmaddr,(long long)reclen); > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (i*reclen), depth,free_addr); > else > async_write(gc, (long long)fd, pbuff, reclen, (i*reclen), depth); > } > else > { > wval=write(fd, pbuff, (size_t ) reclen); > if(wval != reclen) > { > > > > > printf("\nError writing block %lld, fd= %d\n", i, > fd); > > if(wval == -1) > perror("write"); > signal_handler(); > } > } > } > if(Q_flag) > { > qtime_stop=time_so_far(); > if(j==0) > > > > > > fprintf(wqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((qtime_stop-qtime_start-time_res))*1000000); > else > fprintf(rwqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((qtime_stop-qtime_start-time_res))*1000000); > > } > w_traj_ops_completed++; > w_traj_bytes_completed+=reclen; > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > } > > if(Q_flag) > { > qtime_u_stop=utime_so_far(); > qtime_s_stop=stime_so_far(); > if(j==0) > fprintf(wqfd,"\nSystem time %10.3f User time %10.3f Real %10.3f (seconds)\n", > (qtime_s_stop-qtime_s_start)/sc_clk_tck, > (qtime_u_stop-qtime_u_start)/sc_clk_tck, > time_so_far()-starttime1); > else > fprintf(rwqfd,"\nSystem time %10.3f User time %10.3f Real %10.3f (seconds)\n", > (qtime_s_stop-qtime_s_start)/sc_clk_tck, > (qtime_u_stop-qtime_u_start)/sc_clk_tck, > time_so_far()-starttime1); > } > > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(file_lock) > if(mylockf((int) fd,(int)0,(int)0)) > printf("Unlock failed %d\n",(*__errno_location ())); > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > writetime[j] = ((time_so_far() - starttime1)-time_res) > -compute_val; > if(writetime[j] < (double).000001) > { > writetime[j]=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > if(OPS_flag || MS_flag){ > filebytes64=w_traj_ops_completed; > > }else > filebytes64=w_traj_bytes_completed; > > for(j=0;j<ltest;j++) > { > writerate[j] = > (unsigned long long) ((double) filebytes64 / writetime[j]); > if(MS_flag) > { > writerate[j]=1000000.0*(1.0/writerate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > writerate[j] >>= 10; > } > data1[0]=writerate[0]; > if(noretest) > { > writerate[1]=(long long) 0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)writerate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)writerate[1]); > > > > > > if(!silent) printf("%8lld",writerate[0]); > if(!silent) printf("%8lld",writerate[1]); > if(!silent) fflush(stdout); > >} > > > > > >void fwrite_perf_test(off64_t kilo64,long long reclen ,long long *data1,long long *data2) > > > > > > > >{ > double starttime1; > double writetime[2]; > double walltime[2], cputime[2]; > double compute_val = (double)0; > long long i,j; > off64_t numrecs64; > long long Index = 0; > unsigned long long writerate[2]; > off64_t filebytes64; > FILE *stream = ((void *)0); > int fd; > int ltest; > char *how; > char *stdio_buf; > > if(mmapflag || async_flag) > return; > numrecs64 = (kilo64*1024)/reclen; > filebytes64 = numrecs64*reclen; > stdio_buf=(char *)malloc((size_t)reclen); > if(noretest) > ltest=1; > else > ltest=2; > > for( j=0; j<ltest; j++) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if(j==0) > how="w+"; > else > how="r+"; ># 6594 "iozone.c" > if((stream=(FILE *)fopen64(filename,how)) == 0) > { > > > > > printf("\nCan not fdopen temp file: %s %d\n", > filename,(*__errno_location ())); > > perror("fdopen"); > exit(49); > } > > fd=open(filename,00); > fsync(fd); > setvbuf(stream,stdio_buf,0,reclen); > buffer=mainbuffer; > if(fetchon) > fetchit(buffer,reclen); > if(verify) > fill_buffer(buffer,reclen,(long long)pattern,sverify,(long long)0); > starttime1 = time_so_far(); > compute_val=(double)0; > for(i=0; i<numrecs64; i++){ > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > buffer = mbuffer + Index; > } > if(verify & diag_v) > fill_buffer(buffer,reclen,(long long)pattern,sverify,i); > if(purge) > purgeit(buffer,reclen); > if(fwrite(buffer, (size_t) reclen, 1, stream) != 1) > { > > > > > printf("\nError fwriting block %lld, fd= %d\n", i, > fd); > > perror("fwrite"); > signal_handler(); > } > } > > if(include_flush) > { > fflush(stream); > fsync(fd); > } > if(include_close) > { > fclose(stream); > } > writetime[j] = ((time_so_far() - starttime1)-time_res) > -compute_val; > if(writetime[j] < (double).000001) > { > writetime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > fflush(stream); > fclose(stream); > } > fsync(fd); > close(fd); > > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)(int)rest_val); > } > free(stdio_buf); > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<ltest;j++) > { > writerate[j] = > (unsigned long long) ((double) filebytes64 / writetime[j]); > if(MS_flag) > { > writerate[j]=1000000.0*(1.0/writerate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > writerate[j] >>= 10; > } > > if(noretest) > { > writerate[1]=(long long)0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)writerate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)writerate[1]); > data1[0]=writerate[0]; > > > > > > if(!silent) printf("%9lld",writerate[0]); > if(!silent) printf("%9lld",writerate[1]); > if(!silent) fflush(stdout); > >} > > > > > > >void fread_perf_test(off64_t kilo64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double starttime2; > double readtime[2]; > double walltime[2], cputime[2]; > double compute_val = (double)0; > long long j; > off64_t i,numrecs64; > long long Index = 0; > unsigned long long readrate[2]; > off64_t filebytes64; > FILE *stream = 0; > char *stdio_buf; > int fd,ltest; > > if(mmapflag || async_flag) > return; > numrecs64 = (kilo64*1024)/reclen; > filebytes64 = numrecs64*reclen; > stdio_buf=(char *)malloc((size_t)reclen); > > if(noretest) > ltest=1; > else > ltest=2; > > for( j=0; j<ltest; j++ ) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > > if(Uflag) > { > purge_buffer_cache(); > } ># 6785 "iozone.c" > if((stream=(FILE *)fopen64(filename,"r")) == 0) > { > printf("\nCan not fdopen temp file: %s\n", > filename); > perror("fdopen"); > exit(52); > } > > fd=open(filename,00); > fsync(fd); > close(fd); > setvbuf(stream,stdio_buf,0,reclen); > buffer=mainbuffer; > if(fetchon) > fetchit(buffer,reclen); > compute_val=(double)0; > starttime2 = time_so_far(); > for(i=0; i<numrecs64; i++) > { > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > buffer = mbuffer + Index; > } > if(purge) > purgeit(buffer,reclen); > if(fread(buffer, (size_t) reclen,1, stream) != 1) > { ># 6830 "iozone.c" > printf("\nError freading block %lld %lx\n", i, > (long)buffer); > > > perror("read"); > exit(54); > } > if(verify){ > if(verify_buffer(buffer,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > exit(55); > } > } > } > if(include_flush) > fflush(stream); > if(include_close) > { > fclose(stream); > } > readtime[j] = ((time_so_far() - starttime2)-time_res) > -compute_val; > if(readtime[j] < (double).000001) > { > readtime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > fflush(stream); > fclose(stream); > } > stream = ((void *)0); > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > free(stdio_buf); > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<ltest;j++) > { > readrate[j] = > (unsigned long long) ((double) filebytes64 / readtime[j]); > if(MS_flag) > { > readrate[j]=1000000.0*(1.0/readrate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > readrate[j] >>= 10; > } > data1[0]=readrate[0]; > data2[0]=1; > if(noretest) > { > readrate[1]=(long long)0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)readrate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)readrate[1]); > > > > > > if(!silent) printf("%8lld",readrate[0]); > if(!silent) printf("%9lld",readrate[1]); > if(!silent) fflush(stdout); > >} > > > > > > >void >read_perf_test(off64_t kilo64,long long reclen,long long *data1,long long *data2) > > > > > > > >{ > double starttime2; > double compute_val = (double)0; > double readtime[2]; > double walltime[2], cputime[2]; > > double qtime_u_start,qtime_u_stop; > double qtime_s_start,qtime_s_stop; > > long long j; > long long traj_size; > off64_t i,numrecs64,traj_offset; > off64_t lock_offset=0; > long long Index = 0; > unsigned long long readrate[2]; > off64_t filebytes64; > __volatile__ char *buffer1; > char *nbuff; > char *maddr; > char *wmaddr; > int fd,open_flags; > int test_foo,ltest; > double qtime_start,qtime_stop; > > struct cache *gc=0; > > > > > > qtime_u_start=qtime_u_stop=0; > qtime_s_start=qtime_s_stop=0; > > qtime_start=qtime_stop=0; > maddr=0; > traj_offset=0; > test_foo=0; > numrecs64 = (kilo64*1024)/reclen; > > open_flags = 00; > > if(read_sync) > open_flags |=010000|010000; > > > > if(direct_flag) > open_flags |=040000; > > > > > > > if(r_traj_flag) > { > numrecs64=r_traj_ops; > filebytes64 = r_traj_fsize; > } else > filebytes64 = numrecs64*reclen; > fd = 0; > if(Q_flag && (!rol_opened)) > { > rol_opened++; > rqfd=fopen("rol.dat","a"); > if(rqfd==0) > { > printf("Unable to open rol.dat\n"); > exit(56); > } > fprintf(rqfd,"Offset in Kbytes Latency in microseconds\n"); > rrqfd=fopen("rrol.dat","a"); > if(rrqfd==0) > { > printf("Unable to open rrol.dat\n"); > exit(57); > } > fprintf(rrqfd,"Offset in Kbytes Latency in microseconds\n"); > } > > > > if(noretest) > ltest=1; > else > ltest=2; > > for( j=0; j<ltest; j++ ) > { > > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(filename,(int)(open_flags),(int)(0)))<0) > { > printf("\nCan not open temporary file for read\n"); > perror("open"); > exit(58); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 7059 "iozone.c" > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1) != 0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,0,0x1); > } > fsync(fd); > > > > nbuff=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > if(read(fd, (void *)nbuff, (size_t) page_size) != page_size) > { > > > > > printf("\nError reading block %d %lx\n", 0, > (long)nbuff); > > perror("read"); > exit(60); > } > lseek64(fd,(off64_t)(0),0); > nbuff=mainbuffer; > > if(fetchon) > fetchit(nbuff,reclen); > starttime2 = time_so_far(); > > if(Q_flag) > { > qtime_u_start=utime_so_far(); > qtime_s_start=stime_so_far(); > } > > if(r_traj_flag) > { > rewind(r_traj_fd); > } > compute_val=(double)0; > r_traj_ops_completed=0; > r_traj_bytes_completed=0; > for(i=0; i<numrecs64; i++) > { > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(r_traj_flag) > { > traj_offset=get_traj(r_traj_fd, (long long *)&traj_size,(float *)&compute_time, (long)0); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > qtime_start=time_so_far(); > if(mmapflag) > { > wmaddr=&maddr[i*reclen]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (i*reclen), reclen, > 1LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (i*reclen),reclen, > 1LL,(numrecs64*reclen),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { ># 7173 "iozone.c" > printf("\nError reading block %lld %lx\n", i, > (long)nbuff); > > > perror("read"); > exit(61); > } > } > } > if(verify) { > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > exit(62); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > exit(63); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > buffer1=0; > if(Q_flag) > { > qtime_stop=time_so_far(); > if(j==0) > > > > > > fprintf(rqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,(qtime_stop-qtime_start-time_res)*1000000); > else > fprintf(rrqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,(qtime_stop-qtime_start-time_res)*1000000); > > } > r_traj_ops_completed++; > r_traj_bytes_completed+=reclen; > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)1)) > printf("Read unlock failed. %d\n",(*__errno_location ())); > > if(Q_flag) > { > qtime_u_stop=utime_so_far(); > qtime_s_stop=stime_so_far(); > if(j==0) > fprintf(rqfd,"\nSystem time %10.3f User time %10.3f Real %10.3f (seconds)\n", > (qtime_s_stop-qtime_s_start)/sc_clk_tck, > (qtime_u_stop-qtime_u_start)/sc_clk_tck, > time_so_far()-starttime2); > else > fprintf(rrqfd,"\nSystem time %10.3f User time %10.3f Real %10.3f (seconds)\n", > (qtime_s_stop-qtime_s_start)/sc_clk_tck, > (qtime_u_stop-qtime_u_start)/sc_clk_tck, > time_so_far()-starttime2); > } > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > readtime[j] = ((time_so_far() - starttime2)-time_res)-compute_val; > if(readtime[j] < (double).000001) > { > readtime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > if(OPS_flag || MS_flag){ > filebytes64=r_traj_ops_completed; > > } else > filebytes64=r_traj_bytes_completed; > > for(j=0;j<ltest;j++) > { > readrate[j] = > (unsigned long long) ((double) filebytes64 / readtime[j]); > if(MS_flag) > { > readrate[j]=1000000.0*(1.0/readrate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > readrate[j] >>= 10; > > } > data1[0]=readrate[0]; > data2[0]=1; > if(noretest) > { > readrate[1]=(long long)0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)readrate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)readrate[1]); > > > > > > if(!silent) printf("%9lld",readrate[0]); > if(!silent) printf("%9lld",readrate[1]); > if(!silent) fflush(stdout); > >} > > > > > > > >void random_perf_test(off64_t kilo64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double randreadtime[2]; > double starttime2; > double walltime[2], cputime[2]; > double compute_val = (double)0; > > > > > long long j; > off64_t i,numrecs64; > long long Index=0; > int flags; > unsigned long long randreadrate[2]; > off64_t filebytes64; > off64_t lock_offset=0; > __volatile__ char *buffer1; > char *wmaddr,*nbuff; > char *maddr,*free_addr; > int fd,wval; > > > > > struct cache *gc=0; > > > > > maddr=free_addr=0; > numrecs64 = (kilo64*1024)/reclen; > flags = 02; > > > if(direct_flag) > flags |=040000; > > > > > > > fd=0; > if(oflag) > flags |= 010000; > > if(odsync) > flags |= 010000; > > > if(read_sync) > flags |=010000|010000; > > filebytes64 = numrecs64*reclen; > for( j=0; j<2; j++ ) > { > > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(filename,(int)(((int)flags)),(int)(0640)))<0){ > printf("\nCan not open temporary file for read/write\n"); > perror("open"); > exit(66); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 7445 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,0,0x1|0x2); > } > nbuff=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > > > > > > > srand48(0); > > > compute_val=(double)0; > starttime2 = time_so_far(); > if ( j==0 ){ > for(i=0; i<numrecs64; i++) { > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > if(purge) > purgeit(nbuff,reclen); ># 7490 "iozone.c" > offset64 = reclen * (lrand48()%numrecs64); > > > > if( !(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(offset64),0)<0) > { > perror("lseek"); > exit(68); > }; > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(mmapflag) > { > wmaddr=&maddr[offset64]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, offset64,reclen, > 0LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (offset64),reclen, > 0LL,(numrecs64*reclen),0LL); > } > else > { > if(read(fd, (void *)nbuff, (size_t)reclen) != reclen) > { > > > > > printf("\nError reading block at %lld\n", > offset64); > > perror("read"); > exit(70); > } > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)offset64/reclen,reclen,(long long)pattern,sverify)){ > exit(71); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)offset64/reclen,reclen,(long long)pattern,sverify)){ > exit(72); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > } > } > else > { > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > for(i=0; i<numrecs64; i++) > { > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } ># 7593 "iozone.c" > offset64 = reclen * (lrand48()%numrecs64); > > > if(async_flag && no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,offset64/reclen); > } > if(purge) > purgeit(nbuff,reclen); > > if(verify & diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,offset64/reclen); > > if (!(h_flag || k_flag || mmapflag)) > { > lseek64(fd,(off64_t)(offset64),0); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(mmapflag) > { > wmaddr=&maddr[offset64]; > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_write_no_copy(gc, (long long)fd, nbuff, reclen, offset64, > depth,free_addr); > else > async_write(gc, (long long)fd, nbuff, reclen, offset64, depth); > } > else > { > wval=write(fd, nbuff,(size_t)reclen); > if(wval != reclen) > { > > > > > printf("\nError writing block at %lld\n", > offset64); > > if(wval==-1) > perror("write"); > signal_handler(); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > } > } > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > randreadtime[j] = ((time_so_far() - starttime2)-time_res)- > compute_val; > if(randreadtime[j] < (double).000001) > { > randreadtime[j]=time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)filebytes64,4); > } > else > fsync(fd); > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<2;j++) > { > randreadrate[j] = > (unsigned long long) ((double) filebytes64 / randreadtime[j]); > if(MS_flag) > { > randreadrate[j]=1000000.0*(1.0/randreadrate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > randreadrate[j] >>= 10; > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)randreadrate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)randreadrate[1]); > > > > > > if(!silent) printf("%8lld",randreadrate[0]); > if(!silent) printf("%8lld",randreadrate[1]); > if(!silent) fflush(stdout); > >} > > > > > > >void reverse_perf_test(off64_t kilo64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double revreadtime[2]; > double starttime2; > double walltime[2], cputime[2]; > double compute_val = (double)0; > long long j; > off64_t i,numrecs64; > long long Index = 0; > unsigned long long revreadrate[2]; > off64_t filebytes64; > off64_t lock_offset=0; > int fd,open_flags; > char *maddr,*wmaddr; > __volatile__ char *buffer1; > int ltest; > char *nbuff; > > > > > struct cache *gc=0; > > > > > maddr=wmaddr=0; > open_flags=00; > > > if(direct_flag) > open_flags |=040000; > > > > > > > > if(read_sync) > open_flags |=010000|010000; > > numrecs64 = (kilo64*1024)/reclen; > filebytes64 = numrecs64*reclen; > fd = 0; > if(noretest) > ltest=1; > else > ltest=2; > for( j=0; j<ltest; j++ ) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(filename,(int)(open_flags),(int)(0)))<0){ > printf("\nCan not open temporary file for read\n"); > perror("open"); > exit(75); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 7848 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,0,0x1); > } > fsync(fd); > nbuff=mainbuffer; > mbuffer=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > starttime2 = time_so_far(); > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(-reclen),2)<0) > { > perror("lseek"); > exit(77); > }; > } > compute_val=(double)0; > for(i=0; i<numrecs64; i++) > { > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > > if(purge) > purgeit(nbuff,reclen); > if(mmapflag) > { > wmaddr = &maddr[((numrecs64-1)-i)*reclen]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, ((((numrecs64-1)-i)*reclen)), > reclen, -1LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (((numrecs64-1)-i)*reclen), > reclen,-1LL,(numrecs64*reclen),depth); > }else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { > > > > printf("\nError reading block %lld\n", i); > > perror("read"); > exit(79); > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)(numrecs64-1)-i,reclen,(long long)pattern,sverify)){ > exit(80); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)(numrecs64-1)-i,reclen,(long long)pattern,sverify)){ > exit(81); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > if (!(h_flag || k_flag || mmapflag)) > { > lseek64(fd,(off64_t)((off64_t)-2*reclen),1); > } > } > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > revreadtime[j] = ((time_so_far() - starttime2)-time_res) > -compute_val; > if(revreadtime[j] < (double).000001) > { > revreadtime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<ltest;j++){ > revreadrate[j] = > (unsigned long long) ((double) filebytes64 / revreadtime[j]); > if(MS_flag) > { > revreadrate[j]=1000000.0*(1.0/revreadrate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > revreadrate[j] >>= 10; > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)revreadrate[0]); > > > > if(!silent) printf("%8lld",revreadrate[0]); > > if(!silent) fflush(stdout); >} > > > > > > >void rewriterec_perf_test(off64_t kilo64 ,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double writeintime; > double starttime1; > double walltime, cputime; > double compute_val = (double)0; > long long i; > off64_t numrecs64; > long long flags; > long long Index=0; > unsigned long long writeinrate; > off64_t filebytes64; > off64_t lock_offset=0; > int fd,wval; > char *maddr; > char *wmaddr,*free_addr,*nbuff; > > > > > struct cache *gc=0; > > > > > walltime=cputime=0; > maddr=wmaddr=free_addr=nbuff=0; > numrecs64 = (kilo64*1024)/reclen; > filebytes64 = numrecs64*reclen; > flags = 02|0100|01000; > > > if(direct_flag) > flags |=040000; > > > > > > > if(oflag) > flags |= 010000; > > if(odsync) > flags |= 010000; > > > if(read_sync) > flags |=010000|010000; > > if (!no_unlink) > unlink(dummyfile[0]); > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(dummyfile[0],(int)((int)flags),(int)(0640)))<0) > { > printf("\nCan not open temporary file %s for write.\n",dummyfile[0]); > perror("open"); > exit(84); > } ># 8107 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,1,0x1|0x2); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); > > fsync(fd); > nbuff=mainbuffer; > mbuffer=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); ># 8134 "iozone.c" > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = time_so_far(); > cputime = cputime_so_far(); > } > for(i=0; i<numrecs64; i++){ > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > if(async_flag && no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > } > if(verify & diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > if(purge) > purgeit(nbuff,reclen); > if(mmapflag) > { > wmaddr = &maddr[0]; > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (i*reclen), depth,free_addr); > else > async_write(gc, (long long)fd, nbuff, reclen, (i*reclen), depth); > } > else > { > wval=write(fd, nbuff, (size_t) reclen); > if(wval != reclen) > { > > > > printf("\nError writing block %lld, fd= %d\n", i, fd); > > if(wval==-1) > perror("write"); > signal_handler(); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > if (!(h_flag || k_flag || mmapflag)) > { > lseek64(fd,(off64_t)((off64_t)0),0); > } > } > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > writeintime = ((time_so_far() - starttime1)-time_res)- > compute_val; > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > walltime = time_so_far() - walltime; > if (walltime < cputime) > walltime = cputime; > } > if(writeintime < (double).000001) > { > writeintime= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(!include_close) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > writeinrate = (unsigned long long) ((double) filebytes64 / writeintime); > if(MS_flag) > { > writeinrate=1000000.0*(1.0/writeinrate); > } > if(!(OPS_flag || MS_flag)) > writeinrate >>= 10; > > if(cpuutilflag) > store_times(walltime, cputime); > store_value((off64_t)writeinrate); > > > > if(!silent) printf("%8lld",writeinrate); > > if(!silent) fflush(stdout); > if(restf) > sleep((int)rest_val); >} > > > > > > >void read_stride_perf_test(off64_t kilos64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double strideintime; > double starttime1; > double compute_val = (double)0; > double walltime, cputime; > off64_t numrecs64,current_position; > long long Index = 0; > off64_t i,savepos64 = 0; > unsigned long long strideinrate; > off64_t filebytes64; > off64_t lock_offset=0; > long long uu; > off64_t stripewrap=0; > int fd,open_flags; > __volatile__ char *buffer1; > char *nbuff; > char *maddr; > char *wmaddr; > > > > > struct cache *gc=0; > > > > > walltime=cputime=0; > nbuff=maddr=wmaddr=0; > open_flags=00; > > > if(direct_flag) > open_flags |=040000; > > > > > > > > if(read_sync) > open_flags |=010000|010000; > > next64 = (off64_t)0; > numrecs64 = (kilos64*1024)/reclen; > filebytes64 = numrecs64*reclen; > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(filename,(int)((int)open_flags),(int)(0640)))<0) > { > printf("\nCan not open temporary file for read\n"); > perror("open"); > exit(86); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 8378 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,filebytes64,0,0x1); > } > fsync(fd); > current_position=0; > nbuff=mainbuffer; > mbuffer=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = time_so_far(); > cputime = cputime_so_far(); > } > for(i=0; i<numrecs64; i++){ > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > if(purge) > purgeit(nbuff,reclen); > if(verify) > { > savepos64=current_position/reclen; > } > if(mmapflag) > { > wmaddr = &maddr[current_position]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, current_position, > reclen, stride,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, current_position, reclen, > stride,(numrecs64*reclen),depth); > } > else > { > if((uu=read((int)fd, (void*)nbuff, (size_t) reclen)) != reclen) > { > > > > > printf("\nError reading block %lld, fd= %d Filename %s Read returned %lld\n", i, fd,filename,uu); > printf("\nSeeked to %lld Reclen = %lld\n", savepos64,reclen); > > perror("read"); > exit(88); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > current_position+=reclen; > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen, (off64_t)savepos64 ,reclen,(long long)pattern,sverify)){ > exit(89); > } > } > else > { > if(verify_buffer(nbuff,reclen, (off64_t)savepos64 ,reclen,(long long)pattern,sverify)){ > exit(90); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); ># 8480 "iozone.c" > if(current_position + (stride * reclen) >= (numrecs64 * reclen)-reclen) > { > current_position=0; > > stripewrap++; > > if(numrecs64 <= stride) > { > current_position=0; > } > else > { > current_position = (off64_t)((stripewrap)%numrecs64)*reclen; > } > > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_position),0)<0) > { > perror("lseek"); > exit(91); > } > } > } > else > { > current_position+=(stride*reclen)-reclen; > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_position),0)<0) > { > perror("lseek"); > exit(93); > }; > } > } > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > walltime = time_so_far() - walltime; > if (walltime < cputime) > walltime = cputime; > } > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > strideintime = ((time_so_far() - starttime1)-time_res) > -compute_val; > if(strideintime < (double).000001) > { > strideintime= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(!include_close) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > strideinrate = (unsigned long long) ((double) filebytes64 / strideintime); > if(MS_flag) > { > strideinrate=1000000.0*(1.0/strideinrate); > } > if(!(OPS_flag || MS_flag)) > strideinrate >>= 10; > > if(cpuutilflag) > store_times(walltime, cputime); > store_value((off64_t)strideinrate); > > > > if(!silent) printf("%8lld",strideinrate); > > if(!silent) fflush(stdout); > if(restf) > sleep((int)rest_val); >} > > > > > > > >void pwrite_perf_test(off64_t kilos64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double pwritetime[2]; > double starttime1; > double walltime[2], cputime[2]; > double compute_val = (double)0; > long long i,j; > long long Index = 0; > unsigned long long pwriterate[2]; > off64_t filebytes64; > long long flags_here = 0; > int fd,ltest; > off64_t numrecs64,traj_offset; > off64_t lock_offset=0; > long long traj_size; > > > > char *nbuff; > > traj_offset=0; > nbuff=mainbuffer; > if(w_traj_flag) > { > filebytes64 = w_traj_fsize; > numrecs64=w_traj_ops; > } > else > { > numrecs64 = (kilos64*1024)/reclen; > filebytes64 = numrecs64*reclen; > } > fd = 0; > if(oflag){ > flags_here = 010000|02; > } > else > { > flags_here = 02; > } > > if(odsync) > flags_here |= 010000; > > > > if(read_sync) > flags_here |=010000|010000; > > > > > if(direct_flag) > flags_here |=040000; > > > > > > > unlink(filename); > if(noretest) > ltest=1; > else > ltest=2; > for( j=0; j<ltest; j++) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if( j==0 ) > { > if((fd = creat64(filename,(int)(0640)))<0) > { > printf("\nCan not create temp file: %s\n", > filename); > perror("creat"); > exit(95); > } > close(fd); > if((fd = open64(filename,(int)((int)flags_here),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(97); > } ># 8714 "iozone.c" > } > else > { > if((fd = open64(filename,(int)((int)flags_here),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(99); > } ># 8737 "iozone.c" > } > fsync(fd); > nbuff=mainbuffer; > mbuffer=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > starttime1 = time_so_far(); > compute_val=(double)0; > if(w_traj_flag) > { > rewind(w_traj_fd); > } > for(i=0; i<numrecs64; i++){ > if(w_traj_flag) > { > traj_offset=get_traj(w_traj_fd, (long long *)&traj_size,(float *)&compute_time,(long)1); > reclen=traj_size; > } > else > traj_offset=(i * reclen); > if(rlocking) > { > lock_offset=traj_offset; > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > if(verify && diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > if(purge) > purgeit(nbuff,reclen); > if(pwrite64(fd,nbuff,(size_t)(reclen),(off64_t)(traj_offset)) != reclen) > { > > > > > printf("\nError pwriting block %lld, fd= %d\n", i, > fd); > > perror("pwrite"); > signal_handler(); > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > } > if(include_flush) > { > fsync(fd); > } > if(include_close) > { > close(fd); > } > pwritetime[j] = ((time_so_far() - starttime1)-time_res) > -compute_val; > if(pwritetime[j] < (double).000001) > { > pwritetime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > fsync(fd); > close(fd); > } > > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<ltest;j++){ > pwriterate[j] = > (unsigned long long) ((double) filebytes64 / pwritetime[j]); > if(MS_flag) > { > pwriterate[j]=1000000.0*(1.0/pwriterate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > pwriterate[j] >>= 10; > } > > if(noretest) > { > pwriterate[1]=(long long)0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)pwriterate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)pwriterate[1]); > > > > > > if(!silent) printf("%8lld",pwriterate[0]); > if(!silent) printf("%9lld",pwriterate[1]); > if(!silent) fflush(stdout); > >} > > > > > > > >void pread_perf_test(off64_t kilos64,long long reclen,long long *data1,long long *data2) > > > > > > >{ > double starttime2; > double preadtime[2]; > double walltime[2], cputime[2]; > double compute_val = (double)0; > long long numrecs64,i; > long long j; > long long Index = 0; > unsigned long long preadrate[2]; > off64_t filebytes64; > off64_t lock_offset=0; > int fd,open_flags; > int ltest; > off64_t traj_offset; > long long traj_size; > > > > char *nbuff; > > traj_offset=0; > nbuff=mainbuffer; > open_flags=00; > > > if(direct_flag) > open_flags |=040000; > > > > > > > > if(read_sync) > open_flags |=010000|010000; > > if(r_traj_flag) > { > filebytes64 = r_traj_fsize; > numrecs64=r_traj_ops; > } > else > { > numrecs64 = (kilos64*1024)/reclen; > filebytes64 = numrecs64*reclen; > } > > fd = 0; > if(noretest) > ltest=1; > else > ltest=2; > for( j=0; j<ltest; j++ ) > { > if(cpuutilflag) > { > walltime[j] = time_so_far(); > cputime[j] = cputime_so_far(); > } > if(Uflag) > { > purge_buffer_cache(); > } > if((fd = open64(filename,(int)((int)open_flags),(int)(0)))<0) > { > printf("\nCan not open temporary file for read\n"); > perror("open"); > exit(101); > } ># 8969 "iozone.c" > nbuff=mainbuffer; > mbuffer=mainbuffer; > if(fetchon) > fetchit(nbuff,reclen); > starttime2 = time_so_far(); > compute_val=(double)0; > if(r_traj_flag) > { > rewind(r_traj_fd); > } > for(i=0; i<numrecs64; i++) > { > if(r_traj_flag) > { > traj_offset=get_traj(r_traj_fd, (long long *)&traj_size,(float *)&compute_time,(long)1); > reclen=traj_size; > } > else > traj_offset=(i * reclen); > if(rlocking) > { > lock_offset=traj_offset; > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(compute_time); > if(multi_buffer) > { > Index +=reclen; > if(Index > ((16*1024*1024)-reclen)) > Index=0; > nbuff = mbuffer + Index; > } > > if(purge) > purgeit(nbuff,reclen); > if(pread64(((int)fd),((void*)nbuff),(size_t)(((size_t) reclen)),(off64_t)(traj_offset)) > != reclen) > { > > > > printf("\nError reading block %lld %lx\n", i,(unsigned long)nbuff); > > perror("pread"); > exit(103); > } > if(verify){ > if(verify_buffer(nbuff,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > exit(104); > } > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > } > if(include_flush) > fsync(fd); > if(include_close) > close(fd); > preadtime[j] = ((time_so_far() - starttime2)-time_res) > -compute_val; > if(preadtime[j] < (double).000001) > { > preadtime[j]= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(!include_close) > { > fsync(fd); > close(fd); > } > > if(cpuutilflag) > { > cputime[j] = cputime_so_far() - cputime[j]; > if (cputime[j] < cputime_res) > cputime[j] = 0.0; > walltime[j] = time_so_far() - walltime[j]; > if (walltime[j] < cputime[j]) > walltime[j] = cputime[j]; > } > if(restf) > sleep((int)rest_val); > } > > filebytes64 = numrecs64*reclen; > if(OPS_flag || MS_flag){ > filebytes64=filebytes64/reclen; > } > for(j=0;j<ltest;j++){ > preadrate[j] = > (unsigned long long) ((double) filebytes64 / preadtime[j]); > if(MS_flag) > { > preadrate[j]=1000000.0*(1.0/preadrate[j]); > continue; > } > if(!(OPS_flag || MS_flag)) > preadrate[j] >>= 10; > } > if(noretest) > { > preadrate[1]=(long long)0; > if(cpuutilflag) > { > walltime[1]=0.0; > cputime[1]=0.0; > } > } > > > if(cpuutilflag) > store_times(walltime[0], cputime[0]); > store_value((off64_t)preadrate[0]); > if(cpuutilflag) > store_times(walltime[1], cputime[1]); > store_value((off64_t)preadrate[1]); > > > > > > if(!silent) printf("%8lld",preadrate[0]); > if(!silent) printf("%9lld",preadrate[1]); > if(!silent) fflush(stdout); > >} ># 9636 "iozone.c" >void print_header(void) > > > >{ > if(Eflag) > { > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s%8s%9s%7s%10s\n", > " ", > " ", > " ", > " ", > " ", > " ", > "random", > "random", > "bkwd", > "record", > "stride", > " ", > " ", > " ", > " " > > ," ", > " ", > " ", > " " > > > > > > > > ); > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s%8s%9s%7s%10s\n", > "KB", > "reclen", > "write", > "rewrite", > "read", > "reread", > "read", > "write", > "read", > "rewrite", > "read", > "fwrite", > "frewrite", > "fread", > "freread" > > ,"pwrite", > "repwrite", > "pread", > "repread" > > > > > > > > ); > }else > if(RWONLYflag){ > if(!silent) printf("%16s%8s%8s%8s%8s%10s\n", > " ", > " ", > " ", > " ", > " ", > " " > ); > if(!silent) printf("%16s%8s%8s%8s%8s%10s\n", > "KB", > "reclen", > "write", > "rewrite", > "read", > "reread" > ); > }else{ > if(!(mmapflag || async_flag)) > { > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s\n", > " ", > " ", > " ", > " ", > " ", > " ", > "random", > "random", > "bkwd", > "record", > "stride", > "", > "", > "", > "" > ); > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s\n", > "KB", > "reclen", > "write", > "rewrite", > "read", > "reread", > "read", > "write", > "read", > "rewrite", > "read", > "fwrite", > "frewrite", > "fread", > "freread" > ); > }else > { > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s\n", > " ", > " ", > " ", > " ", > " ", > " ", > "random", > "random", > "bkwd", > "record", > "stride", > "", > "", > "", > "" > ); > if(!silent) printf("%16s%8s%8s%8s%8s%10s%8s%8s%8s%8s%8s%9s%9s%8s%9s\n", > "KB", > "reclen", > "write", > "rewrite", > "read", > "reread", > "read", > "write", > "read", > "rewrite", > "read", > "", > "", > "", > "" > ); > } > } >} > > > > > > > >void >store_value(off64_t value) > > > > >{ > report_array[current_x][current_y]=value; > current_x++; > if(current_x > max_x) > max_x=current_x; > if(current_y > max_y) > max_y=current_y; > if(max_x >= 100) > { > printf("\nMAX_X too small\n"); > exit(117); > } > if(max_y >= 512) > { > printf("\nMAX_Y too small\n"); > exit(118); > } >} ># 9835 "iozone.c" >void >store_times(double walltime, double cputime) > > > > >{ > runtimes [current_x][current_y].walltime = walltime; > runtimes [current_x][current_y].cputime = cputime; > runtimes [current_x][current_y].cpuutil = cpu_util(cputime, walltime); >} > > > > > > >void dump_report(long long who) > > > > >{ > long long i; > off64_t current_file_size; > off64_t rec_size; > > if(bif_flag) > bif_column++; > if(!silent) printf(" "); > > > > > > del_record_sizes(); > init_record_sizes(orig_min_rec_size, orig_max_rec_size); > > for(rec_size=get_next_record_size(0); rec_size <= orig_max_rec_size; > rec_size=get_next_record_size(rec_size)) > { > if (rec_size == 0) break; > if(bif_flag) > do_float(bif_fd,(double)(rec_size/1024),bif_row,bif_column++); > > > > if(!silent) printf(" %c%lld%c",042,rec_size/1024,042); > > } > if(!silent) printf("\n"); > if(bif_flag) > { > bif_column=0; > bif_row++; > } > > current_file_size = report_array[0][0]; > if(bif_flag) > { > do_float(bif_fd,(double)(current_file_size),bif_row,bif_column++); > } > > > > if(!silent) printf("%c%lld%c ",042,current_file_size,042); > > for(i=0;i<=max_y;i++){ > if(report_array[0][i] != current_file_size){ > if(!silent) printf("\n"); > current_file_size = report_array[0][i]; > if(bif_flag) > { > bif_row++; > bif_column=0; > do_float(bif_fd,(double)(current_file_size),bif_row,bif_column++); > } > > > > if(!silent) printf("%c%lld%c ",042,current_file_size,042); > > } > if(bif_flag) > do_float(bif_fd,(double)(report_array[who][i]),bif_row,bif_column++); > > > > if(!silent) printf(" %lld ",report_array[who][i]); > > } > if(bif_flag) > { > bif_row++; > bif_column=0; > } > if(!silent) printf("\n"); >} > > > > > >void dump_excel(void) > > > >{ > if(bif_flag) > { > bif_fd=create_xls(bif_filename); > do_label(bif_fd,command_line,bif_row++,bif_column); > do_label(bif_fd," ",bif_row++,bif_column); > do_label(bif_fd,"The top row is records sizes, the left column is file sizes",bif_row++,bif_column); > } > if(!silent) printf("Excel output is below:\n"); > > if ((!include_tflag) || (include_mask & (long long)(1 << 0))) { > if(bif_flag) > do_label(bif_fd,"Writer Report",bif_row++,bif_column); > if(!silent) printf("\n%cWriter report%c\n",042,042); > dump_report(2); > if(bif_flag) > do_label(bif_fd,"Re-writer Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-writer report%c\n",042,042); > dump_report(3); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 1))) { > if(bif_flag) > do_label(bif_fd,"Reader Report",bif_row++,bif_column); > if(!silent) printf("\n%cReader report%c\n",042,042); > dump_report(4); > if(bif_flag) > do_label(bif_fd,"Re-reader Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-Reader report%c\n",042,042); > dump_report(5); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 2))) { > if(bif_flag) > do_label(bif_fd,"Random Read Report",bif_row++,bif_column); > if(!silent) printf("\n%cRandom read report%c\n",042,042); > dump_report(6); > if(bif_flag) > do_label(bif_fd,"Random Write Report",bif_row++,bif_column); > if(!silent) printf("\n%cRandom write report%c\n",042,042); > dump_report(7); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 3))) { > if(bif_flag) > do_label(bif_fd,"Backward Read Report",bif_row++,bif_column); > if(!silent) printf("\n%cBackward read report%c\n",042,042); > dump_report(8); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 4))) { > if(bif_flag) > do_label(bif_fd,"Record Rewrite Report",bif_row++,bif_column); > if(!silent) printf("\n%cRecord rewrite report%c\n",042,042); > dump_report(9); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 5))) { > if(bif_flag) > do_label(bif_fd,"Stride Read Report",bif_row++,bif_column); > if(!silent) printf("\n%cStride read report%c\n",042,042); > dump_report(10); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 6))) { > if(bif_flag) > do_label(bif_fd,"Fwrite Report",bif_row++,bif_column); > if(!silent) printf("\n%cFwrite report%c\n",042,042); > dump_report(11); > if(bif_flag) > do_label(bif_fd,"Re-fwrite Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-Fwrite report%c\n",042,042); > dump_report(12); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 7))) { > if(bif_flag) > do_label(bif_fd,"Fread Report",bif_row++,bif_column); > if(!silent) printf("\n%cFread report%c\n",042,042); > dump_report(13); > if(bif_flag) > do_label(bif_fd,"Re-fread Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-Fread report%c\n",042,042); > dump_report(14); > } > > > if(Eflag) > { > if ((!include_tflag) || (include_mask & (long long)(1 << 9))) { > if(bif_flag) > do_label(bif_fd,"Pwrite Report",bif_row++,bif_column); > if(!silent) printf("\n%cPwrite report%c\n",042,042); > dump_report(15); > if(bif_flag) > do_label(bif_fd,"Re-pwrite Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-Pwrite report%c\n",042,042); > dump_report(16); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 10))) { > if(bif_flag) > do_label(bif_fd,"Pread Report",bif_row++,bif_column); > if(!silent) printf("\n%cPread report%c\n",042,042); > dump_report(17); > if(bif_flag) > do_label(bif_fd,"Re-pread Report",bif_row++,bif_column); > if(!silent) printf("\n%cRe-Pread report%c\n",042,042); > dump_report(18); > } ># 10076 "iozone.c" > } > > if (cpuutilflag) > dump_cputimes(); > if(bif_flag) > close_xls(bif_fd); >} > > > > > > >void dump_times(long long who) > > > > >{ > long long i; > off64_t current_file_size; > off64_t rec_size; > > if (bif_flag) > bif_column++; > if(!silent) printf(" "); > > for (rec_size = get_next_record_size(0); rec_size <= orig_max_rec_size; > rec_size = get_next_record_size(rec_size)) > { > if (rec_size == 0) break; > if (bif_flag) > do_float(bif_fd, (double)(rec_size/1024), bif_row, bif_column++); > > > > if(!silent) printf(" %c%lld%c",042,rec_size/1024,042); > > } > if(!silent) printf("\n"); > if (bif_flag) > { > bif_column=0; > bif_row++; > } > > current_file_size = report_array[0][0]; > if (bif_flag) > { > do_float(bif_fd, (double)(current_file_size), bif_row, bif_column++); > } > > > > if(!silent) printf("%c%lld%c ",042,current_file_size,042); > > for (i = 0; i <= max_y; i++) { > if (report_array[0][i] != current_file_size) { > if(!silent) printf("\n"); > current_file_size = report_array[0][i]; > if (bif_flag) > { > bif_row++; > bif_column=0; > do_float(bif_fd, (double)(current_file_size), bif_row, bif_column++); > } > > > > if(!silent) printf("%c%lld%c ",042,current_file_size,042); > > } > if (bif_flag) > do_float(bif_fd, (double)(runtimes [who][i].cpuutil), bif_row, bif_column++); > if(!silent) printf(" %6.2f", runtimes [who][i].cpuutil); > } > if(!silent) printf("\n"); > if (bif_flag) > { > bif_row++; > bif_column=0; > } >} > > > > > > >void dump_cputimes(void) > > > >{ > bif_row++; > bif_column = 0; > > if ((!include_tflag) || (include_mask & (long long)(1 << 0))) { > if(bif_flag) > do_label(bif_fd, "Writer CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cWriter CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(2); > if(bif_flag) > do_label(bif_fd, "Re-writer CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-writer CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(3); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 1))) { > if(bif_flag) > do_label(bif_fd, "Reader CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cReader CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(4); > if(bif_flag) > do_label(bif_fd, "Re-reader CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-Reader CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(5); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 2))) { > if(bif_flag) > do_label(bif_fd, "Random Read CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRandom read CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(6); > if(bif_flag) > do_label(bif_fd, "Random Write CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRandom write CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(7); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 3))) { > if(bif_flag) > do_label(bif_fd, "Backward Read CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cBackward read CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(8); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 4))) { > if(bif_flag) > do_label(bif_fd, "Record Rewrite CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRecord rewrite CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(9); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 5))) { > if(bif_flag) > do_label(bif_fd, "Stride Read CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cStride read CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(10); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 6))) { > if(bif_flag) > do_label(bif_fd, "Fwrite CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cFwrite CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(11); > if(bif_flag) > do_label(bif_fd, "Re-fwrite CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-Fwrite CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(12); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 7))) { > if(bif_flag) > do_label(bif_fd, "Fread CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cFread CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(13); > if(bif_flag) > do_label(bif_fd, "Re-fread CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-Fread CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(14); > } > > > if(Eflag) > { > if ((!include_tflag) || (include_mask & (long long)(1 << 9))) { > if(bif_flag) > do_label(bif_fd, "Pwrite CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cPwrite CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(15); > if(bif_flag) > do_label(bif_fd, "Re-pwrite CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-Pwrite CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(16); > } > > if ((!include_tflag) || (include_mask & (long long)(1 << 10))) { > if(bif_flag) > do_label(bif_fd, "Pread CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cPread CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(17); > if(bif_flag) > do_label(bif_fd, "Re-pread CPU utilization report (Zero values should be ignored)", bif_row++, bif_column); > if(!silent) printf("\n%cRe-Pread CPU utilization report (Zero values should be ignored)%c\n",042,042); > dump_times(18); > } ># 10297 "iozone.c" > } > >} > > > > > >char * >alloc_mem(long long size, int shared_flag) > > > > > > >{ > long long size1; > char *addr,*dumb; > int shmid; > int tfd; > long long tmp; > > > > > tmp = 0; > dumb = (char *)0; > tfd=0; > size1=l_max(size,page_size); > if(!distributed) > { > if(!trflag) > { > addr=(char *)malloc((size_t)size1); > return(addr); > } > if(use_thread) > { > addr=(char *)malloc((size_t)size1); > return(addr); > } > } > if(!shared_flag) > { > addr=(char *)malloc((size_t)size1); > return(addr); > } > > size1=l_max(size,page_size); > size1=(size1 +page_size) & ~(page_size-1); > shmid=(int)shmget((key_t)(((__key_t) 0)), (size_t)size1 , (int)(01000|0666)); > if(shmid < (int)0) > { > printf("\nUnable to get shared memory segment(shmget)\n"); > > > > printf("shmid = %d, size = %lld, size1 = %d, Error %d\n",shmid,size,(size_t)size1,(*__errno_location ())); > > exit(119); > } > > > > > > > > addr = (char *)shmat((int)shmid, 0, 0); > > > > if((long)addr == (long)-1) > > { > printf("\nUnable to get shared memory segment\n"); > printf("..Error %d\n",(*__errno_location ())); > exit(120); > } > shmctl(shmid, 0, 0); > return(addr); ># 10460 "iozone.c" >} > > > > > >void Poll(long long time1) > > > > >{ > struct timeval howlong; > howlong.tv_sec=(int)(time1/100000); > howlong.tv_usec=(int)(time1%100000); > select(0, 0, 0, 0, &howlong); >} > > > > > >long long l_max(long long one,long long two) > > > > >{ > if(one > two) > return(one); > else > return(two); >} > > > > > >void Kill(long long pid,long long sig) > > > > >{ > if(!xflag) > { > > kill((pid_t)pid,(int)sig); > } >} > > > > > >long long l_min(long long num1,long long num2) > > > > >{ > if(num1 >= num2) > return num2; > else > return num1; >} > > > > > > >void >multi_throughput_test(long long mint,long long maxt) > > > > >{ > long long i; > for(i=mint;i<=maxt;i++){ > num_child =i; > current_client_number=0; > throughput_test(); > current_x=0; > current_y++; > } > if(Rflag) > dump_throughput(); > >} > > > > > > > >void >purge_buffer_cache() > > > >{ > char command[1024]; > strcpy(command,"umount "); > strcat(command, mountname); > system(command); > strcpy(command,"mount "); > strcat(command, mountname); > system(command); >} > > > > > >void * >thread_write_test(void *x) > > > > >{ > > struct child_stats *child_stat; > double starttime1 = 0; > double temp_time; > double walltime, cputime; > double compute_val = (double)0; > float delay = (float)0; > double thread_qtime_stop,thread_qtime_start; > off64_t traj_offset; > off64_t lock_offset=0; > long long flags,traj_size; > long long w_traj_bytes_completed; > long long w_traj_ops_completed; > FILE *w_traj_fd; > int fd; > long long recs_per_buffer; > long long stopped,i; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > long long xx,xx2; > char *dummyfile [256]; > char *nbuff; > char *maddr; > char *wmaddr,*free_addr; > int anwser,bind_cpu,wval; > > > > off64_t filebytes64; > char tmpname[256]; > FILE *thread_wqfd; > > > struct cache *gc=0; > > > > > > nbuff=maddr=wmaddr=free_addr=0; > thread_qtime_stop=thread_qtime_start=0; > thread_wqfd=w_traj_fd=(FILE *)0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > if(w_traj_flag) > { > filebytes64 = w_traj_fsize; > numrecs64=w_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > w_traj_bytes_completed=w_traj_ops_completed=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > { > xx = (long long)((long)x); > } > else > { > xx=chid; > } ># 10662 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1 ) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > > > > > > if((fd = creat64(dummyfile[xx],(int)(0640)))<0) > { > perror(dummyfile[xx]); > exit(123); > } > close(fd); > if(oflag) > flags=02|010000; > else > flags=02; > > if(odsync) > flags |= 010000; > > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > if((fd = open64(dummyfile[xx],(int)((int)flags),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(125); > } ># 10746 "iozone.c" > if(async_flag) > async_init(&gc,fd,direct_flag); > > if(mmapflag) > { > maddr=(char *)initfile(fd,(filebytes64),1,0x1|0x2); > } > if(reclen < cache_size ) > { > recs_per_buffer = cache_size/reclen ; > nbuff=&nbuff[(xx%recs_per_buffer)*reclen]; > } > if(fetchon) > fetchit(nbuff,reclen); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > > if(w_traj_flag) > w_traj_fd=open_w_traj(); > > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag=1; > if(distributed && client_iozone) > tell_master_ready(chid); > if(distributed && client_iozone) > { > if(cdebug) > { > printf("Child %d waiting for go from master\n",(int)xx); > fflush(stdout); > } > wait_for_master_go(chid); > if(cdebug) > { > printf("Child %d received go from master\n",(int)xx); > fflush(stdout); > } > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > > written_so_far=0; > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->actual = 0; > child_stat->throughput = 0; > stopped=0; > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)0) != 0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_wol.dat",(int)xx); > thread_wqfd=fopen(tmpname,"a"); > if(thread_wqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds\n"); > } > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > if(w_traj_flag) > rewind(w_traj_fd); > for(i=0; i<numrecs64; i++){ > if(w_traj_flag) > { > traj_offset=get_traj(w_traj_fd, (long long *)&traj_size,(float *)&delay, (long)1); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(verify && diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > child_stat->throughput = > (time_so_far() - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput = time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } >again: > if(mmapflag) > { > wmaddr = &maddr[i*reclen]; > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (i*reclen), depth,free_addr); > } > else > async_write(gc, (long long)fd, nbuff, reclen, (i*reclen), depth); > } > else > { > wval=write(fd, nbuff, (size_t) reclen); > if(wval != reclen) > { > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > temp_time = time_so_far(); > child_stat->throughput = > (temp_time - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > goto again; > } ># 10954 "iozone.c" > printf("\nError writing block %lld, fd= %d\n", i, > fd); > > if(wval==-1) > perror("write"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(127); > } > } > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_wqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > w_traj_ops_completed++; > w_traj_bytes_completed+=reclen; > written_so_far+=reclen/1024; > if(*stop_flag) > { > written_so_far-=reclen/1024; > w_traj_bytes_completed-=reclen; > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > } > > > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)0)) > printf("Write unlock failed. %d\n",(*__errno_location ())); > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > if(!stopped){ > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > } > if(cdebug) > { > printf("Child %d: throughput %f actual %f \n",(int)chid, child_stat->throughput, > child_stat->actual); > fflush(stdout); > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(1, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > > if (debug1) { > printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n", > xx, walltime, cputime, > cpu_util(cputime, walltime)); > } > child_stat->flag = 0; > stopped=0; > > > > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)numrecs64*reclen,4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > > close(fd); > } > if(Q_flag && (thread_wqfd !=0) ) > fclose(thread_wqfd); > free(dummyfile[xx]); > if(w_traj_flag) > fclose(w_traj_fd); > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > >void * >thread_pwrite_test(void *x) > > > > >{ > > struct child_stats *child_stat; > double starttime1 = 0; > double temp_time; > double walltime, cputime; > double compute_val = (double)0; > float delay = (float)0; > double thread_qtime_stop,thread_qtime_start; > off64_t traj_offset; > off64_t lock_offset=0; > long long flags,traj_size; > long long w_traj_bytes_completed; > long long w_traj_ops_completed; > FILE *w_traj_fd; > int fd; > long long recs_per_buffer; > long long stopped,i; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > long long xx,xx2; > char *dummyfile [256]; > char *nbuff; > char *maddr; > char *wmaddr,*free_addr; > int anwser,bind_cpu,wval; > > > > off64_t filebytes64; > char tmpname[256]; > FILE *thread_wqfd; > > > struct cache *gc=0; > > > > > > nbuff=maddr=wmaddr=free_addr=0; > thread_qtime_stop=thread_qtime_start=0; > thread_wqfd=w_traj_fd=(FILE *)0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > if(w_traj_flag) > { > filebytes64 = w_traj_fsize; > numrecs64=w_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > w_traj_bytes_completed=w_traj_ops_completed=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > { > xx = (long long)((long)x); > } > else > { > xx=chid; > } ># 11200 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1 ) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > > > > > > if((fd = creat64(dummyfile[xx],(int)(0640)))<0) > { > perror(dummyfile[xx]); > exit(123); > } > close(fd); > if(oflag) > flags=02|010000; > else > flags=02; > > if(odsync) > flags |= 010000; > > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > if((fd = open64(dummyfile[xx],(int)((int)flags),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(125); > } ># 11284 "iozone.c" > if(async_flag) > async_init(&gc,fd,direct_flag); > > if(mmapflag) > { > maddr=(char *)initfile(fd,(filebytes64),1,0x1|0x2); > } > if(reclen < cache_size ) > { > recs_per_buffer = cache_size/reclen ; > nbuff=&nbuff[(xx%recs_per_buffer)*reclen]; > } > if(fetchon) > fetchit(nbuff,reclen); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > > if(w_traj_flag) > w_traj_fd=open_w_traj(); > > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag=1; > if(distributed && client_iozone) > tell_master_ready(chid); > if(distributed && client_iozone) > { > if(cdebug) > { > printf("Child %d waiting for go from master\n",(int)xx); > fflush(stdout); > } > wait_for_master_go(chid); > if(cdebug) > { > printf("Child %d received go from master\n",(int)xx); > fflush(stdout); > } > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > > written_so_far=0; > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->actual = 0; > child_stat->throughput = 0; > stopped=0; > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)0) != 0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_pwol.dat",(int)xx); > thread_wqfd=fopen(tmpname,"a"); > if(thread_wqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds\n"); > } > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > if(w_traj_flag) > rewind(w_traj_fd); > for(i=0; i<numrecs64; i++){ > traj_offset= ( i * reclen ); > if(w_traj_flag) > { > traj_offset=get_traj(w_traj_fd, (long long *)&traj_size,(float *)&delay, (long)1); > reclen=traj_size; > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(verify && diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > child_stat->throughput = > (time_so_far() - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput = time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } >again: > if(mmapflag) > { > wmaddr = &maddr[traj_offset]; > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (traj_offset), depth,free_addr); > } > else > async_write(gc, (long long)fd, nbuff, reclen, (traj_offset), depth); > } > else > { > wval=pwrite64(fd,nbuff,(size_t)(reclen),(off64_t)(traj_offset)); > if(wval != reclen) > { > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > temp_time = time_so_far(); > child_stat->throughput = > (temp_time - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > goto again; > } ># 11488 "iozone.c" > printf("\nError pwriting block %lld, fd= %d\n", i, > fd); > > if(wval==-1) > perror("pwrite"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(127); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_wqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > w_traj_ops_completed++; > w_traj_bytes_completed+=reclen; > written_so_far+=reclen/1024; > if(*stop_flag) > { > written_so_far-=reclen/1024; > w_traj_bytes_completed-=reclen; > } > } > > > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)0)) > printf("Write unlock failed. %d\n",(*__errno_location ())); > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > if(!stopped){ > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > } > if(cdebug) > { > printf("Child %d: throughput %f actual %f \n",(int)chid, child_stat->throughput, > child_stat->actual); > fflush(stdout); > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(10, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > > if (debug1) { > printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n", > xx, walltime, cputime, > cpu_util(cputime, walltime)); > } > child_stat->flag = 0; > stopped=0; > > > > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)numrecs64*reclen,4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > > close(fd); > } > if(Q_flag && (thread_wqfd !=0) ) > fclose(thread_wqfd); > free(dummyfile[xx]); > if(w_traj_flag) > fclose(w_traj_fd); > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > >void * >thread_rwrite_test(void *x) > > > > >{ > > > > struct child_stats *child_stat; > long long xx,xx2; > double compute_val = (double)0; > double walltime, cputime; > float delay = (float)0; > double thread_qtime_stop,thread_qtime_start; > off64_t traj_offset; > off64_t lock_offset=0; > long long w_traj_bytes_completed; > long long w_traj_ops_completed; > int fd; > FILE *w_traj_fd; > long long flags = 0; > double starttime1 = 0; > double temp_time; > long long recs_per_buffer,traj_size; > long long i; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far=0; > char *dummyfile [256]; > char *nbuff; > char *maddr,*free_addr; > char *wmaddr; > int anwser,bind_cpu,wval; > FILE *thread_rwqfd; > char tmpname[256]; > > > > > struct cache *gc=0; > > > > > > wmaddr=nbuff=maddr=free_addr=0; > thread_rwqfd=w_traj_fd=(FILE *)0; > traj_offset=thread_qtime_stop=thread_qtime_start=0; > walltime=cputime=0; > anwser=bind_cpu=0; > w_traj_bytes_completed=w_traj_ops_completed=0; > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > if(w_traj_flag) > { > filebytes64 = w_traj_fsize; > numrecs64=w_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > > > > if(use_thread) > xx=(long long)((long)x); > else > { > xx=chid; > } ># 11732 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > flags = 02; > if(oflag) > flags|= 010000; > > if(odsync) > flags|= 010000; > > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > > if((fd = open64(dummyfile[xx],(int)((int)flags),(int)(0)))<0) > { > > > > printf("\nChild %lld\n",xx); > > child_stat->flag = 0; > perror(dummyfile[xx]); > exit(128); > } ># 11812 "iozone.c" > if(async_flag) > async_init(&gc,fd,direct_flag); > > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),1,0x1|0x2); > } > if(fetchon) > fetchit(nbuff,reclen); > if(w_traj_flag) > w_traj_fd=open_w_traj(); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_rwol.dat",(int)xx); > thread_rwqfd=fopen(tmpname,"a"); > if(thread_rwqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_rwqfd,"Offset in Kbytes Latency in microseconds\n"); > } > child_stat->flag = 1; > if(distributed && client_iozone) > tell_master_ready(chid); > if(distributed && client_iozone) > { > if(cdebug) > printf("Child %d waiting for go from master\n",(int)xx); > wait_for_master_go(chid); > if(cdebug) > printf("Child %d received go from master\n",(int)xx); > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)0) != 0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > if(w_traj_flag) > rewind(w_traj_fd); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > for(i=0; i<numrecs64; i++){ > traj_offset= i*reclen ; > if(w_traj_flag) > { > traj_offset=get_traj(w_traj_fd, (long long *)&traj_size,(float *)&delay,(long)1); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag && !mmapflag) > { > if(debug1) > printf("\nStop_flag 1\n"); > break; > } > if(verify && diag_v) > { > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > } > if(async_flag && no_copy_flag) > { > free_addr=buffer=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,i); > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[i*reclen]; > if(cdebug) >printf("Chid: %lld Rewriting offset %lld for length of %lld\n",chid, i*reclen,reclen); > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (i*reclen), depth,free_addr); > else > async_write(gc, (long long)fd, nbuff, reclen, (i*reclen), depth); > } > else > { > wval=write(fd, nbuff, (size_t) reclen); > if(wval != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\nStop_flag 2\n"); > break; > } > > > > > printf("\nError writing block %lld, fd= %d\n", i, > fd); > > if(wval==-1) > perror("write"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > signal_handler(); > } > } > } > re_written_so_far+=reclen/1024; > w_traj_ops_completed++; > w_traj_bytes_completed+=reclen; > if(*stop_flag) > { > re_written_so_far-=reclen/1024; > w_traj_bytes_completed-=reclen; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_rwqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > } > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)0)) > printf("Write unlock failed. %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > temp_time=time_so_far(); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > re_written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)re_written_so_far/child_stat->throughput; > child_stat->actual = (double)re_written_so_far; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cdebug) > printf("Child %d: throughput %f actual %f \n",(int)chid, child_stat->throughput, > child_stat->actual); > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(2, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > mmap_end(maddr,(unsigned long long)filebytes64); > } > else > fsync(fd); > close(fd); > } > free(dummyfile[xx]); > > if(Q_flag && (thread_rwqfd !=0) ) > fclose(thread_rwqfd); > > if(w_traj_flag) > fclose(w_traj_fd); > if(debug1) > > > > printf("\nChild Stopping %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > >void * >thread_read_test(void *x) > > > > >{ > long long xx,xx2; > struct child_stats *child_stat; > double walltime, cputime; > long long r_traj_bytes_completed; > long long r_traj_ops_completed; > int fd; > FILE *r_traj_fd,*thread_rqfd; > long long flags = 0; > off64_t traj_offset; > off64_t lock_offset=0; > double starttime1 = 0; > float delay = 0; > double temp_time; > double thread_qtime_start,thread_qtime_stop; > double compute_val = (double)0; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > long long recs_per_buffer,traj_size; > off64_t i; > char *dummyfile[256]; > char *nbuff=0; > char *maddr=0; > char *wmaddr=0; > char tmpname[256]; > __volatile__ char *buffer1; > int anwser,bind_cpu; > > > > > struct cache *gc=0; > > > > > thread_rqfd=r_traj_fd=(FILE *)0; > traj_offset=thread_qtime_stop=thread_qtime_start=0; > walltime=cputime=0; > anwser=bind_cpu=0; > r_traj_bytes_completed=r_traj_ops_completed=0; > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > if(r_traj_flag) > { > filebytes64 = r_traj_fsize; > numrecs64=r_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 12175 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > flags=00|010000; > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > if((fd = open64(dummyfile[xx],(int)((int)flags),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(130); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 12229 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),0,0x1); > } > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > > > > if(Q_flag) > { > sprintf(tmpname,"Child_%d_rol.dat",(int)xx); > thread_rqfd=fopen(tmpname,"a"); > if(thread_rqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_rqfd,"Offset in Kbytes Latency in microseconds\n"); > } > > if(r_traj_flag) > r_traj_fd=open_r_traj(); > if(fetchon) > fetchit(nbuff,reclen); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > > while(child_stat->flag!=2) > Poll((long long)1); > } > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1) != 0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > > if(r_traj_flag) > rewind(r_traj_fd); > for(i=0; i<numrecs64; i++){ > traj_offset= i*reclen; > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(r_traj_flag) > { > traj_offset=get_traj(r_traj_fd, (long long *)&traj_size,(float *)&delay,(long)0); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[i*reclen]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (i*reclen), reclen, > 1LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (i*reclen), reclen, > 1LL,(numrecs64*reclen),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > > > > > printf("\nError reading block %lld, fd= %d\n", i, > fd); > > perror("read"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(132); > } > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(133); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(134); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > read_so_far+=reclen/1024; > r_traj_bytes_completed+=reclen; > r_traj_ops_completed++; > if(*stop_flag) > { > read_so_far-=reclen/1024; > r_traj_bytes_completed-=reclen; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_rqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > } > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)1)) > printf("Read unlock failed. %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > temp_time = time_so_far(); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > read_so_far=r_traj_ops_completed; > } > child_stat->throughput = read_so_far/child_stat->throughput; > child_stat->actual = read_so_far; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cdebug) > printf("Child %d: throughput %f actual %f \n",(int)chid,child_stat->throughput, > child_stat->actual); > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(3, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > mmap_end(maddr,(unsigned long long)filebytes64); > }else > fsync(fd); > close(fd); > } > if(Q_flag && (thread_rqfd !=0) ) > fclose(thread_rqfd); > free(dummyfile[xx]); > if(r_traj_flag) > fclose(r_traj_fd); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > >void * >thread_pread_test(void *x) > > > > >{ > long long xx,xx2; > struct child_stats *child_stat; > double walltime, cputime; > long long r_traj_bytes_completed; > long long r_traj_ops_completed; > int fd; > FILE *r_traj_fd,*thread_rqfd; > long long flags = 0; > off64_t traj_offset; > off64_t lock_offset=0; > double starttime1 = 0; > float delay = 0; > double temp_time; > double thread_qtime_start,thread_qtime_stop; > double compute_val = (double)0; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > long long recs_per_buffer,traj_size; > off64_t i; > char *dummyfile[256]; > char *nbuff=0; > char *maddr=0; > char *wmaddr=0; > char tmpname[256]; > __volatile__ char *buffer1; > int anwser,bind_cpu; > > > > > struct cache *gc=0; > > > > > thread_rqfd=r_traj_fd=(FILE *)0; > traj_offset=thread_qtime_stop=thread_qtime_start=0; > walltime=cputime=0; > anwser=bind_cpu=0; > r_traj_bytes_completed=r_traj_ops_completed=0; > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > if(r_traj_flag) > { > filebytes64 = r_traj_fsize; > numrecs64=r_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 12608 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > flags=00|010000; > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > if((fd = open64(dummyfile[xx],(int)((int)flags),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(130); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 12662 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),0,0x1); > } > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > > > > if(Q_flag) > { > sprintf(tmpname,"Child_%d_prol.dat",(int)xx); > thread_rqfd=fopen(tmpname,"a"); > if(thread_rqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_rqfd,"Offset in Kbytes Latency in microseconds\n"); > } > > if(r_traj_flag) > r_traj_fd=open_r_traj(); > if(fetchon) > fetchit(nbuff,reclen); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > > while(child_stat->flag!=2) > Poll((long long)1); > } > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1) != 0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > > if(r_traj_flag) > rewind(r_traj_fd); > for(i=0; i<numrecs64; i++){ > traj_offset = i*reclen; > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(r_traj_flag) > { > traj_offset=get_traj(r_traj_fd, (long long *)&traj_size,(float *)&delay,(long)0); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[traj_offset]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (i*reclen), reclen, > 1LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (traj_offset), reclen, > 1LL,(numrecs64*reclen),depth); > } > else > { > if(pread64((int)fd,(void*)nbuff,(size_t)((size_t) reclen),(off64_t)((traj_offset))) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > > > > > printf("\nError preading block %lld, fd= %d\n", i, > fd); > > perror("pread"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(132); > } > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(133); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(134); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > read_so_far+=reclen/1024; > r_traj_bytes_completed+=reclen; > r_traj_ops_completed++; > if(*stop_flag) > { > read_so_far-=reclen/1024; > r_traj_bytes_completed-=reclen; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_rqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > } > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)1)) > printf("Read unlock failed. %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > temp_time = time_so_far(); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > read_so_far=r_traj_ops_completed; > } > child_stat->throughput = read_so_far/child_stat->throughput; > child_stat->actual = read_so_far; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cdebug) > printf("Child %d: throughput %f actual %f \n",(int)chid,child_stat->throughput, > child_stat->actual); > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(3, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > mmap_end(maddr,(unsigned long long)filebytes64); > }else > fsync(fd); > close(fd); > } > if(Q_flag && (thread_rqfd !=0) ) > fclose(thread_rqfd); > free(dummyfile[xx]); > if(r_traj_flag) > fclose(r_traj_fd); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > >void * >thread_rread_test(void *x) > > > > >{ > long long xx,xx2; > char *nbuff; > struct child_stats *child_stat; > int fd; > FILE *r_traj_fd,*thread_rrqfd; > long long r_traj_bytes_completed; > double walltime, cputime; > long long r_traj_ops_completed; > off64_t traj_offset; > off64_t lock_offset=0; > long long flags = 0; > double starttime1 = 0; > float delay = 0; > double temp_time; > double thread_qtime_start,thread_qtime_stop; > double compute_val = (double)0; > long long recs_per_buffer,traj_size; > off64_t i; > off64_t written_so_far, read_so_far, re_written_so_far, > re_read_so_far; > char *dummyfile[256]; > char *maddr=0; > char *wmaddr=0; > __volatile__ char *buffer1; > int anwser,bind_cpu; > char tmpname[256]; > > > > > struct cache *gc=0; > > > > > > > thread_qtime_stop=thread_qtime_start=0; > thread_rrqfd=r_traj_fd=(FILE *)0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > r_traj_bytes_completed=r_traj_ops_completed=0; > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > > > > if(r_traj_flag) > { > filebytes64 = r_traj_fsize; > numrecs64=r_traj_ops; > } > else > { > filebytes64 = numrecs64*reclen; > } > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 13043 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > flags=00|010000; > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > > if((fd = open64(dummyfile[xx],(int)(((int)flags)),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(135); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 13114 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(filebytes64),0,0x1); > } > if(r_traj_flag) > r_traj_fd=open_r_traj(); > if(fetchon) > fetchit(nbuff,reclen); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_rrol.dat",(int)xx); > thread_rrqfd=fopen(tmpname,"a"); > if(thread_rrqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_rrqfd,"Offset in Kbytes Latency in microseconds\n"); > } > > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag = 1; > > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > > > while(child_stat->flag!=2) > Poll((long long)1); > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1) != 0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > > if(r_traj_flag) > rewind(r_traj_fd); > for(i=0; i<numrecs64; i++){ > traj_offset=i*reclen; > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(r_traj_flag) > { > traj_offset=get_traj(r_traj_fd, (long long *)&traj_size,(float *)&delay,(long)0); > reclen=traj_size; > lseek64(fd,(off64_t)(traj_offset),0); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 3\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[i*reclen]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (i*reclen),reclen, > 1LL,(filebytes64),depth); > else > async_read(gc, (long long)fd, nbuff, (i*reclen),reclen, > 1LL,(filebytes64),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 4\n", (long)xx); > break; > } > > > > > printf("\nError writing block %lld, fd= %d\n", i, > fd); > > perror("read"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(137); > } > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(138); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)i,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(139); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > re_read_so_far+=reclen/1024; > r_traj_bytes_completed+=reclen; > r_traj_ops_completed++; > if(*stop_flag) > { > re_read_so_far-=reclen/1024; > r_traj_bytes_completed-=reclen; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_rrqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > } > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)1)) > printf("Read unlock failed. %d\n",(*__errno_location ())); > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)filebytes64); > } > close(fd); > } > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > re_read_so_far=r_traj_ops_completed; > } > child_stat->throughput = re_read_so_far/child_stat->throughput; > child_stat->actual = re_read_so_far; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > { > tell_master_stats(4,chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > } > child_stat->flag = 0; > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(filebytes64),4); > mmap_end(maddr,(unsigned long long)filebytes64); > }else > fsync(fd); > close(fd); > } > if(Q_flag && (thread_rrqfd !=0) ) > fclose(thread_rrqfd); > free(dummyfile[xx]); > if(r_traj_flag) > fclose(r_traj_fd); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > >void * >thread_reverse_read_test(void *x) > > > > >{ > long long xx,xx2; > char *nbuff; > struct child_stats *child_stat; > int fd; > long long flags = 0; > double walltime, cputime; > double thread_qtime_stop,thread_qtime_start; > double starttime2 = 0; > float delay = 0; > double temp_time; > double compute_val = (double)0; > long long recs_per_buffer; > off64_t i,t_offset; > off64_t lock_offset=0; > off64_t current_position=0; > off64_t written_so_far, reverse_read, re_read_so_far,read_so_far; > char *dummyfile[256]; > char *maddr=0; > char *wmaddr=0; > __volatile__ char *buffer1; > int anwser,bind_cpu; > off64_t traj_offset; > char tmpname[256]; > FILE *thread_revqfd=0; > > > > > struct cache *gc=0; > > > > > > > thread_qtime_stop=thread_qtime_start=0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > written_so_far=read_so_far=reverse_read=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 13460 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > flags=00|010000; > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > > if((fd = open64(dummyfile[xx],(int)(((int)flags)),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(140); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 13531 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),0,0x1); > } > if(fetchon) > fetchit(nbuff,reclen); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_revol.dat",(int)xx); > thread_revqfd=fopen(tmpname,"a"); > if(thread_revqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_revqfd,"Offset in Kbytes Latency in microseconds\n"); > } > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > starttime2 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime2; > cputime = cputime_so_far(); > } > > t_offset = (off64_t)reclen; > if (!(h_flag || k_flag || mmapflag)) > { > if((lseek64(fd,(off64_t)(-t_offset),2))<0) > { > perror("lseek"); > exit(142); > }; > } > current_position=(reclen*numrecs64)-reclen; > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1)!=0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > for(i=0; i<numrecs64; i++) > { > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 3\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[current_position]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (current_position), > reclen, -1LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (current_position),reclen, > -1LL,(numrecs64*reclen),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 4\n", (long)xx); > break; > } > > > > printf("\nError reading block %lld\n", i); > > perror("read"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(144); > } > } > } > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)(current_position/reclen),reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(145); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)(current_position/reclen),reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(146); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > current_position+=reclen; > if(async_flag && no_copy_flag) > async_release(gc); > t_offset = (off64_t)reclen*2; > if (!(h_flag || k_flag || mmapflag)) > { > lseek64(fd,(off64_t)(-t_offset),1); > } > current_position-=(2 *reclen); > reverse_read +=reclen/1024; > if(*stop_flag) > { > reverse_read -=reclen/1024; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_revqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > } > if(file_lock) > if(mylockf((int) fd,(int)0, (int)1)) > printf("Read unlock failed %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > } > close(fd); > } > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime2)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(OPS_flag){ > reverse_read=(reverse_read*1024)/reclen; > } > child_stat->throughput = reverse_read/child_stat->throughput; > child_stat->actual = reverse_read; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(8, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > close(fd); > } > free(dummyfile[xx]); > if(Q_flag && (thread_revqfd !=0) ) > fclose(thread_revqfd); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > >void * >thread_stride_read_test(void *x) > > > > >{ > long long xx,xx2; > char *nbuff=0; > struct child_stats *child_stat; > double walltime, cputime; > int fd; > long long flags = 0; > double thread_qtime_stop,thread_qtime_start; > double starttime2 = 0; > float delay = 0; > double compute_val = (double)0; > double temp_time; > long long recs_per_buffer; > off64_t i; > off64_t lock_offset=0; > off64_t savepos64=0; > off64_t written_so_far, stride_read,re_read_so_far,read_so_far; > off64_t stripewrap = 0; > off64_t current_position = 0; > char *dummyfile[256]; > char *maddr=0; > char *wmaddr=0; > __volatile__ char *buffer1; > int anwser,bind_cpu; > off64_t traj_offset; > char tmpname[256]; > FILE *thread_strqfd=0; > > > > > struct cache *gc=0; > > > > > > > thread_qtime_stop=thread_qtime_start=0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > written_so_far=read_so_far=stride_read=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 13869 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > flags=00|010000; > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > if(direct_flag) > flags |=040000; > > > > > > > > if((fd = open64(dummyfile[xx],(int)(((int)flags)),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(147); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 13940 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),0,0x1); > } > if(fetchon) > fetchit(nbuff,reclen); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_strol.dat",(int)xx); > thread_strqfd=fopen(tmpname,"a"); > if(thread_strqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_strqfd,"Offset in Kbytes Latency in microseconds\n"); > } > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > > > while(child_stat->flag!=2) > Poll((long long)1); > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1)!=0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > starttime2 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime2; > cputime = cputime_so_far(); > } > for(i=0; i<numrecs64; i++){ > if(disrupt_flag && ((i%100)==0)) > { > disrupt(fd); > } > if(compute_flag) > compute_val+=do_compute(delay); > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 3\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } > if(verify) > savepos64=current_position/(off64_t)reclen; > if(mmapflag) > { > wmaddr = &maddr[current_position]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (current_position), > reclen, stride,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (current_position),reclen, > stride,(numrecs64*reclen),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t) reclen) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 4\n", (long)xx); > break; > } > > > > printf("\nError reading block %lld, fd= %d\n", i, fd); > > perror("read"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(149); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > current_position+=reclen; > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)savepos64,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(150); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)savepos64,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(151); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > if(current_position + (stride * reclen) >= (numrecs64 * reclen)-reclen) > { > current_position=0; > > stripewrap++; > > if(numrecs64 <= stride) > { > current_position=0; > } > else > { > current_position = (off64_t)((stripewrap)%numrecs64)*reclen; > } > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_position),0)<0) > { > perror("lseek"); > exit(152); > } > } > } > else > { > current_position+=(stride*reclen)-reclen; > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_position),0)<0) > { > perror("lseek"); > exit(154); > }; > } > } > stride_read +=reclen/1024; > if(*stop_flag) > { > stride_read -=reclen/1024; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_strqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > } > if(file_lock) > if(mylockf((int) fd,(int)0,(int)1)) > printf("Read unlock failed %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > } > close(fd); > } > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime2)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(OPS_flag){ > stride_read=(stride_read*1024)/reclen; > } > child_stat->throughput = stride_read/child_stat->throughput; > child_stat->actual = stride_read; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > { > tell_master_stats(5,chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > } > child_stat->flag = 0; > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > close(fd); > } > if(Q_flag && (thread_strqfd !=0) ) > fclose(thread_strqfd); > free(dummyfile[xx]); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > >void * >thread_mix_test(void *x) > > > > >{ > int selector; > int slots[1000]; > int i,which; > long xx; > > > > > if(use_thread) > { > xx = (long)x; > } > else > { > xx=(long)chid; > } > > if(pct_read!=0) > { > srand((unsigned int)((xx+1)*100)); > if(cdebug) printf("Child: %d Pct read %d \n",(int)xx,pct_read); > for(i=0;i<1000;i++) > { > if(i<(pct_read*10)) > slots[i]=0; > else > slots[i]=1; > } > which=rand()%1000; > if(cdebug) printf("Child: %d Pct which %d\n",(int)xx, which); > selector=slots[which]; > } > else > { > > selector= ((int)xx) % 2; > } > if(selector==0) > { > if(cdebug || mdebug) printf("Mix read %d\n",selector); > thread_ranread_test(x); > } > else > { > if(cdebug || mdebug) printf("Mix write %d\n",selector); > thread_ranwrite_test(x); > } > return(0); >} > > > > >void * >thread_ranread_test(void *x) > > > > >{ > long long xx,xx2; > struct child_stats *child_stat; > double walltime, cputime; > int fd; > long long flags = 0; > double thread_qtime_stop,thread_qtime_start; > double starttime1 = 0; > float delay = 0; > double temp_time; > double compute_val = (double)0; > off64_t written_so_far, ranread_so_far, re_written_so_far,re_read_so_far; > long long recs_per_buffer; > off64_t current_offset=0; > off64_t i; > char *dummyfile[256]; > char *nbuff=0; > char *maddr=0; > char *wmaddr=0; > __volatile__ char *buffer1; > int anwser,bind_cpu; > off64_t traj_offset; > off64_t lock_offset=0; > char tmpname[256]; > FILE *thread_randrfd=0; > > > > long long save_pos; > > > > > > struct cache *gc=0; > > > > > thread_qtime_stop=thread_qtime_start=0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > written_so_far=ranread_so_far=re_written_so_far=re_read_so_far=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } ># 14361 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); > > if(oflag) > { > flags=00|010000; > } > else > flags=00; > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > > if((fd = open64(dummyfile[xx],(int)(((int)flags)),(int)(0)))<0) > { > perror(dummyfile[xx]); > exit(156); > } > > if(async_flag) > async_init(&gc,fd,direct_flag); ># 14420 "iozone.c" > if(mmapflag) > { > maddr=(char *)initfile(fd,(numrecs64*reclen),0,0x1); > } > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > if(debug1) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > > > > if(fetchon) > fetchit(nbuff,reclen); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_randrol.dat",(int)xx); > thread_randrfd=fopen(tmpname,"a"); > if(thread_randrfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_randrfd,"Offset in Kbytes Latency in microseconds\n"); > } > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > > > > > > > > srand48(0); > > > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)1)!=0) > printf("File lock for read failed. %d\n",(*__errno_location ())); > for(i=0; i<numrecs64; i++) { > if(compute_flag) > compute_val+=do_compute(delay); > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > if(purge) > purgeit(nbuff,reclen); ># 14515 "iozone.c" > current_offset = reclen * (lrand48()%numrecs64); > > > > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_offset),0)<0) > { > perror("lseek"); > exit(158); > }; > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)1, > lock_offset, reclen); > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > thread_qtime_start=time_so_far(); > } > if(mmapflag) > { > wmaddr = &maddr[current_offset]; > fill_area((long long*)wmaddr,(long long*)nbuff,(long long)reclen); > } > else > { > if(async_flag) > { > if(no_copy_flag) > async_read_no_copy(gc, (long long)fd, &buffer1, (current_offset), > reclen, 0LL,(numrecs64*reclen),depth); > else > async_read(gc, (long long)fd, nbuff, (current_offset), reclen, > 0LL,(numrecs64*reclen),depth); > } > else > { > if(read((int)fd, (void*)nbuff, (size_t)reclen) != reclen) > { > if(*stop_flag) > { > if(debug1) > printf("\n(%ld) Stopped by another 2\n", (long)xx); > break; > } > > > > > printf("\nError reading block at %lld\n", > offset); > > perror("ranread"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(160); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)1, > lock_offset, reclen); > } > save_pos=current_offset/reclen; > current_offset+=reclen; > if(verify){ > if(async_flag && no_copy_flag) > { > if(verify_buffer(buffer1,reclen,(off64_t)save_pos,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(161); > } > } > else > { > if(verify_buffer(nbuff,reclen,(off64_t)save_pos,reclen,(long long)pattern,sverify)){ > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(162); > } > } > } > if(async_flag && no_copy_flag) > async_release(gc); > ranread_so_far+=reclen/1024; > if(*stop_flag) > { > ranread_so_far-=reclen/1024; > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_randrfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > } > if(file_lock) > if(mylockf((int) fd,(int)0,(int)1)) > printf("Read unlock failed %d\n",(*__errno_location ())); > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(include_flush) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > }else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > { > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > } > close(fd); > } > temp_time = time_so_far(); > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > if(OPS_flag){ > ranread_so_far=(ranread_so_far*1024)/reclen; > } > child_stat->throughput = ranread_so_far/child_stat->throughput; > child_stat->actual = ranread_so_far; > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > if(cdebug) > printf("Child %d: throughput %f actual %f \n",(int)chid,child_stat->throughput, > child_stat->actual); > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(6, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)(numrecs64*reclen),4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > close(fd); > } > if(Q_flag && (thread_randrfd !=0) ) > fclose(thread_randrfd); > free(dummyfile[xx]); > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > >void * >thread_ranwrite_test(void *x) > > > > >{ > > struct child_stats *child_stat; > double starttime1 = 0; > double temp_time; > double walltime, cputime; > double compute_val = (double)0; > float delay = (double)0; > double thread_qtime_stop,thread_qtime_start; > off64_t traj_offset; > off64_t current_offset=0; > long long flags; > long long w_traj_bytes_completed; > long long w_traj_ops_completed; > int fd; > long long recs_per_buffer; > long long stopped,i; > off64_t written_so_far, read_so_far, re_written_so_far,re_read_so_far; > long long xx,xx2; > char *dummyfile [256]; > char *nbuff=0; > char *maddr=0; > char *wmaddr=0; > char *free_addr=0; > int anwser,bind_cpu,wval; > off64_t filebytes64; > off64_t lock_offset=0; > char tmpname[256]; > FILE *thread_randwqfd=0; ># 14771 "iozone.c" > struct cache *gc=0; > > > > > > thread_qtime_stop=thread_qtime_start=0; > traj_offset=walltime=cputime=0; > anwser=bind_cpu=0; > filebytes64 = numrecs64*reclen; > written_so_far=read_so_far=re_written_so_far=re_read_so_far=0; > w_traj_bytes_completed=w_traj_ops_completed=0; > recs_per_buffer = cache_size/reclen ; > > > > if(use_thread) > { > xx = (long long)((long)x); > } > else > { > xx=chid; > } ># 14807 "iozone.c" > if(use_thread) > nbuff=barray[xx]; > else > nbuff=buffer; > if(debug1 ) > { > if(use_thread) > > > > printf("\nStarting child %lld\n",xx); > > else > > > > printf("\nStarting process %d slot %lld\n",getpid(),xx); > > > } > dummyfile[xx]=(char *)malloc((size_t)1000); > xx2=xx; > if(share_file) > xx2=(long long)0; > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],xx2); ># 14849 "iozone.c" > if(oflag) > flags=02|010000; > else > flags=02; > > if(odsync) > flags |= 010000; > > > if(read_sync) > flags |=010000|010000; > > > > > if(direct_flag) > flags |=040000; > > > > > > > if((fd = open64(dummyfile[xx],(int)(((int)flags)),(int)(0)))<0) > { > printf("\nCan not open temp file: %s\n", > filename); > perror("open"); > exit(125); > } ># 14893 "iozone.c" > if(async_flag) > async_init(&gc,fd,direct_flag); > > if(mmapflag) > { > maddr=(char *)initfile(fd,(filebytes64),1,0x1|0x2); > } > if(reclen < cache_size ) > { > recs_per_buffer = cache_size/reclen ; > nbuff=&nbuff[(xx%recs_per_buffer)*reclen]; > } > if(fetchon) > fetchit(nbuff,reclen); > > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->throughput = 0; > child_stat->actual = 0; > child_stat->flag=1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > written_so_far=0; > child_stat = (struct child_stats *)&shmaddr[xx]; > child_stat->actual = 0; > child_stat->throughput = 0; > stopped=0; > if(file_lock) > if(mylockf((int) fd, (int) 1, (int)0) != 0) > printf("File lock for write failed. %d\n",(*__errno_location ())); > if(Q_flag) > { > sprintf(tmpname,"Child_%d_randwol.dat",(int)xx); > thread_randwqfd=fopen(tmpname,"a"); > if(thread_randwqfd==0) > { > printf("Unable to open %s\n",tmpname); > exit(40); > } > fprintf(thread_randwqfd,"Offset in Kbytes Latency in microseconds\n"); > } > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)0); > starttime1 = time_so_far(); > if(cpuutilflag) > { > walltime = starttime1; > cputime = cputime_so_far(); > } > for(i=0; i<numrecs64; i++){ > if(compute_flag) > compute_val+=do_compute(delay); ># 14966 "iozone.c" > current_offset = reclen * (lrand48()%numrecs64); > > > > if (!(h_flag || k_flag || mmapflag)) > { > if(lseek64(fd,(off64_t)(current_offset),0)<0) > { > perror("lseek"); > exit(158); > }; > } > if(Q_flag) > { > traj_offset=lseek64(fd,(off64_t)(0),1); > thread_qtime_start=time_so_far(); > } > if(rlocking) > { > lock_offset=lseek64(fd,(off64_t)(0),1); > mylockr((int) fd, (int) 1, (int)0, > lock_offset, reclen); > } > if(verify & diag_v) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)(current_offset/reclen)); > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > child_stat->throughput = > (time_so_far() - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput = time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > } > if(purge) > purgeit(nbuff,reclen); > if(Q_flag) > { > thread_qtime_start=time_so_far(); > } >again: > if(mmapflag) > { > wmaddr = &maddr[current_offset]; > fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen); > if(!mmapnsflag) > { > if(mmapasflag) > msync(wmaddr,(size_t)reclen,1); > if(mmapssflag) > msync(wmaddr,(size_t)reclen,4); > } > } > else > { > if(async_flag) > { > if(no_copy_flag) > { > free_addr=nbuff=(char *)malloc((size_t)reclen+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > if(verify) > fill_buffer(nbuff,reclen,(long long)pattern,sverify,(long long)(current_offset/reclen)); > async_write_no_copy(gc, (long long)fd, nbuff, reclen, (current_offset), depth,free_addr); > } > else > async_write(gc, (long long)fd, nbuff, reclen, current_offset, depth); > } > else > { > wval = write(fd, nbuff, (size_t) reclen); > if(wval != reclen) > { > if(*stop_flag && !stopped){ > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > temp_time = time_so_far(); > child_stat->throughput = > (temp_time - starttime1)-time_res; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > if(debug1) > { > printf("\n(%ld) Stopped by another\n", (long)xx); > } > stopped=1; > goto again; > } ># 15104 "iozone.c" > printf("\nError writing block %lld, fd= %d\n", i, > fd); > > if(wval==-1) > perror("write"); > if (!no_unlink) > unlink(dummyfile[xx]); > child_stat->flag = 0; > exit(127); > } > } > } > if(rlocking) > { > mylockr((int) fd, (int) 0, (int)0, > lock_offset, reclen); > } > if(Q_flag) > { > thread_qtime_stop=time_so_far(); > > > > fprintf(thread_randwqfd,"%10.1lld %10.0f\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000); > > } > w_traj_ops_completed++; > w_traj_bytes_completed+=reclen; > written_so_far+=reclen/1024; > if(*stop_flag) > { > written_so_far-=reclen/1024; > w_traj_bytes_completed-=reclen; > } > } > > > if(file_lock) > if(mylockf((int) fd, (int) 0, (int)0)) > printf("Write unlock failed. %d\n",(*__errno_location ())); > > > if(async_flag) > { > end_async(gc); > gc=0; > } > > if(!xflag) > { > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > } > > if(include_flush) > { > if(mmapflag) > msync(maddr,(size_t)filebytes64,4); > else > fsync(fd); > } > if(include_close) > { > if(mmapflag) > mmap_end(maddr,(unsigned long long)filebytes64); > close(fd); > } > if(!stopped){ > temp_time = time_so_far(); > child_stat->throughput = ((temp_time - starttime1)-time_res) > -compute_val; > if(child_stat->throughput < (double).000001) > { > child_stat->throughput= time_res; > if(rec_prob < reclen) > rec_prob = reclen; > res_prob=1; > } > > if(OPS_flag){ > > written_so_far=w_traj_ops_completed; > } > child_stat->throughput = > (double)written_so_far/child_stat->throughput; > child_stat->actual = (double)written_so_far; > } > child_stat->flag = 0; > if(cdebug) > printf("Child %d: throughput %f actual %f \n",(int)chid,child_stat->throughput, > child_stat->actual); > if(cpuutilflag) > { > cputime = cputime_so_far() - cputime; > if (cputime < cputime_res) > cputime = 0.0; > child_stat->cputime = cputime; > walltime = time_so_far() - walltime; > child_stat->walltime = walltime; > } > if(distributed && client_iozone) > tell_master_stats(7, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > stopped=0; > > > > if(debug1) > > > > printf("\nChild finished %lld\n",xx); > > if(!include_close) > { > if(mmapflag) > { > msync(maddr,(size_t)numrecs64*reclen,4); > mmap_end(maddr,(unsigned long long)numrecs64*reclen); > }else > fsync(fd); > > close(fd); > } > if(Q_flag && (thread_randwqfd !=0) ) > fclose(thread_randwqfd); > free(dummyfile[xx]); > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} ># 15256 "iozone.c" >void * >thread_cleanup_test(void *x) > > > > >{ > long long xx; > struct child_stats *child_stat; > char *dummyfile[256]; > > > > > > if(use_thread) > xx = (long long)((long)x); > else > { > xx=chid; > } > > dummyfile[xx]=(char *)malloc((size_t)1000); > > > > sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx],xx); > > if(!no_unlink) > unlink(dummyfile[xx]); > > child_stat = (struct child_stats *)&shmaddr[xx]; > > > > child_stat=(struct child_stats *)&shmaddr[xx]; > child_stat->flag = 1; > if(distributed && client_iozone) > { > tell_master_ready(chid); > wait_for_master_go(chid); > } > else > { > while(child_stat->flag!=2) > Poll((long long)1); > } > > *stop_flag=1; > if(distributed && client_iozone) > send_stop(); > if(distributed && client_iozone) > tell_master_stats(12, chid, child_stat->throughput, > child_stat->actual, > child_stat->cputime, child_stat->walltime, > (char)*stop_flag, > (long long)0); > child_stat->flag = 0; > free(dummyfile[xx]); > > if(distributed && client_iozone) > return(0); > > > > if(use_thread) > thread_exit(); > else > exit(0); > >return(0); >} > > > > > > > >long long >mythread_create( void *(*func)(void *),void *x) > > > > > > >{ > pthread_t ts; > pthread_attr_t attr; > int xx; > int *yy; > > > > > long meme; > meme = (long)x; > > yy=(int *)x; ># 15364 "iozone.c" > pthread_attr_init(&attr); > xx=(int )pthread_create((pthread_t *)&ts, (pthread_attr_t *) &attr, > func, (void *)yy); > > bcopy(&ts,&p_childids[meme],sizeof(pthread_t)); > if(xx < (int)0) > printf("Thread create failed. Returned %d Errno = %d\n",xx,(*__errno_location ())); > if(debug1 ) > { > printf("\nthread created has an id of %lx\n",ts); > printf("meme %ld\n",meme); > } > return((long long)meme); >} ># 15398 "iozone.c" >int >thread_exit(void) > > > > >{ > pthread_exit((void *)((void *)0)); >return(0); >} ># 15426 "iozone.c" >pthread_t >mythread_self(void) > > > > >{ > pthread_t xx; > xx = pthread_self(); > return(xx); >} ># 15455 "iozone.c" >void * >thread_join( long long tid, void *status) > > > > > > >{ > int xx; > pthread_t eek; > pthread_attr_t foo; > > bcopy(&p_childids[tid],&eek,sizeof(pthread_t)); > xx=pthread_join(eek,(void **)&foo); > if(xx<0) > printf("Thread join returned error %d\n",(*__errno_location ())); > return(0); >} ># 15494 "iozone.c" >void >dump_throughput_cpu(void) > > > > >{ > long long x,y,i,j; > char *port; > char *label; > char print_str[300]; > x=max_x; > y=max_y; > > port = use_thread ? "threads" : "processes"; > printf("\n\"CPU utilization report Y-axis is type of test X-axis is number of %s\"\n",port); > if (bif_flag) > { > sprintf(print_str, "CPU utilization report Y-axis is type of test X-axis is number of %s", port); > do_label(bif_fd, print_str, bif_row++, bif_column); > } > label = OPS_flag ? "ops/sec" : > MS_flag ? "microseconds/op" : "Kbytes/sec"; > > > > if(!silent) printf("\"Record size = %lld Kbytes \"\n", reclen/1024); > > if(!silent) printf("\"Output is in CPU%%\"\n\n"); > if (bif_flag) > { > > > > sprintf(print_str, "Record size = %lld Kbytes", reclen/1024); > > do_label(bif_fd, print_str, bif_row++, bif_column); > sprintf(print_str, "Output is in CPU%%"); > do_label(bif_fd, print_str, bif_row++, bif_column); > } > for (i = 0; i < x; i++) > { > if(!silent) printf("\"%15s \"", throughput_tests[i]); > if (bif_flag) > { > sprintf(print_str, "%15s ", throughput_tests[i]); > do_label(bif_fd, print_str, bif_row, bif_column++); > bif_column++; > } > for (j = 0; j <= y; j++) > { > if (bif_flag) > do_float(bif_fd, runtimes[i][j].cpuutil, bif_row, bif_column++); > if(!silent) printf("%10.2f ", runtimes[i][j].cpuutil); > } > if(!silent) printf("\n\n"); > if (bif_flag) > { > bif_column=0; > bif_row++; > } > } >} > > > > > > >void >dump_throughput(void) > > > > >{ > long long x,y,i,j; > char *port; > char *label; > char print_str[300]; > x=max_x; > y=max_y; > > if(use_thread) > port="threads"; > else > port="processes"; > if(!silent) printf("\n\"Throughput report Y-axis is type of test X-axis is number of %s\"\n",port); > if(bif_flag) > { > bif_fd=create_xls(bif_filename); > do_label(bif_fd,command_line,bif_row++,bif_column); > sprintf(print_str,"Throughput report Y-axis is type of test X-axis is number of %s",port); > do_label(bif_fd,print_str,bif_row++,bif_column); > } > if(OPS_flag) > label="ops/sec"; > else > if(MS_flag) > label="microseconds/op"; > else > label="Kbytes/sec"; > > > > if(!silent) printf("\"Record size = %lld Kbytes \"\n",reclen/1024); > > if(!silent) printf("\"Output is in %s\"\n\n",label); > if(bif_flag) > { > > > > sprintf(print_str,"Record size = %lld Kbytes",reclen/1024); > > do_label(bif_fd,print_str,bif_row++,bif_column); > sprintf(print_str,"Output is in %s",label); > do_label(bif_fd,print_str,bif_row++,bif_column); > } > for(i=0;i<=toutputindex;i++) > { > if(!silent) printf("\"%15s \"",toutput[i]); > if(bif_flag) > { > sprintf(print_str,"%15s ",toutput[i]); > do_label(bif_fd,print_str,bif_row,bif_column++); > bif_column++; > } > for(j=0;j<=y;j++) > { > if(bif_flag) > { > do_float(bif_fd,(double)report_darray[i][j],bif_row,bif_column++); > } > if(!silent) printf("%10.2f ",report_darray[i][j]); > } > if(!silent) printf("\n\n"); > if(bif_flag) > { > bif_column=0; > bif_row++; > } > } > if (cpuutilflag) > dump_throughput_cpu(); > if(bif_flag) > close_xls(bif_fd); >} > > > > > > > >void >store_dvalue(double value) > > > > > >{ > report_darray[current_x][current_y]=value; > current_x++; > if(current_x > max_x) > max_x=current_x; > if(current_y > max_y) > max_y=current_y; > if(max_x >= 100) > { > printf("\nMAX_X too small\n"); > exit(163); > } > if(max_y >= 256) > { > printf("\nMAXSTREAMS too small\n"); > exit(164); > } >} > > > > > >char * >initfile(int fd, off64_t filebytes,int flag,int prot) > > > > > > > >{ > char *pa; > int mflags=0; > long long x; > char *tmp,*stmp; > int file_flags; > long long recs; > long long i; > int dflag = 0; > > if(flag) > { ># 15712 "iozone.c" > tmp=(char *)malloc((size_t)reclen * 2); > stmp=tmp; > > > > tmp = (char *)((((long)tmp + (long)reclen))& ~(((long)reclen-1))); > > > > > > file_flags=fcntl(fd,3); > > > > dflag = 040000; > > > > > > > if((file_flags & dflag) !=0) > { > recs=filebytes/reclen; > for (i =0; i<recs ;i++) > { > x=write(fd,tmp,(size_t)reclen); > if(x < 1) > { > printf("Unable to write file\n"); > exit(182); > } > } > } > else > { > > lseek64(fd,(off64_t)((filebytes-reclen)),0); > x=write(fd,tmp,(size_t)reclen); > if(x < 1) > { > printf("Unable to write file\n"); > exit(181); > } > } > free(stmp); > lseek64(fd,(off64_t)(0),0); > > } ># 15775 "iozone.c" > if((prot & 0x2)==0x2) > mflags=0|0x01; > else > mflags=0|0x02; > > > > > > > > pa = (char *)mmap64((void *)(((char *)0)),(size_t)(filebytes),(int)(prot),(int)(mflags),(int)(fd),(off64_t)(0)); ># 15797 "iozone.c" > if(pa == (char *)-1) > { > printf("Mapping failed, errno %d\n",(*__errno_location ())); > exit(166); > } ># 15819 "iozone.c" > if(advise_flag) > { > switch(advise_op){ > case 0: > madvise( (char *)pa, (size_t) filebytes, 0); > break; > case 1: > madvise( (char *)pa, (size_t) filebytes, 1); > break; > case 2: > madvise( (char *)pa, (size_t) filebytes, 2); > break; > case 3: > madvise( (char *)pa, (size_t) filebytes, 4); > break; > case 4: > madvise( (char *)pa, (size_t) filebytes, 3); > break; > default: > break; > }; > } > > > return(pa); > >} > > > > > > >void >mmap_end( char *buffer, long long size) > > > > > > >{ > if(munmap(buffer,(size_t)size)<0) > > > > printf("munmap buffer %lx, size %lld failed.\n",(long)buffer,size); > > >} ># 15884 "iozone.c" >void >fill_area(long long *src_buffer, long long *dest_buffer, long long length) > > > > > > >{ > > bcopy((void *)src_buffer,(void *)dest_buffer,(size_t)length); >} ># 15929 "iozone.c" >void >my_nap( int ntime ) > > > > > >{ > struct timeval nap_time; > int seconds, microsecs; > seconds = ntime/1000; > microsecs = (ntime*1000)%1000000; > nap_time.tv_sec=seconds; > nap_time.tv_usec=microsecs; > select(0,0,0,0,&nap_time); >} > > > > > > > >void >get_resolution(void) > > > > >{ > double starttime, finishtime, besttime = 0; > long j,delay; > int k; > > finishtime=time_so_far1(); > starttime=time_so_far1(); > delay=j=0; > for(k=0;k<10;k++) > { > while(1) > { > starttime=time_so_far1(); > for(j=0;j< delay;j++) > ; > finishtime=time_so_far1(); > if(starttime==finishtime) > delay++; > else > { > if(k==0) > besttime=(finishtime-starttime); > if((finishtime-starttime) < besttime) > besttime=(finishtime-starttime); > break; > } > } > } > time_res=besttime/1000000.0; >} > > > > > > > >void >get_rusage_resolution(void) > > > > >{ > double starttime, finishtime; > long j; > > finishtime=cputime_so_far(); > starttime=cputime_so_far(); > delay=j=0; > while(1) > { > starttime=cputime_so_far(); > for(j=0;j< delay;j++) > ; > finishtime=cputime_so_far(); > if(starttime==finishtime) > > delay++; > else > break; > } > cputime_res = (finishtime-starttime); >} > > > > > > >static double >time_so_far1(void) > > > > >{ ># 16059 "iozone.c" > struct timeval tp; > > if (gettimeofday(&tp, (struct timezone *) ((void *)0)) == -1) > perror("gettimeofday"); > return ((double) (tp.tv_sec)*1000000.0) + > (((double) tp.tv_usec) ); > > >} > > > > > > >static double >clk_tck(void) > > > > >{ > return((double)sysconf(_SC_CLK_TCK)); >} > > > > > >static double >utime_so_far(void) > > > > >{ > struct tms tp; > > times(&tp); > return ((double) (tp.tms_utime)); >} > > > > > >static double >stime_so_far(void) > > > > >{ > struct tms tp; > > times(&tp); > return ((double) (tp.tms_stime)); >} > > > > > >static double >cputime_so_far(void) > > > > >{ > > > > > > > struct rusage ru; > > if (getrusage (RUSAGE_SELF, &ru)) > perror ("getrusage"); > return ((double)(ru.ru_utime.tv_sec + ru.ru_stime.tv_sec) + > .000001 *(ru.ru_utime.tv_usec + ru.ru_stime.tv_usec)); > >} > > > > > > >static double >cpu_util(double cputime, double walltime) > > > > > >{ > double cpu; > > if (walltime <= (double)0.0) > { > cpu = (double)0.0; > return cpu; > } > if (cputime <= (double)0.0) > cputime = 0.0; > if (walltime <= (double)0.0) > cpu = (double)100.0; > else { > cpu = (((double)100.0 * cputime) / walltime); > > > > > } > return cpu; >} ># 16190 "iozone.c" >int >mylockf(int fd, int op, int rdwr) > > > > > >{ > struct flock myflock; > int ret; > if(op==0) > { > myflock.l_type=2; > myflock.l_whence=0; > myflock.l_start=0; > myflock.l_len=0; > myflock.l_pid=getpid(); > ret=fcntl(fd,7, &myflock); > } > else > > { > if(rdwr==0) > myflock.l_type=1; > else > myflock.l_type=0; > myflock.l_whence=0; > myflock.l_start=0; > myflock.l_len=0; > myflock.l_pid=getpid(); > ret=fcntl(fd,7, &myflock); > } > return(ret); >} > > >int >mylockr(int fd, int op, int rdwr, off64_t offset, off64_t size) > > > > > > > >{ > struct flock myflock; > int ret; > if(op==0) > { > > myflock.l_type=2; > myflock.l_whence=0; > myflock.l_start=offset; > myflock.l_len=size; > myflock.l_pid=getpid(); > ret=fcntl(fd,7, &myflock); > } > else > > { > if(rdwr==0) > { > myflock.l_type=1; > > } > else > { > myflock.l_type=0; > > } > > myflock.l_whence=0; > myflock.l_start=offset; > myflock.l_len=size; > myflock.l_pid=getpid(); > ret=fcntl(fd,7, &myflock); > } > return(ret); >} > > > > > > >float >do_compute(float comp_delay) > > > > > >{ > double starttime,tmptime; > if(comp_delay == (float)0) > return(0); > starttime=time_so_far(); > while(1) > { > tmptime=time_so_far()-starttime; > if(tmptime >= (double)comp_delay) > return(tmptime); > } >} ># 16303 "iozone.c" >void >disrupt(int fd) > > > > > >{ > char *nbuff,*free_addr; > off64_t current; > > free_addr=nbuff=(char *)malloc((size_t)page_size+page_size); > nbuff=(char *)(((long)nbuff+(long)page_size) & (long)(~page_size-1)); > > > current = lseek64(fd,(off64_t)(0),1); > > > lseek64(fd,(off64_t)(0),0); > > > if(direct_flag) > read(fd,nbuff,page_size); > else > read(fd,nbuff,1); > > > lseek64(fd,(off64_t)(page_size),0); > > > if(direct_flag) > read(fd,nbuff,page_size); > else > read(fd,nbuff,1); > > > lseek64(fd,(off64_t)(current),0); > free(free_addr); > >} ># 16352 "iozone.c" >long long >get_traj(FILE *traj_fd, long long *traj_size, float *delay, long which) ># 16362 "iozone.c" >{ > long long traj_offset = 0; > int tmp = 0; > int tokens; > int ret=0; > char *ret1,*where; > char buf[200]; > char sbuf[200]; > int got_line; > > got_line=0; > > while(got_line==0) > { > tokens=0; > ret1=fgets(buf,200,traj_fd); > if(ret1==(char *)0) > { > printf("\n\n\tEarly end of telemetry file. Results not accurate.\n"); > signal_handler(); > } > where=(char *)&buf[0]; > strcpy(sbuf,buf); > if((*where=='#') || (*where=='\n')) > continue; > tokens++; > strtok(where," "); > while( (char *)(strtok( (char *)0," ")) != (char *)0) > { > tokens++; > } > got_line=1; > } > if(tokens == 3) > { > > > > ret=sscanf(sbuf,"%lld %lld %d\n",&traj_offset,traj_size,&tmp); > > > *delay= ((float)tmp/1000); > } > if(tokens == 2) > { > > > > ret=sscanf(sbuf,"%lld %lld\n",&traj_offset,traj_size); > > *delay=compute_time; > > } > if((tokens != 2) && (tokens !=3)) > { > printf("\n\tInvalid entry in telemetry file. > %s <\n",sbuf); > exit(178); > } > if(ret==(-1)) > { > printf("\n\n\tEarly end of telemetry file. Results not accurate.\n"); > signal_handler(); > } > > > > > > > > return(traj_offset); >} > > > > > >FILE * >open_r_traj(void) > > > > >{ > FILE *fd; > fd=fopen(read_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open read telemetry file \"%s\"\n", > read_traj_filename); > exit(174); > } > return(fd); >} > > > > > >FILE * >open_w_traj(void) > > > > >{ > FILE *fd; > fd=fopen(write_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open write telemetry file \"%s\"\n", > write_traj_filename); > exit(175); > } > return(fd); >} ># 16486 "iozone.c" >void >r_traj_size(void) > > > > >{ > FILE *fd; > int ret; > long long traj_offset = 0; > long long traj_size = 0; > long long max_offset = 0; > int tokens; > int dummy; > int lines; > char buf[200]; > char sbuf[200]; > char *ret1,*where; > > lines=0; > fd=fopen(read_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open read telemetry file \"%s\"\n", > read_traj_filename); > exit(174); > } > while(1) > { > tokens=0; > ret1=fgets(buf,200,fd); > if(ret1==(char *)0) > break; > where=(char *)&buf[0]; > strcpy(sbuf,buf); > lines++; > if((*where=='#') || (*where=='\n')) > continue; > tokens++; > strtok(where," "); > while( (char *)(strtok( (char *)0," ")) != (char *)0) > { > tokens++; > } > if(tokens==1) > { > printf("\n\tInvalid read telemetry file entry. Line %d", > lines); > signal_handler(); > } > > > > if(tokens==3) > { > > > > ret=sscanf(sbuf,"%lld %lld %d\n",&traj_offset,&traj_size,&dummy); > > } > if(tokens==2) > { > > > > ret=sscanf(sbuf,"%lld %lld\n",&traj_offset,&traj_size); > > } > if((tokens != 2) && (tokens !=3)) > { > printf("\n\tInvalid read telemetry file. Line %d\n",lines); > exit(178); > } > if(traj_offset + traj_size > max_offset) > max_offset=traj_offset + traj_size; > > r_traj_ops++; > } > r_traj_fsize=max_offset; > > > > fclose(fd); >} ># 16579 "iozone.c" >long long >w_traj_size(void) > > > > >{ > FILE *fd; > int ret; > long long traj_offset = 0; > long long traj_size = 0; > long long max_offset = 0; > int dummy; > int tokens,lines; > char *ret1; > char buf[200]; > char sbuf[200]; > char *where; > > lines=0; > > fd=fopen(write_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open write telemetry file \"%s\"\n", > write_traj_filename); > exit(174); > } > while(1) > { > tokens=0; > ret1=fgets(buf,200,fd); > if(ret1==(char *)0) > break; > lines++; > where=(char *)&buf[0]; > strcpy(sbuf,buf); > if((*where=='#') || (*where=='\n')) > continue; > tokens++; > strtok(where," "); > while( (char *)(strtok( (char *)0," ")) != (char *)0) > { > tokens++; > } > if(tokens==1) > { > printf("\n\tInvalid write telemetry file entry. Line %d\n", > lines); > signal_handler(); > } > if(tokens==3) > { > > > > ret=sscanf(sbuf,"%lld %lld %d",&traj_offset,&traj_size,&dummy); > > } > if(tokens==2) > { > > > > ret=sscanf(sbuf,"%lld %lld\n",&traj_offset,&traj_size); > > } > if(tokens > 3) > { > printf("\n\tInvalid write telemetry file entry. Line %d\n", > lines); > exit(174); > } > if(traj_offset + traj_size > max_offset) > max_offset=traj_offset + traj_size; > > w_traj_ops++; > } > w_traj_fsize=max_offset; > > > > fclose(fd); > return(max_offset); >} > > > > > > >void >traj_vers(void) > > > > >{ > FILE *fd; > char *where; > char buf[200]; > int things; > char *ret1; > > if(r_traj_flag) > { > things=0; > fd=fopen(read_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open read telemetry file \"%s\"\n", read_traj_filename); > exit(174); > } >loop1: > ret1=fgets(buf,200,fd); > if(ret1==(char *)0) > { > fclose(fd); > return; > } > where=(char *)&buf[0]; > if((*where=='#') || (*where=='\n')) > goto loop1; > things++; > strtok(where," "); > while( (char *)(strtok( (char *)0," ")) != (char *)0) > { > things++; > } > r_traj_items=things; > > > > } > if(w_traj_flag) > { > things=0; > fd=fopen(write_traj_filename,"r"); > if(fd == (FILE *)0) > { > printf("Unable to open write telemetry file \"%s\"\n", write_traj_filename); > exit(174); > } >loop2: > ret1=fgets(buf,200,fd); > if(ret1==(char *)0) > { > fclose(fd); > return; > } > where=(char *)&buf[0]; > if((*where=='#') || (*where=='\n')) > goto loop2; > things++; > strtok(where," "); > while( (char *)(strtok( (char *)0," ")) != (char *)0) > { > things++; > } > fclose(fd); > w_traj_items=things; > > > > } >} ># 16754 "iozone.c" >void >init_file_sizes( off64_t min_f_size, off64_t max_f_size) > > > > > > >{ > off64_t kilosi; > int x; > if(s_count > 1) > { > for(x=0; x < s_count; x++) > { > kilosi=s_range[x]; > add_file_size((off64_t)kilosi); > } > } > else > { > for(kilosi=min_f_size;kilosi<=max_f_size;kilosi*=multiplier) > { > add_file_size((off64_t)kilosi); > } > } >} > > > > > >void >add_file_size(off64_t size) > > > > > >{ > struct size_entry *size_listp; > struct size_entry *nsize_list; > > size_listp=size_list; > > if(size_list) > { > if(size_listp->next) > while(size_listp->next!=0) > size_listp=size_listp->next; > } > nsize_list=(struct size_entry *)malloc(sizeof(struct size_entry)); > if(nsize_list==0) > { > printf("Malloc failed in add_file_size\n"); > exit(180); > } > nsize_list->next=0; > nsize_list->size=size; > if(size_list == 0) > size_list=nsize_list; > else > size_listp->next=nsize_list; > size_listp=size_list; >} > > > > > >off64_t >get_next_file_size(off64_t size) > > > > > >{ > struct size_entry *size_listp; > > size_listp=size_list; > > for( ; size_listp ; size_listp=size_listp->next ) > { > if(size_listp->size > size) > return(size_listp->size); > } > return((off64_t)0); >} ># 16853 "iozone.c" >void >init_record_sizes( off64_t min_r_size, off64_t max_r_size) > > > > > > >{ > int x; > off64_t size; > if(r_count > 1) > { > for(x=0; x < r_count; x++) > { > size=r_range[x]; > add_record_size((off64_t)size); > } > } > else > { > for(size=min_r_size;size<=max_r_size;size*=multiplier) > { > add_record_size((off64_t)size); > } > } >} > > >void >del_record_sizes(void) > > > > >{ > struct size_entry *size_listp; > struct size_entry *save_item; > > size_listp=rec_size_list; > if(rec_size_list) > { > while(size_listp!=0) > { > save_item=size_listp->next; > free(size_listp); > size_listp=save_item; > } > } > rec_size_list=0; >} > > > > > >void >add_record_size(off64_t size) > > > > > >{ > struct size_entry *size_listp; > struct size_entry *nsize_list; > > size_listp=rec_size_list; > > if(rec_size_list) > { > if(size_listp->next) > while(size_listp->next!=0) > size_listp=size_listp->next; > } > nsize_list=(struct size_entry *)malloc(sizeof(struct size_entry)); > if(nsize_list==0) > { > printf("Malloc failed in add_file_size\n"); > exit(180); > } > nsize_list->next=0; > nsize_list->size=size; > if(rec_size_list == 0) > rec_size_list=nsize_list; > else > size_listp->next=nsize_list; > size_listp=rec_size_list; >} > > > > > >off64_t >get_next_record_size(off64_t size) > > > > > >{ > struct size_entry *size_listp; > > size_listp=rec_size_list; > > for( ; size_listp ; size_listp=size_listp->next ) > { > if(size_listp->size > size) > return(size_listp->size); > } > return((off64_t)0); >} ># 17034 "iozone.c" >int >start_master_listen(void) > > > > >{ > int s; > int rc; > int tmp_port; > int sockerr; > struct sockaddr_in addr; > int recv_buf_size=65536*4; > > s = socket(2, SOCK_DGRAM, 0); > if (s < 0) > { > perror("socket failed:"); > exit(19); > } > sockerr = setsockopt (s, 1, 8, (char *) > &recv_buf_size, sizeof(int)); > if ( sockerr == -1 ) { > perror("Error in setsockopt\n"); > } > tmp_port=20000; > bzero(&addr, sizeof(struct sockaddr_in)); > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(s, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > master_listen_port = (__extension__ ({ register unsigned short int __v, __x = (addr.sin_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > } > if(rc < 0) > { > perror("bind failed\n"); > exit(20); > } > return(s); >} > > > > > > >void >master_listen(int sock, int size_of_message) > > > > > >{ > int tsize; > int rcvd; > int s; > int rc=0; > > tsize = size_of_message; > s = sock; > rcvd = 0; > while(rcvd < tsize) > { > if(mdebug ==1) > { > printf("Master: In recieve \n"); > fflush(stdout); > } > rc=recv(s,master_rcv_buf,size_of_message,0); > if(rc < 0) > { > perror("Read failed\n"); > exit(21); > } > if(mdebug >=1) > { > printf("Master got %d bytes\n",rc); > fflush(stdout); > } > rcvd+=rc; > } > if(mdebug >=1) > { > printf("Master returning from got %d bytes\n",rc); > fflush(stdout); > } >} > > > > > > >void >child_send(int child_socket_val, char *controlling_host_name, struct master_command *send_buffer, int send_size) ># 17148 "iozone.c" >{ > int rc; > struct master_neutral_command outbuf; > > bzero(&outbuf, sizeof(struct master_neutral_command)); > if(cdebug>=1) > { > printf("Child %d sending message to %s \n",(int)chid, controlling_host_name); > fflush(stdout); > } > > > > strcpy(outbuf.m_host_name,send_buffer->m_host_name); > strcpy(outbuf.m_client_name,send_buffer->m_client_name); > sprintf(outbuf.m_client_number,"%d",send_buffer->m_client_number); > sprintf(outbuf.m_child_port,"%d",send_buffer->m_child_port); > sprintf(outbuf.m_child_async_port,"%d",send_buffer->m_child_async_port); > sprintf(outbuf.m_command,"%d",send_buffer->m_command); > sprintf(outbuf.m_testnum,"%d",send_buffer->m_testnum); > sprintf(outbuf.m_version,"%d",send_buffer->m_version); > sprintf(outbuf.m_throughput,"%f",send_buffer->m_throughput); > sprintf(outbuf.m_cputime,"%f", send_buffer->m_cputime); > sprintf(outbuf.m_walltime,"%f",send_buffer->m_walltime); > sprintf(outbuf.m_stop_flag,"%d",send_buffer->m_stop_flag); > sprintf(outbuf.m_actual,"%f",send_buffer->m_actual); > > > > sprintf(outbuf.m_child_flag,"%lld",send_buffer->m_child_flag); > > if(cdebug>=1) > { > printf("Child %d sending message to %s\n",(int)chid, controlling_host_name); > fflush(stdout); > } > rc = send(child_socket_val, (char *)&outbuf, sizeof(struct master_neutral_command), 0); > if (rc < 0) > { > perror("write failed\n"); > exit(26); > } >} > > > > > > > >void >master_send(int child_socket_val, char *host_name, struct client_command *send_buffer, int send_size) ># 17208 "iozone.c" >{ > int rc; > struct client_neutral_command outbuf; > > bzero(&outbuf,sizeof(struct client_neutral_command)); > if(mdebug) > { > printf("Master_neutral_command size = %d\n",sizeof(struct master_neutral_command)); > printf("Client_neutral_command size = %d\n",sizeof(struct client_neutral_command)); > } > > > > strcpy(outbuf.c_host_name,send_buffer->c_host_name); > strcpy(outbuf.c_client_name,send_buffer->c_client_name); > strcpy(outbuf.c_working_dir,send_buffer->c_working_dir); > strcpy(outbuf.c_path_dir,send_buffer->c_path_dir); > strcpy(outbuf.c_execute_name,send_buffer->c_execute_name); > strcpy(outbuf.c_write_traj_filename,send_buffer->c_write_traj_filename); > strcpy(outbuf.c_read_traj_filename,send_buffer->c_read_traj_filename); > sprintf(outbuf.c_oflag,"%d",send_buffer->c_oflag); > sprintf(outbuf.c_noretest,"%d",send_buffer->c_noretest); > sprintf(outbuf.c_read_sync,"%d",send_buffer->c_read_sync); > sprintf(outbuf.c_jflag,"%d",send_buffer->c_jflag); > sprintf(outbuf.c_async_flag,"%d",send_buffer->c_async_flag); > sprintf(outbuf.c_mmapflag,"%d",send_buffer->c_mmapflag); > sprintf(outbuf.c_k_flag,"%d",send_buffer->c_k_flag); > sprintf(outbuf.c_h_flag,"%d",send_buffer->c_h_flag); > sprintf(outbuf.c_mflag,"%d",send_buffer->c_mflag); > sprintf(outbuf.c_pflag,"%d",send_buffer->c_pflag); > sprintf(outbuf.c_stride_flag,"%d",send_buffer->c_stride_flag); > sprintf(outbuf.c_verify,"%d",send_buffer->c_verify); > sprintf(outbuf.c_sverify,"%d",send_buffer->c_sverify); > sprintf(outbuf.c_odsync,"%d",send_buffer->c_odsync); > sprintf(outbuf.c_diag_v,"%d",send_buffer->c_diag_v); > sprintf(outbuf.c_Q_flag,"%d",send_buffer->c_Q_flag); > sprintf(outbuf.c_include_flush,"%d",send_buffer->c_include_flush); > sprintf(outbuf.c_OPS_flag,"%d",send_buffer->c_OPS_flag); > sprintf(outbuf.c_mmapnsflag,"%d",send_buffer->c_mmapnsflag); > sprintf(outbuf.c_mmapssflag,"%d",send_buffer->c_mmapssflag); > sprintf(outbuf.c_mmapasflag,"%d",send_buffer->c_mmapasflag); > sprintf(outbuf.c_no_copy_flag,"%d",send_buffer->c_no_copy_flag); > sprintf(outbuf.c_include_close,"%d",send_buffer->c_include_close); > sprintf(outbuf.c_disrupt_flag,"%d",send_buffer->c_disrupt_flag); > sprintf(outbuf.c_compute_flag,"%d",send_buffer->c_compute_flag); > sprintf(outbuf.c_xflag,"%d",send_buffer->c_xflag); > sprintf(outbuf.c_MS_flag,"%d",send_buffer->c_MS_flag); > sprintf(outbuf.c_mmap_mix,"%d",send_buffer->c_mmap_mix); > sprintf(outbuf.c_w_traj_flag,"%d",send_buffer->c_w_traj_flag); > sprintf(outbuf.c_r_traj_flag,"%d",send_buffer->c_r_traj_flag); > sprintf(outbuf.c_direct_flag,"%d",send_buffer->c_direct_flag); > sprintf(outbuf.c_cpuutilflag,"%d",send_buffer->c_cpuutilflag); > sprintf(outbuf.c_client_number,"%d",send_buffer->c_client_number); > sprintf(outbuf.c_command,"%d",send_buffer->c_command); > sprintf(outbuf.c_testnum,"%d",send_buffer->c_testnum); > sprintf(outbuf.c_no_unlink,"%d",send_buffer->c_no_unlink); > sprintf(outbuf.c_file_lock,"%d",send_buffer->c_file_lock); > sprintf(outbuf.c_rec_lock,"%d",send_buffer->c_rec_lock); > sprintf(outbuf.c_multiplier,"%d",send_buffer->c_multiplier); > sprintf(outbuf.c_share_file,"%d",send_buffer->c_share_file); > sprintf(outbuf.c_pattern,"%d",send_buffer->c_pattern); > sprintf(outbuf.c_version,"%d",send_buffer->c_version); > sprintf(outbuf.c_base_time,"%d",send_buffer->c_base_time); > sprintf(outbuf.c_num_child,"%d",send_buffer->c_num_child); > sprintf(outbuf.c_pct_read,"%d",send_buffer->c_pct_read); > sprintf(outbuf.c_advise_op,"%d",send_buffer->c_advise_op); > sprintf(outbuf.c_advise_flag,"%d",send_buffer->c_advise_flag); > sprintf(outbuf.c_restf,"%d",send_buffer->c_restf); ># 17288 "iozone.c" > sprintf(outbuf.c_delay,"%lld",send_buffer->c_delay); > sprintf(outbuf.c_stride,"%lld",send_buffer->c_stride); > sprintf(outbuf.c_rest_val,"%lld",send_buffer->c_rest_val); > sprintf(outbuf.c_purge,"%lld",send_buffer->c_purge); > sprintf(outbuf.c_fetchon,"%lld",send_buffer->c_fetchon); > sprintf(outbuf.c_numrecs64,"%lld",send_buffer->c_numrecs64); > sprintf(outbuf.c_reclen,"%lld",send_buffer->c_reclen); > sprintf(outbuf.c_child_flag,"%lld",send_buffer->c_child_flag); > sprintf(outbuf.c_delay_start,"%lld",send_buffer->c_delay_start); > sprintf(outbuf.c_depth,"%lld",send_buffer->c_depth); > > sprintf(outbuf.c_stop_flag,"%d",send_buffer->c_stop_flag); > sprintf(outbuf.c_compute_time,"%f",send_buffer->c_compute_time); > > if(mdebug >= 1) > printf("Master sending message to %s \n",host_name); > > rc = write(child_socket_val, (char *)&outbuf, sizeof(struct client_neutral_command)); > if (rc < 0) > { > perror("write failed\n"); > exit(26); > } >} > > > > > >int >start_child_send(char *controlling_host_name) > > > > > >{ > int rc,child_socket_val; > struct sockaddr_in addr,raddr; > struct hostent *he; > int tmp_port; > struct in_addr *ip; > > he = gethostbyname(controlling_host_name); > if (he == ((void *)0)) > { > if(cdebug) > { > printf("Child %d: Bad server host %s\n",(int)chid, controlling_host_name); > fflush(stdout); > } > exit(22); > } > if(cdebug ==1) > { > printf("Child %d: start child send to hostname: %s\n",(int)chid, he->h_name); > fflush(stdout); > } > ip = (struct in_addr *)he->h_addr_list[0]; > > if(cdebug ==1) > { > printf("Child %d: server host: %s\n",(int)chid, (char *)inet_ntoa(*ip)); > fflush(stdout); > } > > > > raddr.sin_family = 2; > raddr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (20000); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > raddr.sin_addr.s_addr = ip->s_addr; > child_socket_val = socket(2, SOCK_DGRAM, 0); > if (child_socket_val < 0) > { > perror("Child: socket failed:"); > exit(23); > } > bzero(&addr, sizeof(struct sockaddr_in)); > tmp_port=(((20000 +256)+256)+256); > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(child_socket_val, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > if(cdebug ==1) > { > printf("Child %d: Bound to host port %d\n",(int)chid, tmp_port); > fflush(stdout); > } > if (rc < 0) > { > perror("Child: bind failed\n"); > exit(24); > } > rc = > connect(child_socket_val, (struct sockaddr *)&raddr, > sizeof(struct sockaddr_in)); > if (rc < 0) > { > perror("Child: connect failed\n"); > exit(25); > } > if(cdebug ==1) > { > printf("Child %d Connected\n",(int)chid); > fflush(stdout); > } > return (child_socket_val); >} > > > > > >void >stop_child_listen(int child_socket_val) > > > > > >{ > close(child_socket_val); >} > > > > > >void >stop_child_send(int child_socket_val) > > > > > >{ > close(child_socket_val); >} > > > > > >void >stop_master_listen(int master_socket_val) > > > > > >{ > close(master_socket_val); >} > > > > > >void >stop_master_send(int child_socket_val) > > > > > >{ > close(child_socket_val); >} > > > > > >int >start_child_listen(int size_of_message) > > > > > >{ > int tsize; > int s; > int rc; > int xx; > int tmp_port; > int sockerr; > int recv_buf_size=65536; > xx = 0; > tsize=size_of_message; > s = socket(2, SOCK_STREAM, 0); > if (s < 0) > { > perror("socket failed:"); > exit(19); > } > sockerr = setsockopt (s, 1, 8, (char *) > &recv_buf_size, sizeof(int)); > if ( sockerr == -1 ) { > perror("Error in setsockopt\n"); > } > bzero(&child_sync_sock, sizeof(struct sockaddr_in)); > tmp_port=((((20000 +256)+256)+256)+256)+chid; > child_sync_sock.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > child_sync_sock.sin_family = 2; > child_sync_sock.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(s, (struct sockaddr *)&child_sync_sock, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > child_sync_sock.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > child_port = (__extension__ ({ register unsigned short int __v, __x = (child_sync_sock.sin_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > if(cdebug ==1) > { > printf("Child %d: Listen: Bound at port %d\n",(int)chid, tmp_port); > fflush(stdout); > } > if(rc < 0) > { > perror("bind failed\n"); > exit(20); > } > return(s); >} > >int >child_attach(int s, int flag) > > > > > >{ > int me,ns; > struct sockaddr_in *addr; > if(flag) > { > addr=&child_async_sock; > if(cdebug) > { > printf("Child %d attach async\n",(int)chid); > fflush(stdout); > } > } > else > { > addr=&child_sync_sock; > if(cdebug) > { > printf("Child %d attach sync\n",(int)chid); > fflush(stdout); > } > } > me=sizeof(struct sockaddr_in); > if(cdebug) > { > printf("Child %d enters listen\n",(int)chid); > fflush(stdout); > } > listen(s,10); > if(cdebug) > { > printf("Child %d enters accept\n",(int)chid); > fflush(stdout); > } > ns=accept(s,(void *)addr,&me); > if(cdebug) > { > printf("Child %d attached for receive. Sock %d %d\n",(int)chid, ns,(*__errno_location ())); > fflush(stdout); > } > return(ns); >} > > > > > > > >void >child_listen(int sock, int size_of_message) > > > > > >{ > int tsize; > int rcvd; > int s; > int rc; > char *cnc; > > cnc = (char *)&child_rcv_buf[0]; > bzero(cnc, sizeof(child_rcv_buf)); > s = sock; > tsize=size_of_message; > rcvd = 0; > while(rcvd < tsize) > { > if(cdebug ==1) > { > printf("Child %d In recieve \n",(int)chid); > fflush(stdout); > } > > rc=read(s,cnc,size_of_message); > if(rc < 0) > { > perror("Read failed\n"); > exit(21); > } > if(cdebug >= 1) > { > printf("Child %d: Got %d bytes\n",(int)chid, rc); > fflush(stdout); > } > rcvd+=rc; > cnc+=rc; > } > if(cdebug >= 1) > { > printf("Child %d: return from listen\n",(int)chid); > fflush(stdout); > } >} > > > > >int >start_child_listen_async(int size_of_message) > > > > > >{ > int tsize; > int s; > int rc; > int xx; > int tmp_port; > int sockerr; > int recv_buf_size=65536; > xx = 0; > tsize=size_of_message; > s = socket(2, SOCK_STREAM, 0); > if (s < 0) > { > perror("socket failed:"); > exit(19); > } > sockerr = setsockopt (s, 1, 8, (char *) > &recv_buf_size, sizeof(int)); > if ( sockerr == -1 ) { > perror("Error in setsockopt\n"); > } > bzero(&child_async_sock, sizeof(struct sockaddr_in)); > tmp_port=(((((20000 +256)+256)+256)+256)+256); > child_async_sock.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > child_async_sock.sin_family = 2; > child_async_sock.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(s, (struct sockaddr *)&child_async_sock, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > child_async_sock.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > child_async_port = (__extension__ ({ register unsigned short int __v, __x = (child_async_sock.sin_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > if(cdebug ==1) > { > printf("Child %d: Async Listen: Bound at port %d\n",(int)chid,tmp_port); > fflush(stdout); > } > if(rc < 0) > { > perror("bind failed\n"); > exit(20); > } > return(s); >} > > > > > >void >child_listen_async(int sock, int size_of_message) > > > > > >{ > int tsize; > int rcvd; > int s; > int rc; > char *cnc; > > cnc = &child_async_rcv_buf[0]; > s = sock; > tsize=size_of_message; > rcvd = 0; > while(rcvd < tsize) > { > if(cdebug ==1) > { > printf("Child %d In async recieve \n",(int)chid); > fflush(stdout); > } > > rc=read(s,cnc,size_of_message); > if(rc < 0) > { > perror("Read failed\n"); > exit(21); > } > if(cdebug >= 1) > { > printf("Child %d: Got %d bytes (async) \n",(int)chid,rc); > fflush(stdout); > } > rcvd+=rc; > cnc+=rc; > } > if(cdebug >= 1) > { > printf("Child %d: return from async listen\n",(int)chid); > fflush(stdout); > } >} > > > > > > > >int >start_master_send(char *child_host_name, int child_port, struct in_addr *my_s_addr) > > > > > > > >{ > int rc,master_socket_val; > struct sockaddr_in addr,raddr; > struct hostent *he; > int port,tmp_port; > struct in_addr *ip; > he = gethostbyname(child_host_name); > if (he == ((void *)0)) > { > printf("Master: Bad hostname >%s<\n",child_host_name); > fflush(stdout); > exit(22); > } > if(mdebug ==1) > { > printf("Master: start master send: %s\n", he->h_name); > fflush(stdout); > } > ip = (struct in_addr *)he->h_addr_list[0]; > > if(mdebug ==1) > { > printf("Master: child name: %s\n", (char *)inet_ntoa(*ip)); > printf("Master: child Port: %d\n", child_port); > fflush(stdout); > } > > > port=child_port; > my_s_addr->s_addr = ip->s_addr; > > > raddr.sin_family = 2; > raddr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > raddr.sin_addr.s_addr = ip->s_addr; > master_socket_val = socket(2, SOCK_STREAM, 0); > if (master_socket_val < 0) > { > perror("Master: socket failed:"); > exit(23); > } > bzero(&addr, sizeof(struct sockaddr_in)); > tmp_port=(20000 +256); > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(master_socket_val, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > if(mdebug ==1) > { > printf("Master: Bound port\n"); > fflush(stdout); > } > if (rc < 0) > { > perror("Master: bind failed for sync channel to child.\n"); > exit(24); > } > sleep(1); > rc = connect(master_socket_val, (struct sockaddr *)&raddr, > sizeof(struct sockaddr_in)); > if (rc < 0) > { > perror("Master: connect failed\n"); > printf("Error %d\n",(*__errno_location ())); > exit(25); > } > if(mdebug ==1) > { > printf("Master Connected\n"); > fflush(stdout); > } > return (master_socket_val); >} > > > > > > >int >start_master_send_async(char *child_host_name, int child_port, struct in_addr my_s_addr) > > > > > > > >{ > int rc,master_socket_val; > struct sockaddr_in addr,raddr; > int port,tmp_port; > > port=child_port; > > raddr.sin_family = 2; > raddr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > raddr.sin_addr.s_addr = my_s_addr.s_addr; > master_socket_val = socket(2, SOCK_STREAM, 0); > if (master_socket_val < 0) > { > perror("Master: async socket failed:"); > exit(23); > } > bzero(&addr, sizeof(struct sockaddr_in)); > tmp_port=((20000 +256)+256); > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(master_socket_val, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > if(mdebug ==1) > { > printf("Master: Bound async port\n"); > fflush(stdout); > } > if (rc < 0) > { > perror("Master: bind async failed\n"); > exit(24); > } > sleep(1); > rc = connect(master_socket_val, (struct sockaddr *)&raddr, > sizeof(struct sockaddr_in)); > if (rc < 0) > { > perror("Master: async connect failed\n"); > exit(25); > } > if(mdebug ==1) > { > printf("Master async Connected\n"); > fflush(stdout); > } > return (master_socket_val); >} > > > > > > >long long >start_child_proc(int testnum,long long numrecs64, long long reclen) > > > > > > >{ > long long x; > if(distributed && master_iozone) > { > x=(long long)pick_client(testnum,numrecs64, reclen); > } > else > { > x=(long long)fork(); > } > if(mdebug) > printf("Starting proc %d\n",(int)x); > return(x); >} ># 17958 "iozone.c" >int >pick_client(int testnum,long long numrecs64, long long reclen) > > > > > > >{ > int x; > int c_command,child_index; > struct client_command cc; > struct master_command mc; > struct master_neutral_command *mnc; > char command[512]; > struct in_addr my_s_addr; > > bzero(&cc,sizeof(struct client_command)); > for(x=0;x<512;x++) > command[x]=0; > > current_client_number++; > x=current_client_number; > > child_idents[x-1].state = 1; > > > find_remote_shell(remote_shell); > sprintf(command,"%s ",remote_shell); > strcat(command,child_idents[x-1].child_name); > strcat(command," '"); > strcat(command,child_idents[x-1].execute_path); > strcat(command," -+s -t 1 -r 4 -s 4 -+c "); > strcat(command,controlling_host_name); > strcat(command," '"); > system(command); > > > > > if(mdebug) > printf("%s",command); ># 18008 "iozone.c" > child_idents[x-1].state = 2; > > if(mdebug>=1) > printf("\nMaster listening for child to send join message.\n"); > master_listen(master_listen_socket,sizeof(struct master_neutral_command)); > mnc = (struct master_neutral_command *)&master_rcv_buf[0]; > > > > > sscanf(mnc->m_child_port,"%d",&mc.m_child_port); > sscanf(mnc->m_child_async_port,"%d",&mc.m_child_async_port); > sscanf(mnc->m_command,"%d",&mc.m_command); > sscanf(mnc->m_version,"%d",&mc.m_version); > if(mc.m_version != proto_version) > { > printf("Client > %s < is not running the same version of Iozone !!\n", > child_idents[x-1].child_name); > } > > c_port = mc.m_child_port; > a_port = mc.m_child_async_port; > c_command = mc.m_command; > if(mdebug>=1) > { > printf("Master back from listen child Joined.\n"); > printf("Master: Command %d\n",c_command); > } > > > if(mdebug>=1) > printf("Starting master send channel\n"); > master_send_sockets[x-1]= start_master_send(child_idents[x-1].child_name,c_port, > &my_s_addr); > if(mdebug>=1) > printf("Starting master send async channel\n"); > master_send_async_sockets[x-1]= start_master_send_async(child_idents[x-1].child_name,a_port, > my_s_addr); > > child_idents[x-1].master_socket_num = master_send_sockets[x-1]; > child_idents[x-1].master_async_socket_num = master_send_async_sockets[x-1]; > child_idents[x-1].child_number = x-1; > child_idents[x-1].child_port = c_port; > child_idents[x-1].child_async_port = a_port; > > > > > strcpy(cc.c_host_name ,controlling_host_name); > strcpy(cc.c_client_name ,child_idents[x-1].child_name); > strcpy(cc.c_working_dir ,child_idents[x-1].workdir); > strcpy(cc.c_write_traj_filename ,write_traj_filename); > strcpy(cc.c_read_traj_filename ,read_traj_filename); > cc.c_command = 4; > cc.c_client_number = x-1; > cc.c_testnum = testnum; > cc.c_numrecs64 = numrecs64; > cc.c_reclen = reclen; > cc.c_oflag = oflag; > cc.c_noretest = noretest; > cc.c_read_sync = read_sync; > cc.c_jflag = jflag; > cc.c_direct_flag = direct_flag; > cc.c_cpuutilflag = cpuutilflag; > cc.c_async_flag = async_flag; > cc.c_k_flag = k_flag; > cc.c_h_flag = h_flag; > cc.c_mflag = mflag; > cc.c_pflag = pflag; > cc.c_stride_flag = stride_flag; > cc.c_fetchon = fetchon; > cc.c_verify = verify; > cc.c_sverify = sverify; > cc.c_odsync = odsync; > cc.c_diag_v = diag_v; > cc.c_file_lock = file_lock; > cc.c_rec_lock = rlocking; > cc.c_multiplier = multiplier; > cc.c_share_file = share_file; > cc.c_pattern = pattern; > cc.c_version = proto_version; > cc.c_base_time = base_time; > cc.c_num_child = (int)num_child; > cc.c_pct_read = pct_read; > cc.c_advise_op = advise_op; > cc.c_advise_flag = advise_flag; > cc.c_restf = restf; > cc.c_Q_flag = Q_flag; > cc.c_xflag = xflag; > cc.c_w_traj_flag = w_traj_flag; > cc.c_r_traj_flag = r_traj_flag; > cc.c_include_flush = include_flush; > cc.c_OPS_flag = OPS_flag; > cc.c_purge = purge; > cc.c_mmapflag = mmapflag; > cc.c_mmapasflag = mmapasflag; > cc.c_mmapnsflag = mmapnsflag; > cc.c_mmapssflag = mmapssflag; > cc.c_no_copy_flag = no_copy_flag; > cc.c_no_unlink = no_unlink; > cc.c_include_close = include_close; > cc.c_disrupt_flag = disrupt_flag; > cc.c_compute_flag = compute_flag; > cc.c_delay = delay; > cc.c_stride = stride; > cc.c_rest_val = rest_val; > cc.c_delay_start = delay_start; > cc.c_compute_time = compute_time; > cc.c_depth = depth; > cc.c_MS_flag = MS_flag; > cc.c_mmap_mix = mmap_mix; > > > if(mdebug) > printf("Master sending client who he is\n"); > master_send(master_send_sockets[x-1],cc.c_client_name, &cc,sizeof(struct client_command)); > > child_idents[x-1].state = 3; > > > > > if(mdebug>=1) > printf("Master listening for child to send at barrier message.\n"); > master_listen(master_listen_socket,sizeof(struct master_neutral_command)); > mnc = (struct master_neutral_command *)&master_rcv_buf[0]; > > > > sscanf(mnc->m_client_number,"%d",&mc.m_client_number); > > > > sscanf(mnc->m_child_flag,"%lld",&mc.m_child_flag); > > > child_index = mc.m_client_number; > child_stat = (struct child_stats *)&shmaddr[child_index]; > child_stat->flag = (long long)(mc.m_child_flag); > if(mdebug>=1) > printf("Master sees child %d at barrier message.\n",child_index); > > return(x); >} ># 18169 "iozone.c" >void >become_client(void) > > > > >{ > int x,testnum; > struct master_command mc; > struct client_command cc; > struct client_neutral_command *cnc; > char client_name[256]; > char *workdir; > > bzero(&mc,sizeof(struct master_command)); > x=fork(); > if(x != 0) > exit(0); > > > > (void)gethostname(client_name,256); > > fflush(stdout); > fflush(stderr); > if(cdebug) > { > newstdin=freopen("/tmp/don_in","r+",stdin); > newstdout=freopen("/tmp/don_out","a+",stdout); > newstderr=freopen("/tmp/don_err","a+",stderr); > } > else > { > fclose(stdin); > fclose(stdout); > fclose(stderr); > } > if(cdebug>=1) > { > printf("My name = %s, Controller's name = %s\n",client_name, controlling_host_name); > } > > > > l_sock = start_child_listen(sizeof(struct client_neutral_command)); > l_async_sock = start_child_listen_async(sizeof(struct client_neutral_command)); > > > > s_sock = start_child_send(controlling_host_name); > > > > strcpy(mc.m_host_name,controlling_host_name); > strcpy(mc.m_client_name,client_name); > mc.m_child_port = child_port; > mc.m_child_async_port = child_async_port; > mc.m_command = 1; > mc.m_version = proto_version; > if(cdebug) > { > printf("Child %s sends JOIN to master %s My port %d\n", > client_name,controlling_host_name,child_port); > fflush(stdout); > } > child_send(s_sock, controlling_host_name,(struct master_command *)&mc, sizeof(struct master_command)); > > l_sock=child_attach(l_sock,0); > l_async_sock=child_attach(l_async_sock,1); > > > > > if(cdebug>=1) > { > printf("Child %s waiting for who am I\n",client_name); > fflush(stdout); > } > child_listen(l_sock,sizeof(struct client_neutral_command)); > cnc = (struct client_neutral_command *)&child_rcv_buf; > bzero(&cc, sizeof(struct client_command)); > > > sscanf(cnc->c_command,"%d",&cc.c_command); > sscanf(cnc->c_client_name,"%s",cc.c_client_name); > sscanf(cnc->c_client_number,"%d",&cc.c_client_number); > sscanf(cnc->c_host_name,"%s",cc.c_host_name); > > if(cc.c_command == 6 || cc.c_command==7) > { > if(cdebug) > { > printf("Child %d received terminate on sync channel !!\n",(int)chid); > fflush(stdout); > } > exit(1); > } > > if(cdebug) > { > printf("Child sees: \n Client name %s \n Client_num # %d \n Host_name %s\n", > cc.c_client_name,cc.c_client_number,cc.c_host_name); > fflush(stdout); > } ># 18292 "iozone.c" > sscanf(cnc->c_numrecs64,"%lld",&cc.c_numrecs64); > sscanf(cnc->c_reclen,"%lld",&cc.c_reclen); > sscanf(cnc->c_fetchon,"%lld",&cc.c_fetchon); > sscanf(cnc->c_purge,"%lld",&cc.c_purge); > sscanf(cnc->c_delay,"%lld",&cc.c_delay); > sscanf(cnc->c_stride,"%lld",&cc.c_stride); > sscanf(cnc->c_rest_val,"%lld",&cc.c_rest_val); > sscanf(cnc->c_delay_start,"%lld",&cc.c_delay_start); > sscanf(cnc->c_depth,"%lld",&cc.c_depth); > > sscanf(cnc->c_testnum,"%d",&cc.c_testnum); > sscanf(cnc->c_client_number,"%d",&cc.c_client_number); > sscanf(cnc->c_working_dir,"%s",cc.c_working_dir); > sscanf(cnc->c_write_traj_filename,"%s",cc.c_write_traj_filename); > sscanf(cnc->c_read_traj_filename,"%s",cc.c_read_traj_filename); > sscanf(cnc->c_noretest,"%d",&cc.c_noretest); > sscanf(cnc->c_read_sync,"%d",&cc.c_read_sync); > sscanf(cnc->c_jflag,"%d",&cc.c_jflag); > sscanf(cnc->c_direct_flag,"%d",&cc.c_direct_flag); > sscanf(cnc->c_cpuutilflag,"%d",&cc.c_cpuutilflag); > sscanf(cnc->c_async_flag,"%d",&cc.c_async_flag); > sscanf(cnc->c_k_flag,"%d",&cc.c_k_flag); > sscanf(cnc->c_h_flag,"%d",&cc.c_h_flag); > sscanf(cnc->c_mflag,"%d",&cc.c_mflag); > sscanf(cnc->c_pflag,"%d",&cc.c_pflag); > sscanf(cnc->c_stride_flag,"%d",&cc.c_stride_flag); > sscanf(cnc->c_verify,"%d",&cc.c_verify); > sscanf(cnc->c_sverify,"%d",&cc.c_sverify); > sscanf(cnc->c_odsync,"%d",&cc.c_odsync); > sscanf(cnc->c_diag_v,"%d",&cc.c_diag_v); > sscanf(cnc->c_file_lock,"%d",&cc.c_file_lock); > sscanf(cnc->c_rec_lock,"%d",&cc.c_rec_lock); > sscanf(cnc->c_multiplier,"%d",&cc.c_multiplier); > sscanf(cnc->c_share_file,"%d",&cc.c_share_file); > sscanf(cnc->c_pattern,"%d",&cc.c_pattern); > sscanf(cnc->c_version,"%d",&cc.c_version); > sscanf(cnc->c_base_time,"%d",&cc.c_base_time); > sscanf(cnc->c_num_child,"%d",&cc.c_num_child); > sscanf(cnc->c_pct_read,"%d",&cc.c_pct_read); > sscanf(cnc->c_advise_op,"%d",&cc.c_advise_op); > sscanf(cnc->c_advise_flag,"%d",&cc.c_advise_flag); > sscanf(cnc->c_restf,"%d",&cc.c_restf); > sscanf(cnc->c_Q_flag,"%d",&cc.c_Q_flag); > sscanf(cnc->c_xflag,"%d",&cc.c_xflag); > sscanf(cnc->c_include_flush,"%d",&cc.c_include_flush); > sscanf(cnc->c_OPS_flag,"%d",&cc.c_OPS_flag); > sscanf(cnc->c_mmapflag,"%d",&cc.c_mmapflag); > sscanf(cnc->c_mmapasflag,"%d",&cc.c_mmapasflag); > sscanf(cnc->c_mmapnsflag,"%d",&cc.c_mmapnsflag); > sscanf(cnc->c_mmapssflag,"%d",&cc.c_mmapssflag); > sscanf(cnc->c_no_copy_flag,"%d",&cc.c_no_copy_flag); > sscanf(cnc->c_w_traj_flag,"%d",&cc.c_w_traj_flag); > sscanf(cnc->c_r_traj_flag,"%d",&cc.c_r_traj_flag); > sscanf(cnc->c_no_unlink,"%d",&cc.c_no_unlink); > sscanf(cnc->c_include_close,"%d",&cc.c_include_close); > sscanf(cnc->c_disrupt_flag,"%d",&cc.c_disrupt_flag); > sscanf(cnc->c_compute_flag,"%d",&cc.c_compute_flag); > sscanf(cnc->c_MS_flag,"%d",&cc.c_MS_flag); > sscanf(cnc->c_mmap_mix,"%d",&cc.c_mmap_mix); > sscanf(cnc->c_compute_time,"%f",&cc.c_compute_time); > > strcpy(write_traj_filename,cc.c_write_traj_filename); > strcpy(read_traj_filename,cc.c_read_traj_filename); > numrecs64 = cc.c_numrecs64; > reclen = cc.c_reclen; > testnum = cc.c_testnum; > chid = cc.c_client_number; > workdir=cc.c_working_dir; > oflag = cc.c_oflag; > noretest = cc.c_noretest; > read_sync = cc.c_read_sync; > jflag = cc.c_jflag; > direct_flag = cc.c_direct_flag; > cpuutilflag = cc.c_cpuutilflag; > async_flag = cc.c_async_flag; > k_flag = cc.c_k_flag; > h_flag = cc.c_h_flag; > mflag = cc.c_mflag; > pflag = cc.c_pflag; > stride_flag = cc.c_stride_flag; > fetchon = cc.c_fetchon; > verify = cc.c_verify; > diag_v = cc.c_diag_v; > if(diag_v) > sverify = 0; > else > sverify = cc.c_sverify; > file_lock = cc.c_file_lock; > rlocking = cc.c_rec_lock; > multiplier = cc.c_multiplier; > share_file = cc.c_share_file; > pattern = cc.c_pattern; > > base_time=cc.c_base_time; > num_child=(long long)cc.c_num_child; > pct_read=cc.c_pct_read; > advise_op=cc.c_advise_op; > advise_flag=cc.c_advise_flag; > restf=cc.c_restf; > Q_flag = cc.c_Q_flag; > xflag = cc.c_xflag; > w_traj_flag = cc.c_w_traj_flag; > r_traj_flag = cc.c_r_traj_flag; > include_flush = cc.c_include_flush; > OPS_flag = cc.c_OPS_flag; > purge = cc.c_purge; > mmapflag = cc.c_mmapflag; > mmapasflag = cc.c_mmapasflag; > mmapnsflag = cc.c_mmapnsflag; > mmapssflag = cc.c_mmapssflag; > no_copy_flag = cc.c_no_copy_flag; > no_unlink = cc.c_no_unlink; > include_close = cc.c_include_close; > disrupt_flag = cc.c_disrupt_flag; > compute_flag = cc.c_compute_flag; > MS_flag = cc.c_MS_flag; > mmap_mix = cc.c_mmap_mix; > delay = cc.c_delay; > stride = cc.c_stride; > rest_val = cc.c_rest_val; > depth = cc.c_depth; > delay_start = cc.c_delay_start; > compute_time = cc.c_compute_time; > if(cdebug) > { > printf("Child %d change directory to %s\n",(int)chid,workdir); > fflush(stdout); > } > > > > chdir(workdir); > start_child_listen_loop(); > > > > > switch(testnum) { > > case 1 : > if(cdebug>=1) > { > printf("Child %d running thread_write_test\n",(int)chid); > fflush(stdout); > } > thread_write_test((long)0); > break; > > case 10 : > if(cdebug>=1) > { > printf("Child %d running thread_pwrite_test\n",(int)chid); > fflush(stdout); > } > thread_pwrite_test((long)0); > break; > > case 2 : > if(cdebug>=1) > { > printf("Child %d running thread_rewrite_test\n",(int)chid); > fflush(stdout); > } > thread_rwrite_test((long)0); > break; > case 3 : > if(cdebug>=1) > { > printf("Child %d running thread_read_test\n",(int)chid); > fflush(stdout); > } > thread_read_test((long)0); > break; > > case 11 : > if(cdebug>=1) > { > printf("Child %d running thread_read_test\n",(int)chid); > fflush(stdout); > } > thread_pread_test((long)0); > break; > > case 4 : > if(cdebug>=1) > { > printf("Child %d running thread_reread_test\n",(int)chid); > fflush(stdout); > } > thread_rread_test((long)0); > break; > case 5 : > if(cdebug>=1) > { > printf("Child %d running thread_stride_read_test\n",(int)chid); > fflush(stdout); > } > thread_stride_read_test((long)0); > break; > case 6 : > if(cdebug>=1) > { > printf("Child %d running random read test\n",(int)chid); > fflush(stdout); > } > thread_ranread_test((long)0); > break; > case 7 : > if(cdebug>=1) > { > printf("Child %d running random write test\n",(int)chid); > fflush(stdout); > } > thread_ranwrite_test((long)0); > break; > case 8 : > if(cdebug>=1) > { > printf("Child %d running reverse read test\n",(int)chid); > fflush(stdout); > } > thread_reverse_read_test((long)0); > break; > case 9 : > if(cdebug>=1) > { > printf("Child %d running random mix test\n",(int)chid); > fflush(stdout); > } > thread_mix_test((long)0); > break; > case 12 : > if(cdebug>=1) > { > printf("Child %d running cleanup\n",(int)chid); > fflush(stdout); > } > thread_cleanup_test((long)0); > break; > }; > if(cdebug>=1) > { > printf("Child %d finished running test.\n",(int)chid); > fflush(stdout); > } > > > stop_child_listen(l_sock); > stop_child_send(s_sock); > > exit(0); >} > > > > > > >void >tell_master_stats(testnum , chid, throughput, actual, > cpu_time, wall_time, stop_flag, child_flag) >int testnum; >long long chid; >double throughput, actual, wall_time; >float cpu_time; >char stop_flag; >long long child_flag; ># 18576 "iozone.c" >{ > struct master_command mc; > bzero(&mc,sizeof(struct master_command)); > mc.m_client_number = (int) chid; > mc.m_throughput= throughput; > mc.m_testnum = testnum; > mc.m_actual = actual; > mc.m_cputime = cpu_time; > mc.m_walltime = wall_time; > mc.m_stop_flag = stop_flag; > mc.m_child_flag = child_flag; > mc.m_command = 2; > mc.m_version = proto_version; > if(cdebug>=1) > { > printf("Child %d: Tell master stats and terminate\n",(int)chid); > fflush(stdout); > } > child_send(s_sock, controlling_host_name,(struct master_command *)&mc, sizeof(struct master_command)); >} > > > > > > > >void >stop_master_listen_loop(void) > > > > >{ > if(mdebug>=1) > printf("Stopping Master listen loop"); > kill(master_listen_pid,9); >} > > > > > > > >void >tell_master_ready(long long chid) > > > > > >{ > struct master_command mc; > bzero(&mc,sizeof(struct master_command)); > if(cdebug>=1) > { > printf("Child %d: Tell master to go\n",(int)chid); > fflush(stdout); > } > mc.m_command = 3; > mc.m_version = proto_version; > mc.m_child_flag = 1; > mc.m_client_number = (int)chid; > child_send(s_sock, controlling_host_name,(struct master_command *)&mc, sizeof(struct master_command)); >} > > > > > > >void >wait_for_master_go(long long chid) > > > > > >{ > struct client_neutral_command *cnc; > struct client_command cc; > bzero(&cc,sizeof(struct client_command)); > child_listen(l_sock,sizeof(struct client_neutral_command)); > cnc = (struct client_neutral_command *)child_rcv_buf; > sscanf(cnc->c_command,"%d",&cc.c_command); > if(cc.c_command == 6 || cc.c_command==7) > { > if(cdebug) > { > printf("Child %d received terminate on sync channel at barrier !!\n",(int)chid); > fflush(stdout); > } > exit(1); > } > if(cdebug>=1) > printf("Child %d return from wait_for_master_go\n",(int)chid); >} ># 18684 "iozone.c" >void >start_master_listen_loop(int num) > > > > > >{ > int i; > struct child_stats *child_stat; > struct master_neutral_command *mnc; > struct master_command mc; > int temp; > > master_join_count=num; > master_listen_pid=fork(); > if(master_listen_pid!=0) > return; > if(mdebug>=1) > printf("Starting Master listen loop m %d c %d count %d\n",master_iozone, > client_iozone,num); > > while(master_join_count) > { > master_listen(master_listen_socket,sizeof(struct master_neutral_command)); > mnc=(struct master_neutral_command *)&master_rcv_buf[0]; > > > > > sscanf(mnc->m_command,"%d",&mc.m_command); > sscanf(mnc->m_client_number,"%d",&mc.m_client_number); > sscanf(mnc->m_version,"%d",&mc.m_version); > if(mc.m_version != proto_version) > { > printf("Client # %d is not running the same version of Iozone !\n", > mc.m_client_number); > } > > > > sscanf(mnc->m_child_flag,"%lld",&mc.m_child_flag); > > sscanf(mnc->m_actual,"%f",&mc.m_actual); > sscanf(mnc->m_throughput,"%f",&mc.m_throughput); > sscanf(mnc->m_cputime,"%f",&mc.m_cputime); > sscanf(mnc->m_walltime,"%f",&mc.m_walltime); > sscanf(mnc->m_stop_flag,"%d",&temp); > mc.m_stop_flag = temp; > > switch(mc.m_command) { > case 2: > i = mc.m_client_number; > if(mdebug) > printf("loop: R_STAT_DATA for client %d\n",i); > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = mc.m_child_flag; > child_stat->actual = mc.m_actual; > child_stat->throughput = mc.m_throughput; > child_stat->cputime = mc.m_cputime; > child_stat->walltime = mc.m_walltime; > *stop_flag = mc.m_stop_flag; > master_join_count--; > break; > case 3: > if(mdebug) > printf("loop: R_FLAG_DATA: Client %d flag %d \n", > (int)mc.m_client_number, > (int)mc.m_child_flag); > i = mc.m_client_number; > child_stat = (struct child_stats *)&shmaddr[i]; > child_stat->flag = (long long)(mc.m_child_flag); > break; > case 5: > if(mdebug) > printf("Master loop: R_STOP_FLAG: Client %d STOP_FLAG \n", > (int)mc.m_client_number); > *stop_flag=1; > distribute_stop(); > break; > } > > } > exit(0); >} > > > > > >void >start_child_listen_loop(void) > > > > >{ > int i; > struct child_stats *child_stat; > struct client_command cc; > struct client_neutral_command *cnc; > > client_listen_pid=fork(); > if(client_listen_pid!=0) > return; > if(cdebug>=1) > printf("Child %d starting client listen loop\n",(int)chid); > > while(1) > { > bzero(&cc,sizeof(struct client_command)); > child_listen_async(l_async_sock,sizeof(struct client_neutral_command)); > cnc=(struct client_neutral_command *)&child_async_rcv_buf; > > > > sscanf(cnc->c_command,"%d",&cc.c_command); > sscanf(cnc->c_client_number,"%d",&cc.c_client_number); > sscanf(cnc->c_stop_flag,"%d",&cc.c_stop_flag); > > switch(cc.c_command) { > case 5: > i = cc.c_client_number; > if(cdebug) > printf("child loop: R_STOP_FLAG for client %d\n",i); > child_stat = (struct child_stats *)&shmaddr[i]; > *stop_flag = cc.c_stop_flag; > sent_stop=1; > break; > case 6: > if(cdebug) > { > printf("Child loop: R_TERMINATE: Client %d \n", > (int)cc.c_client_number); > fflush(stdout); > } > sleep(2); > > stop_child_listen(l_async_sock); > exit(0); > case 7: > if(cdebug) > { > printf("Child loop: R_DEATH: Client %d \n", > (int)cc.c_client_number); > fflush(stdout); > } > i = cc.c_client_number; > child_remove_files(i); > sleep(2); > > stop_child_listen(l_async_sock); > exit(0); > } > > } >} > > > > > > >void >tell_children_begin(long long childnum) > > > > > >{ > struct client_command cc; > int x; > bzero(&cc,sizeof(struct client_command)); > x = (int) childnum; > if(mdebug>=1) > printf("Master: Tell child %d to begin\n",x); > cc.c_command = 3; > cc.c_child_flag = 2; > cc.c_client_number = (int)childnum; > master_send(master_send_sockets[x],child_idents[x].child_name, &cc,sizeof(struct client_command)); >} > > > > > > > >void >wait_dist_join(void) > > > > >{ > wait(0); > if(mdebug) > printf("Master: All children have finished. Sending terminate\n"); > terminate_child_async(); > current_client_number=0; >} ># 18899 "iozone.c" >int >get_client_info(void) > > > > >{ > FILE *fd; > char *ret1; > int count; > char buffer[200]; > count=0; > fd=fopen(client_filename,"r"); > if(fd == (FILE *)((void *)0)) > { > printf("Unable to open client file \"%s\"\n", > client_filename); > exit(176); > } > while(1) > { > ret1=fgets(buffer,200,fd); > if(ret1== (char *)((void *)0)) > break; > count+=parse_client_line(buffer,count); > } > fclose(fd); > return(count); >} ># 18941 "iozone.c" >int >parse_client_line(char *buffer,int line_num) > > > > > > >{ > int num; > > > > if(buffer[0]=='#') > return(0); > num=sscanf(buffer,"%s %s %s\n", > child_idents[line_num].child_name, > child_idents[line_num].workdir, > child_idents[line_num].execute_path); > if((num > 0) && (num !=3)) > { > printf("Bad Client Identity at entry %d\n",line_num); > printf("Client: -> %s Workdir: -> %s Execute_path: -> %s \n", > child_idents[line_num].child_name, > child_idents[line_num].workdir, > child_idents[line_num].execute_path); > exit(203); > } > > return(1); >} > > > > > > >void >child_remove_files(int i) > > > > > >{ > > char *dummyfile[256]; > dummyfile[i]=(char *)malloc((size_t)1000); > sprintf(dummyfile[i],"%s.DUMMY.%d",filearray[i],i); > if(cdebug) > { > printf("Child %d remove: %s \n",(int)chid, dummyfile[i]); > } > unlink(dummyfile[i]); >} > > > > > > > >void >terminate_child_async(void) > > > > >{ > int i; > struct client_command cc; > bzero(&cc,sizeof(struct client_command)); > cc.c_command = 6; > for(i=0;i<num_child;i++) > { > child_idents[i].state = 1; > cc.c_client_number = (int)i; > if(mdebug) > printf("Master terminating async channels to children.\n"); > master_send(master_send_async_sockets[i],child_idents[i].child_name, &cc,sizeof(struct client_command)); > } >} > > > > > > >void >distribute_stop(void) > > > > >{ > int i; > struct client_command cc; ># 19046 "iozone.c" > if(sent_stop) > { > if(mdebug) > { > s_count++; > printf("Master not send stop %d\n",s_count); > } > return; > } > bzero(&cc,sizeof(struct client_command)); > cc.c_command = 5; > cc.c_stop_flag = 1; > for(i=0;i<num_child;i++) > { > cc.c_client_number = (int)i; > if(mdebug) > printf("Master distributing stop flag to child %d\n",i); > master_send(master_send_async_sockets[i],child_idents[i].child_name, &cc,sizeof(struct client_command)); > } > sent_stop=1; >} > > > > > >void >send_stop(void) > > > > >{ > struct master_command mc; > > bzero(&mc, sizeof(struct master_command)); > mc.m_command = 5; > mc.m_version = proto_version; > mc.m_client_number = chid; > if(cdebug) > { > printf("Child %d sending stop flag to master\n",(int)chid); > fflush(stdout); > } > child_send(s_sock, controlling_host_name,(struct master_command *)&mc, sizeof(struct master_command)); >} ># 19109 "iozone.c" >void >cleanup_children(void) > > > > >{ > int i; > struct client_command cc; > bzero(&cc,sizeof(struct client_command)); > cc.c_command = 7; > for(i=0;i<num_child;i++) > { > cc.c_client_number = (int)i; > > if(child_idents[i].state == 1) > ; > > if(child_idents[i].state == 2) > { > if(mdebug) > printf("Master sending signaled death to child !!\n"); > master_send(master_send_sockets[i],child_idents[i].child_name, &cc,sizeof(struct client_command)); > } > > if(child_idents[i].state == 3) > { > if(mdebug) > printf("Master sending signaled death to child !!\n"); > master_send(master_send_sockets[i],child_idents[i].child_name, &cc,sizeof(struct client_command)); > if(mdebug) > printf("Master sending signaled death to child async !!\n"); > master_send(master_send_async_sockets[i],child_idents[i].child_name, &cc,sizeof(struct client_command)); > } > > } >} > > > > > > >void >cleanup_comm(void) > > > > >{ > int i; > for(i=0;i<num_child;i++) > { > close(master_send_sockets[i]); > close(master_send_async_sockets[i]); > } >} > > >void >find_remote_shell(char *shell) > > > > > >{ > char *value; > value=(char *)getenv("RSH"); > if(value) > { > strcpy(shell,value); > return; > } > > > > strcpy(shell,"rsh"); > > return; >} > > > > > > >void >mix_perf_test(off64_t kilo64,long long reclen,long long *data1,long long *data2) > > > > > > > >{ > return; > > > > > >} > > > > >char *sp_dest; > >int sp_child_listen_port = 31000; >int sp_child_esend_port = (31000 +10); > >int sp_master_listen_port = ((31000 +10)+10); >int sp_master_esend_port = (((31000 +10)+10)+10); > >int sp_master_results_port = ((((31000 +10)+10)+10)+10); > >struct in_addr sp_my_cs_addr; >struct in_addr sp_my_ms_addr; >struct sockaddr_in sp_child_sync_sock, sp_child_async_sock; >struct sockaddr_in sp_master_sync_sock, sp_master_async_sock; >char *sp_buf; >char sp_command[1024]; >char sp_remote_shell[100]; >int sp_child_mode; >int sp_count,sp_msize,sp_once; >int sp_tcount; >double sp_start_time,sp_finish_time; >void sp_send_result(int, int, float ); >void sp_get_result(int , int ); >void sp_do_child_t(void); >void sp_do_master_t(void); >void speed_main(char *, char *, long long ,long long , int); >int sp_cret; >char sp_remote_host[256]; >char sp_master_host[256]; >char sp_location[256]; > > > > > > >void >speed_main(char *client_name, char *e_path, long long reclen, > long long kilos, int client_flag) ># 19265 "iozone.c" >{ > int x; > > > strcpy(sp_master_host,controlling_host_name); > sp_msize=(int)reclen; > sp_count=((int)kilos*1024)/(int)reclen; > if(!client_flag) > { > printf("\n"); > strcpy(sp_remote_host,client_name); > strcpy(sp_location,e_path); > } > > if(client_flag) > sp_child_mode=1; > sp_buf=(char *)malloc(sp_msize); > bzero(sp_buf,sp_msize); > > if(sp_child_mode) > { > close(0); > close(1); > close(2); > if(cdebug) > { > newstdin=freopen("/tmp/don_in","r+",stdin); > newstdout=freopen("/tmp/don_out","a+",stdout); > newstderr=freopen("/tmp/don_err","a+",stderr); > } > sp_dest=sp_master_host; > sp_do_child_t(); > free(sp_buf); > exit(0); > } > x=fork(); > if(x==0) > { > find_remote_shell(sp_remote_shell); > sprintf(sp_command,"%s %s %s -+s -t 1 -r %d -s %d -+c %s -+t ", > sp_remote_shell, sp_remote_host, > sp_location, (int)reclen/1024, > (int)kilos,sp_master_host); > > system(sp_command); > exit(0); > } > else > { > if(!sp_once) > { > printf("***************************************************\n"); > printf("* >>>>> Client Network Speed check <<<<< *\n"); > printf("***************************************************\n\n"); > printf("Master: %s\n",sp_master_host); > printf("Transfer size %d bytes \n",sp_msize); > printf("Count %d\n",sp_count); > printf("Total size %d kbytes \n\n", > (sp_msize*sp_count)/1024); > sp_once=1; > } > sp_dest=sp_remote_host; > sleep(1); > sp_do_master_t(); > free(sp_buf); > } >} > > > > > >void >sp_get_result(int port,int flag) > > > > > >{ > int tcfd; > float throughput; > int count; > char mybuf[1024]; > int sp_offset,xx; > > tcfd=sp_start_master_listen(port, 1024); > sp_offset=0; > while(sp_offset < 1024) > { > xx=read(tcfd,&mybuf[sp_offset],1024); > sp_offset+=xx; > } > sscanf(mybuf,"%d %f",&count,&throughput); > if(!flag) > printf("%-20s received %10d Kbytes @ %10.2f Kbytes/sec \n", > sp_remote_host,count,throughput); > else > printf("%-20s sent %10d Kbytes @ %10.2f Kbytes/sec \n", > sp_remote_host,count,throughput); > close(tcfd); >} > > > > > >void >sp_send_result(int port, int count, float throughput) > > > > > > >{ > int msfd; > char mybuf[1024]; > sprintf(mybuf,"%d %f",count, throughput); > msfd=sp_start_child_send(sp_dest, port, &sp_my_cs_addr); > write(msfd,mybuf,1024); > if(cdebug) > printf("Sending result\n"); > close(msfd); >} > > > > > > > >int >sp_start_master_send(char *sp_child_host_name, int sp_child_listen_port, struct in_addr *sp_my_ms_addr) > > > > > > > >{ > int rc,master_socket_val; > struct sockaddr_in addr,raddr; > struct hostent *he; > int port,tmp_port; > struct in_addr *ip; > he = gethostbyname(sp_child_host_name); > if (he == ((void *)0)) > { > printf("Master: Bad hostname >%s<\n",sp_child_host_name); > fflush(stdout); > exit(22); > } > if(mdebug ==1) > { > printf("Master: start master send: %s\n", he->h_name); > fflush(stdout); > } > ip = (struct in_addr *)he->h_addr_list[0]; > > if(mdebug ==1) > { > printf("Master: child name: %s\n", (char *)inet_ntoa(*ip)); > printf("Master: child Port: %d\n", sp_child_listen_port); > fflush(stdout); > } > > > port=sp_child_listen_port; > sp_my_ms_addr->s_addr = ip->s_addr; > > > raddr.sin_family = 2; > raddr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > raddr.sin_addr.s_addr = ip->s_addr; > master_socket_val = socket(2, SOCK_STREAM, 0); > if (master_socket_val < 0) > { > perror("Master: socket failed:"); > exit(23); > } > bzero(&addr, sizeof(struct sockaddr_in)); > tmp_port=sp_master_esend_port; > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(master_socket_val, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > if(mdebug ==1) > { > printf("Master: Bound port\n"); > fflush(stdout); > } > if (rc < 0) > { > perror("Master: bind failed for sync channel to child.\n"); > exit(24); > } > sleep(1); > rc = connect(master_socket_val, (struct sockaddr *)&raddr, > sizeof(struct sockaddr_in)); > if (rc < 0) > { > perror("Master: connect failed\n"); > printf("Error %d\n",(*__errno_location ())); > exit(25); > } > if(mdebug ==1) > { > printf("Master Connected\n"); > fflush(stdout); > } > return (master_socket_val); >} > > > > > >int >sp_start_child_listen(int listen_port, int size_of_message) > > > > > > >{ > int tsize; > int s,ns,me; > int rc; > int xx; > int tmp_port; > struct sockaddr_in *addr; > int sockerr; > int recv_buf_size=65536; > xx = 0; > me=sizeof(struct sockaddr_in); > tsize=size_of_message; > s = socket(2, SOCK_STREAM, 0); > if (s < 0) > { > perror("socket failed:"); > exit(19); > } > sockerr = setsockopt (s, 1, 8, (char *) > &recv_buf_size, sizeof(int)); > if ( sockerr == -1 ) { > perror("Error in setsockopt\n"); > } > bzero(&sp_child_sync_sock, sizeof(struct sockaddr_in)); > tmp_port=sp_child_listen_port; > sp_child_sync_sock.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > sp_child_sync_sock.sin_family = 2; > sp_child_sync_sock.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(s, (struct sockaddr *)&sp_child_sync_sock, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > sp_child_sync_sock.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > sp_child_listen_port = (__extension__ ({ register unsigned short int __v, __x = (sp_child_sync_sock.sin_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > if(cdebug ==1) > { > printf("Child: Listen: Bound at port %d\n", tmp_port); > fflush(stdout); > } > if(rc < 0) > { > perror("bind failed\n"); > exit(20); > } > > addr=&sp_child_async_sock; > listen(s,10); > if(cdebug) > { > printf("Child enters accept\n"); > fflush(stdout); > } > ns=accept(s,(void *)addr,&me); > if(cdebug) > { > printf("Child attached for receive. Sock %d %d\n", ns,(*__errno_location ())); > fflush(stdout); > } > close(s); > return(ns); >} > > > > > > >void >sp_do_child_t(void) > > > > >{ > int i,y; > int offset; > int sp_tcount=0; > > > > > sp_crfd=sp_start_child_listen(sp_child_listen_port, sp_msize); > sp_start_time=time_so_far(); > for(i=0;i<sp_count;i++) > { > offset=0; > while(offset<sp_msize) > { > y=read(sp_crfd,&sp_buf[offset],sp_msize-offset); > if(y < 0) > { > if(cdebug) > printf("Child error %d offset %d\n", > (*__errno_location ()),offset); > exit(1); > } > offset+=y; > if(cdebug) > printf("Child offset %d read %d\n",offset,y); > } > sp_tcount+=offset; > } > sp_finish_time=time_so_far(); > > close(sp_crfd); > sleep(1); > sp_send_result(sp_master_results_port, sp_tcount/1024, > (float)(sp_tcount/1024)/(sp_finish_time-sp_start_time)); > > sleep(1); > > > > sp_csfd=sp_start_child_send(sp_dest, sp_master_listen_port, > &sp_my_cs_addr); > sp_tcount=0; > offset=0; > sp_start_time=time_so_far(); > for(i=0;i<sp_count;i++) > { > y=write(sp_csfd,sp_buf,sp_msize); > sp_tcount+=y; > } > sp_finish_time=time_so_far(); > close(sp_csfd); > sleep(1); > sp_send_result(sp_master_results_port, sp_tcount/1024, > (float)(sp_tcount/1024)/(sp_finish_time-sp_start_time)); > if(cdebug) > printf("child exits\n"); >} > > > > > >void >sp_do_master_t(void) > > > > >{ > int i,y,sp_offset; > int sp_tcount = 0; > > > > > > sp_msfd=sp_start_master_send(sp_dest, sp_child_listen_port, > &sp_my_ms_addr); > sp_start_time=time_so_far(); > for(i=0;i<sp_count;i++) > { > y=write(sp_msfd,sp_buf,sp_msize); > sp_tcount+=y; > } > sp_finish_time=time_so_far(); > close(sp_msfd); > sp_msfd=0; > sp_get_result(sp_master_results_port,0); > printf("%-20s sent %10d kbytes @ %10.2f Kbytes/sec \n", > sp_master_host,sp_tcount/1024, > (float)(sp_tcount/1024)/(sp_finish_time-sp_start_time)); > > > > > > sp_mrfd=sp_start_master_listen(sp_master_listen_port, sp_msize); > sp_offset=0; > sp_start_time=time_so_far(); > sp_tcount=0; > for(i=0;i<sp_count;i++) > { > sp_offset=0; > while(sp_offset<sp_msize) > { > y=read(sp_mrfd,&sp_buf[sp_offset],sp_msize-sp_offset); > if(y < 0) > { > printf("Master error %d offset %d\n",(*__errno_location ()), > sp_offset); > exit(1); > } > sp_offset+=y; > > } > sp_tcount+=sp_offset; > } > sp_finish_time=time_so_far(); > sp_get_result(sp_master_results_port,1); > printf("%-20s received %10d kbytes @ %10.2f Kbytes/sec \n", > sp_master_host,sp_tcount/1024, > (float)(sp_tcount/1024)/(sp_finish_time-sp_start_time)); > printf("\n"); > wait(((void *)0)); > close(sp_mrfd); > sp_mrfd=0; >} > > > > > >int >sp_start_master_listen(int sp_master_listen_port, int sp_size_of_message) > > > > > > >{ > int tsize; > int s,ns,me; > int rc; > int xx; > int tmp_port; > struct sockaddr_in *addr; > int sockerr; > int recv_buf_size=65536; > xx = 0; > me=sizeof(struct sockaddr_in); > tsize=sp_size_of_message; > s = socket(2, SOCK_STREAM, 0); > if (s < 0) > { > perror("socket failed:"); > exit(19); > } > sockerr = setsockopt (s, 1, 8, (char *) > &recv_buf_size, sizeof(int)); > if ( sockerr == -1 ) { > perror("Error in setsockopt\n"); > } > bzero(&sp_master_sync_sock, sizeof(struct sockaddr_in)); > tmp_port=sp_master_listen_port; > sp_master_sync_sock.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > sp_master_sync_sock.sin_family = 2; > sp_master_sync_sock.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(s, (struct sockaddr *)&sp_master_sync_sock, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > sp_master_sync_sock.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > sp_master_listen_port = (__extension__ ({ register unsigned short int __v, __x = (sp_master_sync_sock.sin_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > if(mdebug ==1) > { > printf("Master: Listen: Bound at port %d\n", tmp_port); > fflush(stdout); > } > if(rc < 0) > { > perror("bind failed\n"); > exit(20); > } > > addr=&sp_master_async_sock; > listen(s,10); > if(mdebug) > { > printf("Master enters accept\n"); > fflush(stdout); > } > ns=accept(s,(void *)addr,&me); > if(mdebug) > { > printf("Master attached for receive. Sock %d %d\n", ns,(*__errno_location ())); > fflush(stdout); > } > close(s); > return(ns); >} > > > > > > >int >sp_start_child_send(char *sp_master_host_name, int sp_master_listen_port, struct in_addr *sp_my_cs_addr) > > > > > > > >{ > int rc,sp_child_socket_val; > struct sockaddr_in addr,raddr; > struct hostent *he; > int port,tmp_port; > struct in_addr *ip; > he = gethostbyname(sp_master_host_name); > if (he == ((void *)0)) > { > printf("Child: Bad hostname >%s<\n",sp_master_host_name); > fflush(stdout); > exit(22); > } > if(cdebug ==1) > { > printf("Child: start child send: %s\n", he->h_name); > printf("To: %s at port %d\n",sp_master_host_name, > sp_master_listen_port); > fflush(stdout); > } > ip = (struct in_addr *)he->h_addr_list[0]; > > port=sp_master_listen_port; > sp_my_cs_addr->s_addr = ip->s_addr; > > raddr.sin_family = 2; > raddr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > raddr.sin_addr.s_addr = ip->s_addr; > sp_child_socket_val = socket(2, SOCK_STREAM, 0); > if (sp_child_socket_val < 0) > { > perror("child: socket failed:"); > exit(23); > } > bzero(&addr, sizeof(struct sockaddr_in)); > tmp_port=sp_child_esend_port; > addr.sin_port = (__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > addr.sin_family = 2; > addr.sin_addr.s_addr = ((in_addr_t) 0x00000000); > rc = -1; > while (rc < 0) > { > rc = bind(sp_child_socket_val, (struct sockaddr *)&addr, > sizeof(struct sockaddr_in)); > if(rc < 0) > { > tmp_port++; > addr.sin_port=(__extension__ ({ register unsigned short int __v, __x = (tmp_port); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > continue; > } > } > if(cdebug ==1) > { > printf("Child: Bound port %d\n",tmp_port); > fflush(stdout); > } > if (rc < 0) > { > perror("Child: bind failed for sync channel to child.\n"); > exit(24); > } > rc = connect(sp_child_socket_val, (struct sockaddr *)&raddr, > sizeof(struct sockaddr_in)); > if (rc < 0) > { > perror("child: connect failed\n"); > printf("Error %d\n",(*__errno_location ())); > exit(25); > } > if(cdebug ==1) > { > printf("child Connected\n"); > fflush(stdout); > } > return (sp_child_socket_val); >} > > >void >do_speed_check(int client_flag) > > > > > >{ > int i; > if(client_flag) > { > speed_main(" "," ",reclen,kilobytes64,client_flag); > } > else > { > printf("Checking %d clients\n",clients_found); > for(i=0;i<clients_found;i++) > { > speed_main(child_idents[i].child_name, > child_idents[i].execute_path, > reclen, kilobytes64,client_flag); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 59793
: 37053 |
37054