aboutsummaryrefslogtreecommitdiffstats
path: root/blktrace.h
blob: c53b717ba4e2d3069f170d1552027817cc734106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef FIO_BLKTRACE_H
#define FIO_BLKTRACE_H


#ifdef FIO_HAVE_BLKTRACE

#include <asm/types.h>

#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 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 false;
}


static inline int merge_blktrace_iologs(struct thread_data *td)
{
	return false;
}

#endif
#endif