X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.c;h=2b5eaf0c52dac715e971e26915d3015f9c274c2c;hp=34e74a80a2f9ed2c278d6835f172acf650a4a9f9;hb=49c289ffadeca11a2e63943be865045412177ced;hpb=e244616690aa6c9d0e5aed74860a55715d03b052 diff --git a/iolog.c b/iolog.c index 34e74a80..2b5eaf0c 100644 --- a/iolog.c +++ b/iolog.c @@ -4,7 +4,6 @@ */ #include #include -#include #include #include #include @@ -15,11 +14,11 @@ #include "flist.h" #include "fio.h" -#include "verify.h" #include "trim.h" #include "filelock.h" #include "smalloc.h" #include "blktrace.h" +#include "pshared.h" static int iolog_flush(struct io_log *log); @@ -184,7 +183,7 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) void prune_io_piece_log(struct thread_data *td) { struct io_piece *ipo; - struct rb_node *n; + struct fio_rb_node *n; while ((n = rb_first(&td->io_hist_tree)) != NULL) { ipo = rb_entry(n, struct io_piece, rb_node); @@ -208,7 +207,7 @@ void prune_io_piece_log(struct thread_data *td) */ void log_io_piece(struct thread_data *td, struct io_u *io_u) { - struct rb_node **p, *parent; + struct fio_rb_node **p, *parent; struct io_piece *ipo, *__ipo; ipo = malloc(sizeof(struct io_piece)); @@ -694,10 +693,10 @@ void free_log(struct io_log *log) sfree(log); } -unsigned long hist_sum(int j, int stride, unsigned int *io_u_plat, - unsigned int *io_u_plat_last) +uint64_t hist_sum(int j, int stride, uint64_t *io_u_plat, + uint64_t *io_u_plat_last) { - unsigned long sum; + uint64_t sum; int k; if (io_u_plat_last) { @@ -718,8 +717,8 @@ static void flush_hist_samples(FILE *f, int hist_coarseness, void *samples, int log_offset; uint64_t i, j, nr_samples; struct io_u_plat_entry *entry, *entry_before; - unsigned int *io_u_plat; - unsigned int *io_u_plat_before; + uint64_t *io_u_plat; + uint64_t *io_u_plat_before; int stride = 1 << hist_coarseness; @@ -743,10 +742,10 @@ static void flush_hist_samples(FILE *f, int hist_coarseness, void *samples, fprintf(f, "%lu, %u, %u, ", (unsigned long) s->time, io_sample_ddir(s), s->bs); for (j = 0; j < FIO_IO_U_PLAT_NR - stride; j += stride) { - fprintf(f, "%lu, ", hist_sum(j, stride, io_u_plat, - io_u_plat_before)); + fprintf(f, "%llu, ", (unsigned long long) + hist_sum(j, stride, io_u_plat, io_u_plat_before)); } - fprintf(f, "%lu\n", (unsigned long) + fprintf(f, "%llu\n", (unsigned long long) hist_sum(FIO_IO_U_PLAT_NR - stride, stride, io_u_plat, io_u_plat_before));