X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=blktrace.h;h=c53b717ba4e2d3069f170d1552027817cc734106;hb=855dc4d44e000b68c01b0e33eae3389b49eb7f7f;hp=8656a957d27feac47710a40ce2c25298155de6f5;hpb=e6fe02651641fc64d2fa4fcfe9b1013b2947d11b;p=fio.git diff --git a/blktrace.h b/blktrace.h index 8656a957..c53b717b 100644 --- a/blktrace.h +++ b/blktrace.h @@ -1,22 +1,52 @@ #ifndef FIO_BLKTRACE_H #define FIO_BLKTRACE_H + #ifdef FIO_HAVE_BLKTRACE -int is_blktrace(const char *, int *); -int load_blktrace(struct thread_data *, const char *, int); +#include + +#include "blktrace_api.h" + +struct blktrace_cursor { + struct fifo *fifo; // fifo queue for reading + FILE *f; // blktrace file + __u64 length; // length of trace + struct blk_io_trace t; // current io trace + int swap; // bitwise reverse required + int scalar; // scale percentage + int iter; // current iteration + int nr_iter; // number of iterations to run +}; + +bool is_blktrace(const char *, int *); +bool init_blktrace_read(struct thread_data *, const char *, int); +bool read_blktrace(struct thread_data* td); + +int merge_blktrace_iologs(struct thread_data *td); #else -static inline int is_blktrace(const char *fname, int *need_swap) +static inline bool is_blktrace(const char *fname, int *need_swap) +{ + return false; +} + +static inline bool init_blktrace_read(struct thread_data *td, const char *fname, + int need_swap) +{ + return false; +} + +static inline bool read_blktrace(struct thread_data* td) { - return 0; + return false; } -static inline int load_blktrace(struct thread_data *td, const char *fname, - int need_swap) + +static inline int merge_blktrace_iologs(struct thread_data *td) { - return 1; + return false; } #endif