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 | ||
6aca9b3d JA |
13 | int (*fill_io_u_off)(struct thread_data *, struct io_u *, unsigned int *); |
14 | int (*fill_io_u_size)(struct thread_data *, struct io_u *, unsigned int); | |
7eb36574 | 15 | struct fio_file *(*get_next_file)(struct thread_data *); |
d4afedfd JA |
16 | |
17 | int (*io_u_lat)(struct thread_data *, uint64_t); | |
7eb36574 JA |
18 | }; |
19 | ||
79d16311 JA |
20 | struct profile_ops { |
21 | struct flist_head list; | |
22 | char name[32]; | |
e58eb86d | 23 | char desc[64]; |
79d16311 JA |
24 | int flags; |
25 | ||
2363d8df JA |
26 | /* |
27 | * Profile specific options | |
28 | */ | |
e2de69da | 29 | struct fio_option *options; |
2363d8df JA |
30 | |
31 | /* | |
32 | * Called after parsing options, to prepare 'cmdline' | |
33 | */ | |
d4afedfd | 34 | int (*prep_cmd)(void); |
2363d8df JA |
35 | |
36 | /* | |
37 | * The complete command line | |
38 | */ | |
39 | const char **cmdline; | |
15dc1934 | 40 | |
7eb36574 | 41 | struct prof_io_ops *io_ops; |
79d16311 JA |
42 | }; |
43 | ||
07b3232d | 44 | int register_profile(struct profile_ops *); |
79d16311 JA |
45 | void unregister_profile(struct profile_ops *); |
46 | int load_profile(const char *); | |
15dc1934 JA |
47 | struct profile_ops *find_profile(const char *); |
48 | void profile_add_hooks(struct thread_data *); | |
79d16311 | 49 | |
58c55ba0 JA |
50 | int profile_td_init(struct thread_data *); |
51 | void profile_td_exit(struct thread_data *); | |
52 | ||
79d16311 | 53 | #endif |