blob: 3bae5002c469a27782b911e83227b939f389fe9f [file] [log] [blame]
Jens Axboe79d16312010-03-04 12:43:20 +01001#ifndef FIO_PROFILE_H
2#define FIO_PROFILE_H
3
4#include "flist.h"
5
Jens Axboe79d16312010-03-04 12:43:20 +01006struct profile_ops {
7 struct flist_head list;
8 char name[32];
Jens Axboee58eb862010-03-05 09:56:32 +01009 char desc[64];
Jens Axboe79d16312010-03-04 12:43:20 +010010 int flags;
11
Jens Axboe2363d8d2010-03-04 14:30:02 +010012 /*
13 * Profile specific options
14 */
Jens Axboee2de69d2010-03-04 14:05:48 +010015 struct fio_option *options;
Jens Axboe2363d8d2010-03-04 14:30:02 +010016
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 Axboe15dc1932010-03-05 10:59:06 +010026
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 Axboe79d16312010-03-04 12:43:20 +010032};
33
Jens Axboe07b32322010-03-05 09:48:44 +010034int register_profile(struct profile_ops *);
Jens Axboe79d16312010-03-04 12:43:20 +010035void unregister_profile(struct profile_ops *);
36int load_profile(const char *);
Jens Axboe15dc1932010-03-05 10:59:06 +010037struct profile_ops *find_profile(const char *);
38void profile_add_hooks(struct thread_data *);
Jens Axboe79d16312010-03-04 12:43:20 +010039
40#endif