static int line_len = 1024;
static int found_mpstat = 0;
static int make_movie = 0;
+static int keep_movie_svgs = 0;
static int opt_graph_width = 0;
static int opt_graph_height = 0;
static void cleanup_movie(char *movie_dir)
{
+ if (keep_movie_svgs) {
+ fprintf(stderr, "Keeping movie dir %s\n", movie_dir);
+ return;
+ }
fprintf(stderr, "Removing movie dir %s\n", movie_dir);
snprintf(line, line_len, "rm %s/*", movie_dir);
system(line);
HELP_LONG_OPT = 1,
};
-char *option_string = "T:t:o:l:r:O:N:d:D:p:m::h:w:c:x:y:a:P";
+char *option_string = "T:t:o:l:r:O:N:d:D:p:m::h:w:c:x:y:a:PK";
static struct option long_options[] = {
{"columns", required_argument, 0, 'c'},
{"title", required_argument, 0, 'T'},
{"blktrace-destination", required_argument, 0, 'D'},
{"prog", required_argument, 0, 'p'},
{"movie", optional_argument, 0, 'm'},
+ {"keep-movie-svgs", no_argument, 0, 'K'},
{"width", required_argument, 0, 'w'},
{"height", required_argument, 0, 'h'},
{"xzoom", required_argument, 0, 'x'},
"\t-l (--label): trace label in the graph\n"
"\t-o (--output): output file name (SVG only)\n"
"\t-p (--prog): program to run while blktrace is run\n"
+ "\t-K (--keep-movie-svgs keep svgs generated for movie mode\n"
"\t-m (--movie [=spindle|rect]): create IO animations\n"
"\t-r (--rolling): number of seconds in the rolling averge\n"
"\t-T (--title): graph title\n"
case 'p':
program_to_run = strdup(optarg);
break;
+ case 'K':
+ keep_movie_svgs = 1;
+ break;
case 'm':
make_movie = 1;
if (optarg) {