|
Packit |
8930e1 |
#ifndef FIO_PROFILE_H
|
|
Packit |
8930e1 |
#define FIO_PROFILE_H
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
#include "flist.h"
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
/*
|
|
Packit |
8930e1 |
* Functions for overriding internal fio io_u functions
|
|
Packit |
8930e1 |
*/
|
|
Packit |
8930e1 |
struct prof_io_ops {
|
|
Packit |
8930e1 |
int (*td_init)(struct thread_data *);
|
|
Packit |
8930e1 |
void (*td_exit)(struct thread_data *);
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
int (*io_u_lat)(struct thread_data *, uint64_t);
|
|
Packit |
8930e1 |
};
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
struct profile_ops {
|
|
Packit |
8930e1 |
struct flist_head list;
|
|
Packit |
8930e1 |
char name[32];
|
|
Packit |
8930e1 |
char desc[64];
|
|
Packit |
8930e1 |
int flags;
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
/*
|
|
Packit |
8930e1 |
* Profile specific options
|
|
Packit |
8930e1 |
*/
|
|
Packit |
8930e1 |
struct fio_option *options;
|
|
Packit |
8930e1 |
void *opt_data;
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
/*
|
|
Packit |
8930e1 |
* Called after parsing options, to prepare 'cmdline'
|
|
Packit |
8930e1 |
*/
|
|
Packit |
8930e1 |
int (*prep_cmd)(void);
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
/*
|
|
Packit |
8930e1 |
* The complete command line
|
|
Packit |
8930e1 |
*/
|
|
Packit |
8930e1 |
const char **cmdline;
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
struct prof_io_ops *io_ops;
|
|
Packit |
8930e1 |
};
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
int register_profile(struct profile_ops *);
|
|
Packit |
8930e1 |
void unregister_profile(struct profile_ops *);
|
|
Packit |
8930e1 |
int load_profile(const char *);
|
|
Packit |
8930e1 |
struct profile_ops *find_profile(const char *);
|
|
Packit |
8930e1 |
void profile_add_hooks(struct thread_data *);
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
int profile_td_init(struct thread_data *);
|
|
Packit |
8930e1 |
void profile_td_exit(struct thread_data *);
|
|
Packit |
8930e1 |
|
|
Packit |
8930e1 |
#endif
|