8 #define CALIBRATE_RUNS 10
9 #define CALIBRATE_SCALE 1000
10 #define MAX_CPU_STR_LEN 32
14 IDLE_PROF_OPT_CALI, /* calibration only */
21 IDLE_PROF_STATUS_CALI_STOP,
22 IDLE_PROF_STATUS_PROF_STOP,
23 IDLE_PROF_STATUS_ABORT
26 struct idle_prof_thread {
32 double cali_time; /* microseconds to finish a unit work */
35 unsigned char *data; /* bytes to be touched */
37 pthread_mutex_t init_lock;
38 pthread_mutex_t start_lock;
40 os_cpu_mask_t cpu_mask;
43 struct idle_prof_common {
44 struct idle_prof_thread *ipts;
50 void *buf; /* single data allocation for all threads */
53 extern int fio_idle_prof_parse_opt(const char *);
55 extern void fio_idle_prof_init(void);
56 extern void fio_idle_prof_start(void);
57 extern void fio_idle_prof_stop(void);
59 extern void show_idle_prof_stats(int, struct json_object *, struct buf_output *);