Commit | Line | Data |
---|---|---|
79d16311 JA |
1 | #ifndef FIO_PROFILE_H |
2 | #define FIO_PROFILE_H | |
3 | ||
4 | #include "flist.h" | |
5 | ||
7eb36574 JA |
6 | /* |
7 | * Functions for overriding internal fio io_u functions | |
8 | */ | |
9 | struct prof_io_ops { | |
58c55ba0 JA |
10 | int (*td_init)(struct thread_data *); |
11 | void (*td_exit)(struct thread_data *); | |
12 | ||
7eb36574 JA |
13 | int (*fill_io_u_off)(struct thread_data *, struct io_u *); |
14 | int (*fill_io_u_size)(struct thread_data *, struct io_u *); | |
15 | struct fio_file *(*get_next_file)(struct thread_data *); | |
16 | }; | |
17 | ||
79d16311 JA |
18 | struct profile_ops { |
19 | struct flist_head list; | |
20 | char name[32]; | |
e58eb86d | 21 | char desc[64]; |
79d16311 JA |
22 | int flags; |
23 | ||
2363d8df JA |
24 | /* |
25 | * Profile specific options | |
26 | */ | |
e2de69da | 27 | struct fio_option *options; |
2363d8df JA |
28 | |
29 | /* | |
30 | * Called after parsing options, to prepare 'cmdline' | |
31 | */ | |
32 | void (*prep_cmd)(void); | |
33 | ||
34 | /* | |
35 | * The complete command line | |
36 | */ | |
37 | const char **cmdline; | |
15dc1934 | 38 | |
7eb36574 | 39 | struct prof_io_ops *io_ops; |
79d16311 JA |
40 | }; |
41 | ||
07b3232d | 42 | int register_profile(struct profile_ops *); |
79d16311 JA |
43 | void unregister_profile(struct profile_ops *); |
44 | int load_profile(const char *); | |
15dc1934 JA |
45 | struct profile_ops *find_profile(const char *); |
46 | void profile_add_hooks(struct thread_data *); | |
79d16311 | 47 | |
58c55ba0 JA |
48 | int profile_td_init(struct thread_data *); |
49 | void profile_td_exit(struct thread_data *); | |
50 | ||
79d16311 | 51 | #endif |