1b2bb76bbcd37a3ec24e59475390c999ba0666a7
[fio.git] / blktrace.h
1 #ifndef FIO_BLKTRACE_H
2 #define FIO_BLKTRACE_H
3
4
5 #ifdef FIO_HAVE_BLKTRACE
6
7 #include "blktrace_api.h"
8
9 struct blktrace_cursor {
10         struct fifo             *fifo;  // fifo queue for reading
11         int                     fd;     // blktrace file
12         struct blk_io_trace     t;      // current io trace
13         int                     swap;   // bitwise reverse required
14 };
15
16 bool is_blktrace(const char *, int *);
17 bool load_blktrace(struct thread_data *, const char *, int);
18 int merge_blktrace_iologs(struct thread_data *td);
19
20 #else
21
22 static inline bool is_blktrace(const char *fname, int *need_swap)
23 {
24         return false;
25 }
26
27 static inline bool load_blktrace(struct thread_data *td, const char *fname,
28                                  int need_swap)
29 {
30         return false;
31 }
32
33 #endif
34 #endif