Commit | Line | Data |
---|---|---|
a3e59412 TK |
1 | #ifndef FIO_BLKTRACE_H |
2 | #define FIO_BLKTRACE_H | |
3 | ||
b9921d1a | 4 | |
a3e59412 TK |
5 | #ifdef FIO_HAVE_BLKTRACE |
6 | ||
55bfd8c8 DZ |
7 | #include <asm/types.h> |
8 | ||
b9921d1a DZ |
9 | #include "blktrace_api.h" |
10 | ||
11 | struct blktrace_cursor { | |
12 | struct fifo *fifo; // fifo queue for reading | |
5ab088aa | 13 | FILE *f; // blktrace file |
55bfd8c8 | 14 | __u64 length; // length of trace |
b9921d1a DZ |
15 | struct blk_io_trace t; // current io trace |
16 | int swap; // bitwise reverse required | |
87a48ada | 17 | int scalar; // scale percentage |
55bfd8c8 DZ |
18 | int iter; // current iteration |
19 | int nr_iter; // number of iterations to run | |
b9921d1a DZ |
20 | }; |
21 | ||
b153f94a | 22 | bool is_blktrace(const char *, int *); |
10f74940 LS |
23 | bool init_blktrace_read(struct thread_data *, const char *, int); |
24 | bool read_blktrace(struct thread_data* td); | |
25 | ||
b9921d1a | 26 | int merge_blktrace_iologs(struct thread_data *td); |
a3e59412 TK |
27 | |
28 | #else | |
29 | ||
b153f94a | 30 | static inline bool is_blktrace(const char *fname, int *need_swap) |
a3e59412 | 31 | { |
b153f94a | 32 | return false; |
a3e59412 TK |
33 | } |
34 | ||
10f74940 | 35 | static inline bool init_blktrace_read(struct thread_data *td, const char *fname, |
b153f94a | 36 | int need_swap) |
a3e59412 | 37 | { |
b153f94a | 38 | return false; |
a3e59412 TK |
39 | } |
40 | ||
10f74940 LS |
41 | static inline bool read_blktrace(struct thread_data* td) |
42 | { | |
43 | return false; | |
44 | } | |
45 | ||
46 | ||
bd6afe89 JA |
47 | static inline int merge_blktrace_iologs(struct thread_data *td) |
48 | { | |
49 | return false; | |
50 | } | |
51 | ||
a3e59412 TK |
52 | #endif |
53 | #endif |