}
}
-static char *create_movie_temp_dir(void)
-{
- char *ret;
- char *pattern = strdup("io-movie-XXXXXX");;
-
- ret = mkdtemp(pattern);
- if (!ret) {
- perror("Unable to create temp directory for movie files");
- exit(1);
- }
- return ret;
-}
-
static struct pid_plot_history *alloc_pid_plot_history(char *color)
{
struct pid_plot_history *pph;
static void plot_io_movie(struct plot *plot)
{
struct trace_file *tf;
- char *movie_dir = create_movie_temp_dir();
int i, pid;
struct plot_history *history;
int batch_i;
int batch_count;
int graph_width_factor = 5;
int orig_y_offset;
+ char movie_dir[] = "io-movie-XXXXXX";
+
+ if (mkdtemp(movie_dir) == NULL) {
+ perror("Unable to create temp directory for movie files");
+ exit(1);
+ }
get_graph_size(&cols, &rows);
batch_count = cols / total_frames;
convert_movie_files(movie_dir);
encode_movie(movie_dir);
cleanup_movie(movie_dir);
- free(movie_dir);
}
static void plot_latency(struct plot *plot, unsigned int min_seconds,
int start_blktrace(char **devices, int num_devices, char *trace_name, char *dest);
int start_mpstat(char *trace_name);
int wait_for_tracers(void);
-int start_mpstat(char *trace_name);
#endif