Lines Matching refs:gdd
158 struct graph_dot_data *gdd; in alloc_dot_data() local
168 gdd = calloc(1, size + arr_size); in alloc_dot_data()
169 if (!gdd) { in alloc_dot_data()
173 gdd->min_seconds = min_seconds; in alloc_dot_data()
174 gdd->max_seconds = max_seconds; in alloc_dot_data()
175 gdd->stop_seconds = stop_seconds; in alloc_dot_data()
176 gdd->rows = rows; in alloc_dot_data()
177 gdd->cols = cols; in alloc_dot_data()
178 gdd->min_offset = min_offset; in alloc_dot_data()
179 gdd->max_offset = max_offset; in alloc_dot_data()
180 gdd->color = color; in alloc_dot_data()
181 gdd->label = label; in alloc_dot_data()
186 return gdd; in alloc_dot_data()
189 void set_gdd_bit(struct graph_dot_data *gdd, u64 offset, double bytes, double time) in set_gdd_bit() argument
191 double bytes_per_row = (double)(gdd->max_offset - gdd->min_offset + 1) / gdd->rows; in set_gdd_bit()
192 double secs_per_col = (double)(gdd->max_seconds - gdd->min_seconds) / gdd->cols; in set_gdd_bit()
202 if (offset > gdd->max_offset || offset < gdd->min_offset) in set_gdd_bit()
205 if (time < gdd->min_seconds || time > gdd->max_seconds) in set_gdd_bit()
207 gdd->total_ios++; in set_gdd_bit()
208 while (bytes > 0 && offset <= gdd->max_offset) { in set_gdd_bit()
209 row = (double)(offset - gdd->min_offset) / bytes_per_row; in set_gdd_bit()
210 col = (time - gdd->min_seconds) / secs_per_col; in set_gdd_bit()
214 bit_index = row_int * gdd->cols + col_int; in set_gdd_bit()
218 gdd->data[arr_index] |= 1 << bit_mod; in set_gdd_bit()
982 int svg_io_graph_movie(struct graph_dot_data *gdd, struct pid_plot_history *pph, int col) in svg_io_graph_movie() argument
989 double blocks_per_row = (gdd->max_offset - gdd->min_offset + 1) / gdd->rows; in svg_io_graph_movie()
990 …double movie_blocks_per_cell = (gdd->max_offset - gdd->min_offset + 1) / (graph_width * graph_heig… in svg_io_graph_movie()
995 pph->history_max = (gdd->max_offset - gdd->min_offset + 1) / movie_blocks_per_cell; in svg_io_graph_movie()
997 for (row = gdd->rows - 1; row >= 0; row--) { in svg_io_graph_movie()
998 bit_index = row * gdd->cols + col; in svg_io_graph_movie()
1004 val = gdd->data[arr_index]; in svg_io_graph_movie()
1019 int svg_io_graph(struct plot *plot, struct graph_dot_data *gdd) in svg_io_graph() argument
1029 for (row = gdd->rows - 1; row >= 0; row--) { in svg_io_graph()
1030 for (col = 0; col < gdd->cols; col++) { in svg_io_graph()
1031 bit_index = row * gdd->cols + col; in svg_io_graph()
1037 val = gdd->data[arr_index]; in svg_io_graph()
1039 svg_add_io(fd, floor(row / io_graph_scale), col, 1.5, 1.5, gdd->color); in svg_io_graph()