Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 1 | #ifndef FIO_PROFILE_H |
| 2 | #define FIO_PROFILE_H |
| 3 | |
| 4 | #include "flist.h" |
| 5 | |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 6 | struct profile_ops { |
| 7 | struct flist_head list; |
| 8 | char name[32]; |
Jens Axboe | e58eb86 | 2010-03-05 09:56:32 +0100 | [diff] [blame] | 9 | char desc[64]; |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 10 | int flags; |
| 11 | |
Jens Axboe | 2363d8d | 2010-03-04 14:30:02 +0100 | [diff] [blame] | 12 | /* |
| 13 | * Profile specific options |
| 14 | */ |
Jens Axboe | e2de69d | 2010-03-04 14:05:48 +0100 | [diff] [blame] | 15 | struct fio_option *options; |
Jens Axboe | 2363d8d | 2010-03-04 14:30:02 +0100 | [diff] [blame] | 16 | |
| 17 | /* |
| 18 | * Called after parsing options, to prepare 'cmdline' |
| 19 | */ |
| 20 | void (*prep_cmd)(void); |
| 21 | |
| 22 | /* |
| 23 | * The complete command line |
| 24 | */ |
| 25 | const char **cmdline; |
Jens Axboe | 15dc193 | 2010-03-05 10:59:06 +0100 | [diff] [blame^] | 26 | |
| 27 | /* |
| 28 | * Functions for overriding internal fio io_u functions |
| 29 | */ |
| 30 | int (*fill_io_u_off)(struct thread_data *, struct io_u *); |
| 31 | int (*fill_io_u_size)(struct thread_data *, struct io_u *); |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 32 | }; |
| 33 | |
Jens Axboe | 07b3232 | 2010-03-05 09:48:44 +0100 | [diff] [blame] | 34 | int register_profile(struct profile_ops *); |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 35 | void unregister_profile(struct profile_ops *); |
| 36 | int load_profile(const char *); |
Jens Axboe | 15dc193 | 2010-03-05 10:59:06 +0100 | [diff] [blame^] | 37 | struct profile_ops *find_profile(const char *); |
| 38 | void profile_add_hooks(struct thread_data *); |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 39 | |
| 40 | #endif |