Merge branch 'master' of https://github.com/bvanassche/fio
[fio.git] / blktrace.h
1 #ifndef FIO_BLKTRACE_H
2 #define FIO_BLKTRACE_H
3
4
5 #ifdef FIO_HAVE_BLKTRACE
6
7 #include <asm/types.h>
8
9 #include "blktrace_api.h"
10
11 struct blktrace_cursor {
12         struct fifo             *fifo;  // fifo queue for reading
13         FILE                    *f;     // blktrace file
14         __u64                   length; // length of trace
15         struct blk_io_trace     t;      // current io trace
16         int                     swap;   // bitwise reverse required
17         int                     scalar; // scale percentage
18         int                     iter;   // current iteration
19         int                     nr_iter; // number of iterations to run
20 };
21
22 bool is_blktrace(const char *, int *);
23 bool init_blktrace_read(struct thread_data *, const char *, int);
24 bool read_blktrace(struct thread_data* td);
25
26 int merge_blktrace_iologs(struct thread_data *td);
27
28 #else
29
30 static inline bool is_blktrace(const char *fname, int *need_swap)
31 {
32         return false;
33 }
34
35 static inline bool init_blktrace_read(struct thread_data *td, const char *fname,
36                                  int need_swap)
37 {
38         return false;
39 }
40
41 static inline bool read_blktrace(struct thread_data* td)
42 {
43         return false;
44 }
45
46
47 static inline int merge_blktrace_iologs(struct thread_data *td)
48 {
49         return false;
50 }
51
52 #endif
53 #endif