Merge branch 'fio-docs-ci' of https://github.com/vincentkfu/fio
[fio.git] / blktrace.h
... / ...
CommitLineData
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
11struct 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
22bool is_blktrace(const char *, int *);
23bool init_blktrace_read(struct thread_data *, const char *, int);
24bool read_blktrace(struct thread_data* td);
25
26int merge_blktrace_iologs(struct thread_data *td);
27
28#else
29
30static inline bool is_blktrace(const char *fname, int *need_swap)
31{
32 return false;
33}
34
35static inline bool init_blktrace_read(struct thread_data *td, const char *fname,
36 int need_swap)
37{
38 return false;
39}
40
41static inline bool read_blktrace(struct thread_data* td)
42{
43 return false;
44}
45
46
47static inline int merge_blktrace_iologs(struct thread_data *td)
48{
49 return false;
50}
51
52#endif
53#endif