• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:max +full:- +full:time

2  * Copyright (C) 2012 Fusion-io
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <time.h>
103 "cpu-sys",
104 "cpu-io",
105 "cpu-irq",
106 "cpu-soft",
107 "cpu-user",
109 "queue-depth",
135 return -1; in lookup_movie_style()
160 if (tf->trace->mpstat_num_cpus == 0) in alloc_mpstat_gld()
163 ptr = calloc((tf->trace->mpstat_num_cpus + 1) * MPSTAT_GRAPHS, in alloc_mpstat_gld()
169 tf->mpstat_gld = ptr; in alloc_mpstat_gld()
195 return -ENOENT; in enable_one_graph()
207 return -ENOENT; in disable_one_graph()
213 for (i = TOTAL_GRAPHS - 1; i >= 0; i--) { in last_graph()
218 return -ENOENT; in last_graph()
250 tf->label = ""; in add_trace_file()
251 tf->filename = strdup(filename); in add_trace_file()
252 list_add_tail(&tf->list, &all_traces); in add_trace_file()
253 tf->line_color = "black"; in add_trace_file()
266 tf->label = ""; in add_fio_trace_file()
267 tf->filename = strdup(filename); in add_fio_trace_file()
268 list_add_tail(&tf->list, &fio_traces); in add_fio_trace_file()
269 tf->line_color = pick_fio_color(); in add_fio_trace_file()
270 tf->fio_trace = 1; in add_fio_trace_file()
286 tf->tput_reads_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); in setup_trace_file_graphs()
287 tf->tput_writes_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); in setup_trace_file_graphs()
288 tf->latency_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); in setup_trace_file_graphs()
289 tf->queue_depth_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); in setup_trace_file_graphs()
291 tf->iop_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); in setup_trace_file_graphs()
292 tf->gdd_writes = calloc(alloc_ptrs, sizeof(struct graph_dot_data *)); in setup_trace_file_graphs()
293 tf->gdd_reads = calloc(alloc_ptrs, sizeof(struct graph_dot_data *)); in setup_trace_file_graphs()
294 tf->io_plots_allocated = alloc_ptrs; in setup_trace_file_graphs()
296 if (tf->trace->mpstat_num_cpus == 0) in setup_trace_file_graphs()
300 for (i = 0; i < (tf->trace->mpstat_num_cpus + 1) * MPSTAT_GRAPHS; i++) { in setup_trace_file_graphs()
301 tf->mpstat_gld[i] = in setup_trace_file_graphs()
302 alloc_line_data(tf->mpstat_min_seconds, in setup_trace_file_graphs()
303 tf->mpstat_max_seconds, in setup_trace_file_graphs()
304 tf->mpstat_max_seconds); in setup_trace_file_graphs()
305 tf->mpstat_gld[i]->max = 100; in setup_trace_file_graphs()
310 if (tf->trace->fio_seconds > 0) { in setup_trace_file_graphs()
311 tf->fio_gld = alloc_line_data(tf->min_seconds, in setup_trace_file_graphs()
312 tf->max_seconds, in setup_trace_file_graphs()
313 tf->stop_seconds); in setup_trace_file_graphs()
332 path = join_path(blktrace_dest_dir, tf->filename); in read_traces()
334 path = strdup(tf->filename); in read_traces()
341 tf->trace = trace; in read_traces()
342 tf->max_seconds = SECONDS(last_time) + 1; in read_traces()
343 tf->stop_seconds = SECONDS(last_time) + 1; in read_traces()
345 find_extreme_offsets(trace, &tf->min_offset, &tf->max_offset, in read_traces()
347 filter_outliers(trace, tf->min_offset, tf->max_offset, &ymin, &ymax); in read_traces()
348 tf->min_offset = ymin; in read_traces()
349 tf->max_offset = ymax; in read_traces()
352 tf->mpstat_stop_seconds = trace->mpstat_seconds; in read_traces()
353 tf->mpstat_max_seconds = trace->mpstat_seconds; in read_traces()
354 if (tf->mpstat_max_seconds) in read_traces()
361 trace = open_fio_trace(tf->filename); in read_traces()
364 tf->trace = trace; in read_traces()
365 tf->max_seconds = tf->trace->fio_seconds; in read_traces()
366 tf->stop_seconds = tf->trace->fio_seconds; in read_traces()
376 for (i = 0; i < tf->io_plots; i++) { in pick_line_graph_color()
377 if (tf->gdd_reads[i]) { in pick_line_graph_color()
378 tf->line_color = tf->gdd_reads[i]->color; in pick_line_graph_color()
379 tf->reads_color = tf->gdd_reads[i]->color; in pick_line_graph_color()
381 if (tf->gdd_writes[i]) { in pick_line_graph_color()
382 tf->line_color = tf->gdd_writes[i]->color; in pick_line_graph_color()
383 tf->writes_color = tf->gdd_writes[i]->color; in pick_line_graph_color()
385 if (tf->writes_color && tf->reads_color) in pick_line_graph_color()
388 if (!tf->reads_color) in pick_line_graph_color()
389 tf->reads_color = tf->line_color; in pick_line_graph_color()
390 if (!tf->writes_color) in pick_line_graph_color()
391 tf->writes_color = tf->line_color; in pick_line_graph_color()
398 int time = 0; in read_fio_events() local
402 first_fio(tf->trace); in read_fio_events()
404 ret = read_fio_event(tf->trace, &time, &bw, &dir); in read_fio_events()
409 add_fio_gld(time, bw, tf->fio_gld); in read_fio_events()
410 if (next_fio_line(tf->trace)) in read_fio_events()
422 unsigned int time; in read_trace_events() local
431 trace = tf->trace; in read_trace_events()
436 if (SECONDS(get_record_time(trace)) > tf->max_seconds) in read_trace_events()
438 add_tput(trace, tf->tput_writes_gld, tf->tput_reads_gld); in read_trace_events()
439 add_iop(trace, tf->iop_gld); in read_trace_events()
441 add_pending_io(trace, tf->queue_depth_gld); in read_trace_events()
442 add_completed_io(trace, tf->latency_gld); in read_trace_events()
446 trace = tf->trace; in read_trace_events()
448 if (trace->mpstat_num_cpus == 0) in read_trace_events()
453 for (time = 0; time < tf->mpstat_stop_seconds; time++) { in read_trace_events()
454 for (i = 0; i < (trace->mpstat_num_cpus + 1) * MPSTAT_GRAPHS; i += MPSTAT_GRAPHS) { in read_trace_events()
471 add_mpstat_gld(time, sys, tf->mpstat_gld[i + MPSTAT_SYS]); in read_trace_events()
472 add_mpstat_gld(time, irq, tf->mpstat_gld[i + MPSTAT_IRQ]); in read_trace_events()
473 add_mpstat_gld(time, soft, tf->mpstat_gld[i + MPSTAT_SOFT]); in read_trace_events()
474 add_mpstat_gld(time, user, tf->mpstat_gld[i + MPSTAT_USER]); in read_trace_events()
475 add_mpstat_gld(time, iowait, tf->mpstat_gld[i + MPSTAT_IO]); in read_trace_events()
484 trace = tf->trace; in read_trace_events()
486 if (trace->mpstat_num_cpus == 0) in read_trace_events()
489 tf->mpstat_gld[MPSTAT_SYS]->max = max_sys; in read_trace_events()
490 tf->mpstat_gld[MPSTAT_IRQ]->max = max_irq; in read_trace_events()
491 tf->mpstat_gld[MPSTAT_SOFT]->max = max_soft; in read_trace_events()
492 tf->mpstat_gld[MPSTAT_USER]->max = max_user; in read_trace_events()
493 tf->mpstat_gld[MPSTAT_IO]->max = max_iowait;; in read_trace_events()
509 tf->label = strdup(label); in set_trace_label()
518 tf->label = strdup(label); in set_trace_label()
542 if (tf->max_seconds > *max_seconds) in compare_minmax_tf()
543 *max_seconds = tf->max_seconds; in compare_minmax_tf()
544 if (tf->max_offset > *max_offset) in compare_minmax_tf()
545 *max_offset = tf->max_offset; in compare_minmax_tf()
546 if (tf->min_offset < *min_offset) in compare_minmax_tf()
547 *min_offset = tf->min_offset; in compare_minmax_tf()
558 tf->min_seconds = min_seconds; in set_all_minmax_tf()
559 tf->max_seconds = max_seconds; in set_all_minmax_tf()
560 if (tf->stop_seconds > max_seconds) in set_all_minmax_tf()
561 tf->stop_seconds = max_seconds; in set_all_minmax_tf()
562 if (tf->mpstat_max_seconds) { in set_all_minmax_tf()
563 tf->mpstat_min_seconds = min_seconds; in set_all_minmax_tf()
564 tf->mpstat_max_seconds = max_seconds; in set_all_minmax_tf()
565 if (tf->mpstat_stop_seconds > max_seconds) in set_all_minmax_tf()
566 tf->mpstat_stop_seconds = max_seconds; in set_all_minmax_tf()
568 tf->min_offset = min_offset; in set_all_minmax_tf()
569 tf->max_offset = max_offset; in set_all_minmax_tf()
586 pph->history = malloc(sizeof(double) * 4096); in alloc_pid_plot_history()
587 if (!pph->history) { in alloc_pid_plot_history()
591 pph->history_len = 4096; in alloc_pid_plot_history()
592 pph->color = color; in alloc_pid_plot_history()
606 ph->read_pid_history = calloc(tf->io_plots, sizeof(struct pid_plot_history *)); in alloc_plot_history()
607 if (!ph->read_pid_history) { in alloc_plot_history()
611 ph->write_pid_history = calloc(tf->io_plots, sizeof(struct pid_plot_history *)); in alloc_plot_history()
612 if (!ph->write_pid_history) { in alloc_plot_history()
616 ph->pid_history_count = tf->io_plots; in alloc_plot_history()
617 for (i = 0; i < tf->io_plots; i++) { in alloc_plot_history()
618 if (tf->gdd_reads[i]) in alloc_plot_history()
619 ph->read_pid_history[i] = alloc_pid_plot_history(tf->gdd_reads[i]->color); in alloc_plot_history()
620 if (tf->gdd_writes[i]) in alloc_plot_history()
621 ph->write_pid_history[i] = alloc_pid_plot_history(tf->gdd_writes[i]->color); in alloc_plot_history()
633 for (pid = 0; pid < ph->pid_history_count; pid++) { in free_plot_history()
634 if (ph->read_pid_history[pid]) in free_plot_history()
635 free(ph->read_pid_history[pid]); in free_plot_history()
636 if (ph->write_pid_history[pid]) in free_plot_history()
637 free(ph->write_pid_history[pid]); in free_plot_history()
639 free(ph->read_pid_history); in free_plot_history()
640 free(ph->write_pid_history); in free_plot_history()
648 list_add_tail(&ph->list, list); in add_history()
652 num_histories--; in add_history()
653 entry = list_entry(list->next, struct plot_history, list); in add_history()
654 list_del(&entry->list); in add_history()
665 rewind_spindle_steps(num_histories - 1); in plot_movie_history()
668 for (pid = 0; pid < ph->pid_history_count; pid++) { in plot_movie_history()
669 if (ph->read_pid_history[pid]) { in plot_movie_history()
672 ph->read_pid_history[pid]); in plot_movie_history()
675 ph->read_pid_history[pid]); in plot_movie_history()
678 if (ph->write_pid_history[pid]) { in plot_movie_history()
681 ph->write_pid_history[pid]); in plot_movie_history()
684 ph->write_pid_history[pid]); in plot_movie_history()
696 entry = list_entry(head->next, struct plot_history, list); in free_all_plot_history()
697 list_del(&entry->list); in free_all_plot_history()
709 for (i = 0; i < tf->io_plots; i++) { in count_io_plot_types()
710 if (tf->gdd_reads[i]) in count_io_plot_types()
712 if (tf->gdd_writes[i]) in count_io_plot_types()
724 ret = asprintf(&label, "%s %s", prefix, gdd->label); in plot_io_legend()
731 svg_add_legend(plot, label, rw, gdd->color); in plot_io_legend()
755 char *prefix = tf->label ? tf->label : ""; in plot_io()
757 for (i = 0; i < tf->io_plots; i++) { in plot_io()
758 if (tf->gdd_writes[i]) { in plot_io()
759 svg_io_graph(plot, tf->gdd_writes[i]); in plot_io()
760 plot_io_legend(plot, tf->gdd_writes[i], prefix, " Writes"); in plot_io()
762 if (tf->gdd_reads[i]) { in plot_io()
763 svg_io_graph(plot, tf->gdd_reads[i]); in plot_io()
764 plot_io_legend(plot, tf->gdd_reads[i], prefix, " Reads"); in plot_io()
768 if (plot->add_xlabel) in plot_io()
769 set_xlabel(plot, "Time (seconds)"); in plot_io()
780 u64 max = 0, val; in plot_tput() local
789 val = line_graph_roll_avg_max(tf->tput_writes_gld); in plot_tput()
790 if (val > max) in plot_tput()
791 max = val; in plot_tput()
792 val = line_graph_roll_avg_max(tf->tput_reads_gld); in plot_tput()
793 if (val > max) in plot_tput()
794 max = val; in plot_tput()
797 if (tf->tput_writes_gld->max > 0) in plot_tput()
798 tf->tput_writes_gld->max = max; in plot_tput()
799 if (tf->tput_reads_gld->max > 0) in plot_tput()
800 tf->tput_reads_gld->max = max; in plot_tput()
808 scale_line_graph_bytes(&max, &units, 1024); in plot_tput()
811 set_yticks(plot, num_yticks, 0, max, ""); in plot_tput()
815 if (tf->tput_writes_gld->max > 0) { in plot_tput()
816 svg_line_graph(plot, tf->tput_writes_gld, tf->writes_color, 0, 0); in plot_tput()
818 svg_add_legend(plot, tf->label, " Writes", tf->writes_color); in plot_tput()
820 if (tf->tput_reads_gld->max > 0) { in plot_tput()
821 svg_line_graph(plot, tf->tput_reads_gld, tf->reads_color, 0, 0); in plot_tput()
823 svg_add_legend(plot, tf->label, " Reads", tf->reads_color); in plot_tput()
827 if (plot->add_xlabel) in plot_tput()
828 set_xlabel(plot, "Time (seconds)"); in plot_tput()
843 u64 max = 0, val; in plot_fio_tput() local
852 val = line_graph_roll_avg_max(tf->fio_gld); in plot_fio_tput()
853 if (val > max) in plot_fio_tput()
854 max = val; in plot_fio_tput()
858 if (tf->fio_gld->max > 0) in plot_fio_tput()
859 tf->fio_gld->max = max; in plot_fio_tput()
867 scale_line_graph_bytes(&max, &units, 1024); in plot_fio_tput()
870 set_yticks(plot, num_yticks, 0, max, ""); in plot_fio_tput()
874 if (tf->fio_gld->max > 0) { in plot_fio_tput()
875 svg_line_graph(plot, tf->fio_gld, tf->line_color, 0, 0); in plot_fio_tput()
877 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_fio_tput()
881 if (plot->add_xlabel) in plot_fio_tput()
882 set_xlabel(plot, "Time (seconds)"); in plot_fio_tput()
894 int max = 0; in plot_cpu() local
906 if (tf->trace->mpstat_num_cpus > max) in plot_cpu()
907 max = tf->trace->mpstat_num_cpus; in plot_cpu()
909 if (max == 0) in plot_cpu()
914 ymax = tf->mpstat_gld[gld_index]->max; in plot_cpu()
918 svg_alloc_legend(plot, num_traces * max); in plot_cpu()
923 max_seconds = tf->mpstat_max_seconds; in plot_cpu()
925 set_yticks(plot, num_yticks, 0, tf->mpstat_gld[gld_index]->max, ""); in plot_cpu()
927 set_xticks(plot, num_xticks, tf->mpstat_min_seconds, max_seconds); in plot_cpu()
931 if (tf->mpstat_gld == 0) in plot_cpu()
933 for (gld_i = tf->mpstat_gld[0]->min_seconds; in plot_cpu()
934 gld_i < tf->mpstat_gld[0]->stop_seconds; gld_i++) { in plot_cpu()
935 if (tf->mpstat_gld[gld_index]->data[gld_i].count) { in plot_cpu()
936 avg += (tf->mpstat_gld[gld_index]->data[gld_i].sum / in plot_cpu()
937 tf->mpstat_gld[gld_index]->data[gld_i].count); in plot_cpu()
940 avg /= tf->mpstat_gld[gld_index]->stop_seconds - in plot_cpu()
941 tf->mpstat_gld[gld_index]->min_seconds; in plot_cpu()
943 svg_line_graph(plot, tf->mpstat_gld[0], color, 0, 0); in plot_cpu()
944 svg_add_legend(plot, tf->label, " avg", color); in plot_cpu()
946 for (i = 1; i < tf->trace->mpstat_num_cpus + 1; i++) { in plot_cpu()
947 struct graph_line_data *gld = tf->mpstat_gld[i * MPSTAT_GRAPHS + gld_index]; in plot_cpu()
950 for (gld_i = gld->min_seconds; in plot_cpu()
951 gld_i < gld->stop_seconds; gld_i++) { in plot_cpu()
952 if (gld->data[i].count) { in plot_cpu()
953 this_avg += gld->data[i].sum / in plot_cpu()
954 gld->data[i].count; in plot_cpu()
958 this_avg /= gld->stop_seconds - gld->min_seconds; in plot_cpu()
960 for (gld_i = gld->min_seconds; in plot_cpu()
961 gld_i < gld->stop_seconds; gld_i++) { in plot_cpu()
964 if (gld->data[gld_i].count == 0) in plot_cpu()
966 val = (double)gld->data[gld_i].sum / in plot_cpu()
967 gld->data[gld_i].count; in plot_cpu()
972 snprintf(line, line_len, " CPU %d\n", i - 1); in plot_cpu()
973 svg_add_legend(plot, tf->label, line, color); in plot_cpu()
982 if (plot->add_xlabel) in plot_cpu()
983 set_xlabel(plot, "Time (seconds)"); in plot_cpu()
985 if (!plot->no_legend) { in plot_cpu()
997 u64 max = 0, val; in plot_queue_depth() local
1008 val = line_graph_roll_avg_max(tf->queue_depth_gld); in plot_queue_depth()
1009 if (val > max) in plot_queue_depth()
1010 max = val; in plot_queue_depth()
1014 tf->queue_depth_gld->max = max; in plot_queue_depth()
1017 set_yticks(plot, num_yticks, 0, max, ""); in plot_queue_depth()
1021 svg_line_graph(plot, tf->queue_depth_gld, tf->line_color, 0, 0); in plot_queue_depth()
1023 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_queue_depth()
1026 if (plot->add_xlabel) in plot_queue_depth()
1027 set_xlabel(plot, "Time (seconds)"); in plot_queue_depth()
1047 snprintf(line, line_len, "find %s -name \\*.svg | xargs -I{} -n 1 -P 8 rsvg-convert -o {}.png {}", in convert_movie_files()
1055 snprintf(line, line_len, "ffmpeg -r 20 -y -i %s/%%10d-%s.svg.png -b:v 250k " in mencode_movie()
1056 "-vcodec %s %s", movie_dir, output_filename, ffmpeg_codec, in mencode_movie()
1064 snprintf(line, line_len, "png2theora -o %s %s/%%010d-%s.svg.png", in tencode_movie()
1107 char movie_dir[] = "io-movie-XXXXXX"; in plot_io_movie()
1121 char *prefix = tf->label ? tf->label : ""; in plot_io_movie()
1125 snprintf(line, line_len, "%s/%010d-%s.svg", movie_dir, i, output_filename); in plot_io_movie()
1128 orig_y_offset = plot->start_y_offset; in plot_io_movie()
1130 plot->no_legend = 1; in plot_io_movie()
1133 plot->timeline = i / graph_width_factor; in plot_io_movie()
1135 plot_tput(plot, tf->min_seconds, tf->max_seconds, 0); in plot_io_movie()
1137 plot_cpu(plot, tf->max_seconds, in plot_io_movie()
1138 "CPU System Time", CPU_SYS_GRAPH_INDEX, MPSTAT_SYS); in plot_io_movie()
1140 plot->direction = PLOT_ACROSS; in plot_io_movie()
1141 plot_queue_depth(plot, tf->min_seconds, tf->max_seconds); in plot_io_movie()
1144 plot->start_y_offset = orig_y_offset; in plot_io_movie()
1145 set_graph_size(cols - cols / graph_width_factor, rows); in plot_io_movie()
1146 plot->no_legend = 0; in plot_io_movie()
1147 plot->timeline = 0; in plot_io_movie()
1148 plot->direction = PLOT_DOWN;; in plot_io_movie()
1158 history->col = i; in plot_io_movie()
1160 for (pid = 0; pid < tf->io_plots; pid++) { in plot_io_movie()
1161 if (tf->gdd_reads[pid]) in plot_io_movie()
1162 plot_io_legend(plot, tf->gdd_reads[pid], prefix, " Reads"); in plot_io_movie()
1163 if (tf->gdd_writes[pid]) in plot_io_movie()
1164 plot_io_legend(plot, tf->gdd_writes[pid], prefix, " Writes"); in plot_io_movie()
1169 for (pid = 0; pid < tf->io_plots; pid++) { in plot_io_movie()
1170 if (tf->gdd_reads[pid]) { in plot_io_movie()
1171 svg_io_graph_movie(tf->gdd_reads[pid], in plot_io_movie()
1172 history->read_pid_history[pid], in plot_io_movie()
1175 if (tf->gdd_writes[pid]) { in plot_io_movie()
1176 svg_io_graph_movie(tf->gdd_writes[pid], in plot_io_movie()
1177 history->write_pid_history[pid], in plot_io_movie()
1208 u64 max = 0, val; in plot_latency() local
1217 val = line_graph_roll_avg_max(tf->latency_gld); in plot_latency()
1218 if (val > max) in plot_latency()
1219 max = val; in plot_latency()
1223 tf->latency_gld->max = max; in plot_latency()
1230 scale_line_graph_time(&max, &units); in plot_latency()
1233 set_yticks(plot, num_yticks, 0, max, ""); in plot_latency()
1237 svg_line_graph(plot, tf->latency_gld, tf->line_color, 0, 0); in plot_latency()
1239 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_latency()
1242 if (plot->add_xlabel) in plot_latency()
1243 set_xlabel(plot, "Time (seconds)"); in plot_latency()
1255 u64 max = 0, val; in plot_iops() local
1261 val = line_graph_roll_avg_max(tf->iop_gld); in plot_iops()
1262 if (val > max) in plot_iops()
1263 max = val; in plot_iops()
1267 tf->iop_gld->max = max; in plot_iops()
1276 scale_line_graph_bytes(&max, &units, 1000); in plot_iops()
1279 set_yticks(plot, num_yticks, 0, max, units); in plot_iops()
1283 svg_line_graph(plot, tf->iop_gld, tf->line_color, 0, 0); in plot_iops()
1285 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_iops()
1288 if (plot->add_xlabel) in plot_iops()
1289 set_xlabel(plot, "Time (seconds)"); in plot_iops()
1304 if (plot->direction == PLOT_DOWN) { in check_plot_columns()
1305 plot->start_x_offset = 0; in check_plot_columns()
1307 plot->add_xlabel = 1; in check_plot_columns()
1309 plot->direction = PLOT_ACROSS; in check_plot_columns()
1312 plot->direction = PLOT_DOWN; in check_plot_columns()
1314 plot->add_xlabel = 1; in check_plot_columns()
1326 {"fio-trace", required_argument, 0, 'F'},
1332 {"no-graph", required_argument, 0, 'N'},
1333 {"only-graph", required_argument, 0, 'O'},
1335 {"blktrace-destination", required_argument, 0, 'D'},
1339 {"keep-movie-svgs", no_argument, 0, 'K'},
1344 {"io-plot-action", required_argument, 0, 'a'},
1345 {"per-process-io", no_argument, 0, 'P'},
1353 "\t-d (--device): device for blktrace to trace\n" in print_usage()
1354 "\t-D (--blktrace-destination): destination for blktrace\n" in print_usage()
1355 "\t-t (--trace): trace file name (more than one allowed)\n" in print_usage()
1356 "\t-F (--fio-trace): fio bandwidth trace (more than one allowed)\n" in print_usage()
1357 "\t-l (--label): trace label in the graph\n" in print_usage()
1358 "\t-o (--output): output file name for the SVG image or video\n" in print_usage()
1359 "\t-p (--prog): run a program while blktrace is run\n" in print_usage()
1360 "\t-K (--keep-movie-svgs keep svgs generated for movie mode\n" in print_usage()
1361 "\t-m (--movie [=spindle|rect]): create IO animations\n" in print_usage()
1362 "\t-C (--codec): ffmpeg codec. Use ffmpeg -codecs to list\n" in print_usage()
1363 "\t-r (--rolling): number of seconds in the rolling averge\n" in print_usage()
1364 "\t-T (--title): graph title\n" in print_usage()
1365 "\t-N (--no-graph): skip a single graph (io, tput, latency, queue-depth, \n" in print_usage()
1366 "\t\t\tiops, cpu-sys, cpu-io, cpu-irq cpu-soft cpu-user)\n" in print_usage()
1367 "\t-O (--only-graph): add a single graph to the output\n" in print_usage()
1368 "\t-h (--height): set the height of each graph\n" in print_usage()
1369 "\t-w (--width): set the width of each graph\n" in print_usage()
1370 "\t-c (--columns): numbers of columns in graph output\n" in print_usage()
1371 "\t-x (--xzoom): limit processed time to min:max\n" in print_usage()
1372 "\t-y (--yzoom): limit processed sectors to min:max\n" in print_usage()
1373 "\t-a (--io-plot-action): plot given action (one of Q,D,C) in IO graph\n" in print_usage()
1374 "\t-P (--per-process-io): distinguish between processes in IO graph\n" in print_usage()
1379 static int parse_double_range(char *str, double *min, double *max) in parse_double_range() argument
1383 /* Empty lower bound - leave original value */ in parse_double_range()
1386 if (*min == HUGE_VAL || *min == -HUGE_VAL) in parse_double_range()
1387 return -ERANGE; in parse_double_range()
1389 return -EINVAL; in parse_double_range()
1392 /* Empty upper bound - leave original value */ in parse_double_range()
1394 *max = strtod(end+1, &end); in parse_double_range()
1395 if (*max == HUGE_VAL || *max == -HUGE_VAL) in parse_double_range()
1396 return -ERANGE; in parse_double_range()
1398 return -EINVAL; in parse_double_range()
1400 if (*min > *max) in parse_double_range()
1401 return -EINVAL; in parse_double_range()
1406 unsigned long long *max) in parse_ull_range() argument
1410 /* Empty lower bound - leave original value */ in parse_ull_range()
1414 return -ERANGE; in parse_ull_range()
1416 return -EINVAL; in parse_ull_range()
1419 /* Empty upper bound - leave original value */ in parse_ull_range()
1421 *max = strtoull(end+1, &end, 10); in parse_ull_range()
1422 if (*max == ULLONG_MAX && errno == ERANGE) in parse_ull_range()
1423 return -ERANGE; in parse_ull_range()
1425 return -EINVAL; in parse_ull_range()
1427 if (*min > *max) in parse_ull_range()
1428 return -EINVAL; in parse_ull_range()
1444 if (c == -1) in parse_options()
1478 if (num_blktrace_devices == MAX_DEVICES_PER_TRACE - 1) { in parse_options()
1524 fprintf(stderr, "Cannot parse time range %s\n", in parse_options()
1568 prog_argc = ac - optind; in parse_options()
1570 fprintf(stderr, "--prog or -p given but no program specified\n"); in parse_options()
1573 fprintf(stderr, "Extra arguments '%s'... (and --prog not specified)\n", av[optind]); in parse_options()
1669 /* step two, find the maxes for time and offset */ in main()
1682 /* push the max we found into all the tfs */ in main()
1712 plot->add_xlabel = 1; in main()
1717 plot->add_xlabel = 0; in main()
1726 num_yticks--; in main()
1735 plot_cpu(plot, max_seconds, "CPU IO Wait Time", in main()
1739 plot_cpu(plot, max_seconds, "CPU System Time", in main()
1743 plot_cpu(plot, max_seconds, "CPU IRQ Time", in main()
1747 plot_cpu(plot, max_seconds, "CPU SoftIRQ Time", in main()
1751 plot_cpu(plot, max_seconds, "CPU User Time", in main()