6 #define CALIBRATE_RUNS 10
7 #define CALIBRATE_SCALE 1000
8 #define MAX_CPU_STR_LEN 32
12 IDLE_PROF_OPT_CALI, /* calibration only */
19 IDLE_PROF_STATUS_CALI_STOP,
20 IDLE_PROF_STATUS_PROF_STOP,
21 IDLE_PROF_STATUS_ABORT
24 struct idle_prof_thread {
30 double cali_time; /* microseconds to finish a unit wrok */
33 unsigned char *data; /* bytes to be touched */
35 pthread_mutex_t init_lock;
36 pthread_mutex_t start_lock;
39 struct idle_prof_common {
40 struct idle_prof_thread *ipts;
46 void *buf; /* single data allocation for all threads */
49 extern int fio_idle_prof_parse_opt(const char *);
51 extern void fio_idle_prof_init(void);
52 extern void fio_idle_prof_start(void);
53 extern void fio_idle_prof_stop(void);
55 extern void show_idle_prof_stats(int, struct json_object *);