Recent changes (master)
The following changes since commit e38feac48ffb7a45c847cabd31ab5eab7fe05a4e:
Merge branch 'master' of https://github.com/yashi/fio (2017-12-28 08:35:11 -0700)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to df4bf1178ed773986129da6038961388af926971:
log: fix bad < 0 check for unsigned (2017-12-29 08:45:22 -0700)
----------------------------------------------------------------
Jens Axboe (1):
log: fix bad < 0 check for unsigned
Robert Elliott (1):
debug: make debug=io readable with multiple threads
Tomohiro Kusumi (1):
lib/memcpy: fix warning on FreeBSD
debug.c | 11 +---------- fio_time.h | 1 + io_u.c | 9 ++++----- io_u.h | 15 ++++++++++----- ioengines.c | 3 ++- log.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ log.h | 1 + 7 files changed, 70 insertions(+), 21 deletions(-)
---
Diff of recent changes:
debug.c +1 -10
@@ -7,20 +7,11 @@void __dprint (int type,const char *str, ...) {va_list args; -pid_t pid;assert (type <FD_DEBUG_MAX ); - pid =getpid (); -if (fio_debug_jobp && *fio_debug_jobp !=-1U - && pid != *fio_debug_jobp) -return ; - -log_info ("%-8s " , debug_levels[type].name); -log_info ("%-5u " , (int ) pid); -va_start (args, str); -log_valist (str, args); +log_prevalist (type, str, args);va_end (args); }#endif
fio_time.h +1 -0
@@ -2,6 +2,7 @@#define FIO_TIME_H #include <time.h> +#include <sys/time.h> #include "lib/types.h" struct thread_data ;
io_u.c +4 -5
@@ -971,9 +971,8 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) }if (io_u->offset + io_u->buflen > io_u->file->real_file_size) { -dprint (FD_IO ,"io_u %p, offset + buflen exceeds file size\n" , - io_u); -dprint (FD_IO ," offset=%llu/buflen=%lu > %llu\n" , +dprint (FD_IO ,"io_u %p, off=0x%llx + len=0x%lx exceeds file size=0x%llx\n" , + io_u, (unsigned long long ) io_u->offset, io_u->buflen, (unsigned long long ) io_u->file->real_file_size);return 1 ;
@@ -986,7 +985,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)mark_random_map (td, io_u); out: -dprint_io_u (io_u,"fill_io_u" ); +dprint_io_u (io_u,"fill" ); td->zone_bytes += io_u->buflen;return 0 ; }
@@ -1939,7 +1938,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,enum fio_ddir ddir = io_u->ddir;struct fio_file *f = io_u->file; -dprint_io_u (io_u,"io complete" ); +dprint_io_u (io_u,"complete" );assert (io_u->flags &IO_U_F_FLIGHT );io_u_clear (td, io_u,IO_U_F_FLIGHT |IO_U_F_BUSY_OK );
io_u.h +10 -5
@@ -152,12 +152,17 @@ static inline void dprint_io_u(struct io_u *io_u, const char *p) {struct fio_file *f = io_u->file; -dprint (FD_IO ,"%s: io_u %p: off=%llu/len=%lu/ddir=%d" , p, io_u, - (unsigned long long ) io_u->offset, - io_u->buflen, io_u->ddir);if (f) -dprint (FD_IO ,"/%s" , f->file_name); -dprint (FD_IO ,"\n" ); +dprint (FD_IO ,"%s: io_u %p: off=0x%llx,len=0x%lx,ddir=%d,file=%s\n" , + p, io_u, + (unsigned long long ) io_u->offset, + io_u->buflen, io_u->ddir, + f->file_name); +else +dprint (FD_IO ,"%s: io_u %p: off=0x%llx,len=0x%lx,ddir=%d\n" , + p, io_u, + (unsigned long long ) io_u->offset, + io_u->buflen, io_u->ddir); }#else #define dprint_io_u (io_u, p)
ioengines.c +2 -1
@@ -224,7 +224,8 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u)if (td->io_ops->prep) {int ret = td->io_ops->prep (td, io_u); -dprint (FD_IO ,"->prep(%p)=%d\n" , io_u, ret); +dprint (FD_IO ,"prep: io_u %p: ret=%d\n" , io_u, ret); +if (ret)unlock_file (td, io_u->file);return ret;
log.c +51 -0
69 lines not on this page · raw message
log.h +1 -0
@@ -13,6 +13,7 @@ extern size_t log_err(const char *format, ...) __attribute__ ((__format__ (__priextern size_t log_info (const char *format, ...) __attribute__ ((__format__ (__printf__,1 ,2 )));extern size_t __log_buf (struct buf_output *,const char *format, ...) __attribute__ ((__format__ (__printf__,2 ,3 )));extern size_t log_valist (const char *str,va_list ); +extern void log_prevalist (int type,const char *str,va_list );extern size_t log_info_buf (const char *buf,size_t len);extern int log_info_flush (void );