2 * gfio - gui front end for fio - the flexible io tester
4 * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
6 * The license below covers all files distributed with fio unless otherwise
7 * noted in the file itself.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #include "tickmarks.h"
35 #include "lib/prio_tree.h"
38 * Allowable difference to show tooltip
40 #define TOOLTIP_DELTA 0.08
52 struct flist_head list;
53 struct prio_tree_node node;
54 struct flist_head alias;
61 struct flist_head list;
63 struct flist_head value_list;
64 struct prio_tree_root prio_tree;
80 unsigned int xdim, ydim;
81 double xoffset, yoffset;
82 struct flist_head label_list;
85 graph_axis_unit_change_callback x_axis_unit_change_callback;
86 graph_axis_unit_change_callback y_axis_unit_change_callback;
87 unsigned int base_offset;
88 unsigned int dont_graph_all_zeroes;
96 double xtick_zero_val;
100 double ytick_zero_val;
101 double ytick_one_val;
104 void graph_set_size(struct graph *g, unsigned int xdim, unsigned int ydim)
110 void graph_set_position(struct graph *g, double xoffset, double yoffset)
112 g->xoffset = xoffset;
113 g->yoffset = yoffset;
116 struct graph *graph_new(unsigned int xdim, unsigned int ydim, const char *font)
120 g = calloc(1, sizeof(*g));
121 INIT_FLIST_HEAD(&g->label_list);
122 graph_set_size(g, xdim, ydim);
123 g->per_label_limit = -1;
126 g->font = GRAPH_DEFAULT_FONT;
130 void graph_set_font(struct graph *g, const char *font)
135 void graph_x_axis_unit_change_notify(struct graph *g, graph_axis_unit_change_callback f)
137 g->x_axis_unit_change_callback = f;
140 void graph_y_axis_unit_change_notify(struct graph *g, graph_axis_unit_change_callback f)
142 g->y_axis_unit_change_callback = f;
145 static int count_labels(struct graph *g)
147 struct flist_head *entry;
150 flist_for_each(entry, &g->label_list)
156 static int count_values(struct graph_label *l)
158 struct flist_head *entry;
161 flist_for_each(entry, &l->value_list)
167 typedef double (*double_comparator)(double a, double b);
169 static double mindouble(double a, double b)
171 return a < b ? a : b;
174 static double maxdouble(double a, double b)
176 return a < b ? b : a;
179 static double find_double_values(struct graph_label *l, double_comparator cmp)
181 struct flist_head *entry;
185 if (flist_empty(&l->value_list))
188 flist_for_each(entry, &l->value_list) {
189 struct graph_value *i;
191 i = flist_entry(entry, struct graph_value, list);
192 tmp = *(double *) i->value;
197 answer = cmp(answer, tmp);
203 static double find_double_data(struct graph *g, double_comparator cmp)
205 struct flist_head *entry;
206 struct graph_label *i;
210 if (flist_empty(&g->label_list))
213 flist_for_each(entry, &g->label_list) {
214 i = flist_entry(entry, struct graph_label, list);
215 tmp = find_double_values(i, cmp);
220 answer = cmp(tmp, answer);
226 static double find_min_data(struct graph *g)
228 return find_double_data(g, mindouble);
231 static double find_max_data(struct graph *g)
233 return find_double_data(g, maxdouble);
236 static void draw_bars(struct graph *bg, cairo_t *cr, struct graph_label *lb,
237 double label_offset, double bar_width,
238 double mindata, double maxdata)
240 struct flist_head *entry;
241 double x1, y1, x2, y2;
243 double domain, range, v;
245 domain = (maxdata - mindata);
246 range = (double) bg->ydim * 0.80; /* FIXME */
248 flist_for_each(entry, &lb->value_list) {
249 struct graph_value *i;
251 i = flist_entry(entry, struct graph_value, list);
253 x1 = label_offset + (double) bar_num * bar_width + (bar_width * 0.05);
254 x2 = x1 + bar_width * 0.90;
255 y2 = bg->ydim * 0.90;
256 v = *(double *) i->value;
257 y1 = y2 - (((v - mindata) / domain) * range);
258 cairo_move_to(cr, x1, y1);
259 cairo_line_to(cr, x1, y2);
260 cairo_line_to(cr, x2, y2);
261 cairo_line_to(cr, x2, y1);
262 cairo_close_path(cr);
269 static void draw_aligned_text(struct graph *g, cairo_t *cr, double x, double y,
270 double fontsize, const char *text, int alignment)
273 #define LEFT_JUSTIFIED 1
274 #define RIGHT_JUSTIFIED 2
276 double factor, direction;
277 cairo_text_extents_t extents;
284 case RIGHT_JUSTIFIED:
294 cairo_select_font_face(cr, g->font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
296 cairo_set_font_size(cr, fontsize);
297 cairo_text_extents(cr, text, &extents);
298 x = x + direction * (factor * extents.width + extents.x_bearing);
299 y = y - (extents.height / 2 + extents.y_bearing);
301 cairo_move_to(cr, x, y);
302 cairo_show_text(cr, text);
305 static inline void draw_centered_text(struct graph *g, cairo_t *cr, double x, double y,
306 double fontsize, const char *text)
308 draw_aligned_text(g, cr, x, y, fontsize, text, CENTERED);
311 static inline void draw_right_justified_text(struct graph *g, cairo_t *cr,
313 double fontsize, const char *text)
315 draw_aligned_text(g, cr, x, y, fontsize, text, RIGHT_JUSTIFIED);
318 static inline void draw_left_justified_text(struct graph *g, cairo_t *cr,
320 double fontsize, const char *text)
322 draw_aligned_text(g, cr, x, y, fontsize, text, LEFT_JUSTIFIED);
325 static void draw_vertical_centered_text(struct graph *g, cairo_t *cr, double x,
326 double y, double fontsize,
330 cairo_text_extents_t extents;
332 cairo_select_font_face(cr, g->font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
334 cairo_set_font_size(cr, fontsize);
335 cairo_text_extents(cr, text, &extents);
338 y = y + (extents.width / 2.0 + extents.x_bearing);
339 x = x - (extents.height / 2.0 + extents.y_bearing);
341 cairo_move_to(cr, x, y);
343 cairo_translate(cr, -sx, -sy);
344 cairo_rotate(cr, -90.0 * M_PI / 180.0);
345 cairo_translate(cr, sx, sy);
346 cairo_show_text(cr, text);
350 static void graph_draw_common(struct graph *g, cairo_t *cr,
351 double *x1, double *y1, double *x2, double *y2)
353 cairo_set_source_rgb(cr, 0, 0, 0);
354 cairo_set_line_width (cr, 0.8);
356 *x1 = 0.10 * g->xdim;
357 *x2 = 0.95 * g->xdim;
358 *y1 = 0.10 * g->ydim;
359 *y2 = 0.90 * g->ydim;
361 cairo_move_to(cr, *x1, *y1);
362 cairo_line_to(cr, *x1, *y2);
363 cairo_line_to(cr, *x2, *y2);
364 cairo_line_to(cr, *x2, *y1);
365 cairo_line_to(cr, *x1, *y1);
368 draw_centered_text(g, cr, g->xdim / 2, g->ydim / 20, 20.0, g->title);
369 draw_centered_text(g, cr, g->xdim / 2, g->ydim * 0.97, 14.0, g->xtitle);
370 draw_vertical_centered_text(g, cr, g->xdim * 0.02, g->ydim / 2, 14.0, g->ytitle);
374 static void graph_draw_x_ticks(struct graph *g, cairo_t *cr,
375 double x1, double y1, double x2, double y2,
376 double minx, double maxx, int nticks, int add_tm_text)
381 static double dash[] = { 1.0, 2.0 };
383 nticks = calc_tickmarks(minx, maxx, nticks, &tm, &power_of_ten,
384 g->x_axis_unit_change_callback == NULL, g->base_offset);
385 if (g->x_axis_unit_change_callback)
386 g->x_axis_unit_change_callback(g, power_of_ten);
388 for (i = 0; i < nticks; i++) {
389 tx = (((tm[i].value) - minx) / (maxx - minx)) * (x2 - x1) + x1;
396 g->xtick_zero_val = tm[0].value;
398 g->xtick_delta = (tm[1].value - tm[0].value) / (tx - g->xtick_zero);
399 g->xtick_one_val = tm[1].value;
402 /* really tx < yx || tx > x2, but protect against rounding */
403 if (x1 - tx > 0.01 || tx - x2 > 0.01)
407 cairo_set_line_width(cr, 0.8);
408 cairo_move_to(cr, tx, y2);
409 cairo_line_to(cr, tx, y2 + (y2 - y1) * 0.03);
412 /* draw grid lines */
414 cairo_set_dash(cr, dash, 2, 2.0);
415 cairo_set_line_width(cr, 0.5);
416 cairo_move_to(cr, tx, y1);
417 cairo_line_to(cr, tx, y2);
424 /* draw tickmark label */
425 draw_centered_text(g, cr, tx, y2 * 1.04, 12.0, tm[i].string);
430 static double graph_draw_y_ticks(struct graph *g, cairo_t *cr,
431 double x1, double y1, double x2, double y2,
432 double miny, double maxy, int nticks, int add_tm_text)
437 static double dash[] = { 2.0, 2.0 };
439 nticks = calc_tickmarks(miny, maxy, nticks, &tm, &power_of_ten,
440 g->y_axis_unit_change_callback == NULL, g->base_offset);
441 if (g->y_axis_unit_change_callback)
442 g->y_axis_unit_change_callback(g, power_of_ten);
445 * Use highest tickmark as top of graph, not highest value. Otherwise
446 * it's impossible to see what the max value is, if the graph is
449 maxy = tm[nticks - 1].value;
451 for (i = 0; i < nticks; i++) {
452 ty = y2 - (((tm[i].value) - miny) / (maxy - miny)) * (y2 - y1);
459 g->ytick_zero_val = tm[0].value;
461 g->ytick_delta = (tm[1].value - tm[0].value) / (ty - g->ytick_zero);
462 g->ytick_one_val = tm[1].value;
465 /* really ty < y1 || ty > y2, but protect against rounding */
466 if (y1 - ty > 0.01 || ty - y2 > 0.01)
470 cairo_move_to(cr, x1, ty);
471 cairo_line_to(cr, x1 - (x2 - x1) * 0.02, ty);
474 /* draw grid lines */
476 cairo_set_dash(cr, dash, 2, 2.0);
477 cairo_set_line_width(cr, 0.5);
478 cairo_move_to(cr, x1, ty);
479 cairo_line_to(cr, x2, ty);
486 /* draw tickmark label */
487 draw_right_justified_text(g, cr, x1 - (x2 - x1) * 0.025, ty, 12.0, tm[i].string);
492 * Return new max to use
497 void bar_graph_draw(struct graph *bg, cairo_t *cr)
499 double x1, y1, x2, y2;
500 double space_per_label, bar_width;
501 double label_offset, mindata, maxdata;
503 struct graph_label *lb;
504 struct flist_head *entry;
507 cairo_translate(cr, bg->xoffset, bg->yoffset);
508 graph_draw_common(bg, cr, &x1, &y1, &x2, &y2);
510 nlabels = count_labels(bg);
511 space_per_label = (x2 - x1) / (double) nlabels;
514 * Start bars at 0 unless we have negative values, otherwise we
515 * present a skewed picture comparing label X and X+1.
517 mindata = find_min_data(bg);
521 maxdata = find_max_data(bg);
523 if (fabs(maxdata - mindata) < 1e-20) {
524 draw_centered_text(bg, cr,
525 x1 + (x2 - x1) / 2.0,
526 y1 + (y2 - y1) / 2.0, 20.0, "No good data");
530 maxdata = graph_draw_y_ticks(bg, cr, x1, y1, x2, y2, mindata, maxdata, 10, 1);
532 flist_for_each(entry, &bg->label_list) {
535 lb = flist_entry(entry, struct graph_label, list);
536 nvalues = count_values(lb);
537 bar_width = (space_per_label - space_per_label * 0.2) / (double) nvalues;
538 label_offset = bg->xdim * 0.1 + space_per_label * (double) i + space_per_label * 0.1;
539 draw_bars(bg, cr, lb, label_offset, bar_width, mindata, maxdata);
540 // draw_centered_text(cr, label_offset + (bar_width / 2.0 + bar_width * 0.1), bg->ydim * 0.93,
541 draw_centered_text(bg, cr, x1 + space_per_label * (i + 0.5), bg->ydim * 0.93,
549 typedef double (*xy_value_extractor)(struct graph_value *v);
551 static double getx(struct graph_value *v)
553 struct xyvalue *xy = v->value;
557 static double gety(struct graph_value *v)
559 struct xyvalue *xy = v->value;
563 static double find_xy_value(struct graph *g, xy_value_extractor getvalue, double_comparator cmp)
565 double tmp, answer = 0.0;
566 struct graph_label *i;
567 struct graph_value *j;
568 struct flist_head *jentry, *entry;
571 flist_for_each(entry, &g->label_list) {
572 i = flist_entry(entry, struct graph_label, list);
574 flist_for_each(jentry, &i->value_list) {
575 j = flist_entry(jentry, struct graph_value, list);
581 answer = cmp(tmp, answer);
588 void line_graph_draw(struct graph *g, cairo_t *cr)
590 double x1, y1, x2, y2;
591 double minx, miny, maxx, maxy, gminx, gminy, gmaxx, gmaxy;
592 double tx, ty, top_extra, bottom_extra, left_extra, right_extra;
593 struct graph_label *i;
594 struct graph_value *j;
595 int good_data = 1, first = 1;
596 struct flist_head *entry, *lentry;
599 cairo_translate(cr, g->xoffset, g->yoffset);
600 graph_draw_common(g, cr, &x1, &y1, &x2, &y2);
602 minx = find_xy_value(g, getx, mindouble);
603 maxx = find_xy_value(g, getx, maxdouble);
604 miny = find_xy_value(g, gety, mindouble);
607 * Start graphs at zero, unless we have a value below. Otherwise
608 * it's hard to visually compare the read and write graph, since
609 * the lowest valued one will be the floor of the graph view.
614 maxy = find_xy_value(g, gety, maxdouble);
616 if (fabs(maxx - minx) < 1e-20 || fabs(maxy - miny) < 1e-20) {
629 if (g->top_extra > 0.001)
630 top_extra = fabs(maxy - miny) * g->top_extra;
631 if (g->bottom_extra > 0.001)
632 bottom_extra = fabs(maxy - miny) * g->bottom_extra;
633 if (g->left_extra > 0.001)
634 left_extra = fabs(maxx - minx) * g->left_extra;
635 if (g->right_extra > 0.001)
636 right_extra = fabs(maxx - minx) * g->right_extra;
638 gminx = minx - left_extra;
639 gmaxx = maxx + right_extra;
640 gminy = miny - bottom_extra;
641 gmaxy = maxy + top_extra;
643 graph_draw_x_ticks(g, cr, x1, y1, x2, y2, gminx, gmaxx, 10, good_data);
644 gmaxy = graph_draw_y_ticks(g, cr, x1, y1, x2, y2, gminy, gmaxy, 10, good_data);
649 cairo_set_line_width(cr, 1.5);
650 flist_for_each(lentry, &g->label_list) {
651 i = flist_entry(lentry, struct graph_label, list);
653 if (i->hide || i->r < 0) /* invisible data */
656 cairo_set_source_rgb(cr, i->r, i->g, i->b);
657 flist_for_each(entry, &i->value_list) {
658 j = flist_entry(entry, struct graph_value, list);
659 tx = ((getx(j) - gminx) / (gmaxx - gminx)) * (x2 - x1) + x1;
660 ty = y2 - ((gety(j) - gminy) / (gmaxy - gminy)) * (y2 - y1);
662 cairo_move_to(cr, tx, ty);
665 cairo_line_to(cr, tx, ty);
675 static void setstring(char **str, const char *value)
678 *str = strdup(value);
681 void graph_title(struct graph *bg, const char *title)
683 setstring(&bg->title, title);
686 void graph_x_title(struct graph *bg, const char *title)
688 setstring(&bg->xtitle, title);
691 void graph_y_title(struct graph *bg, const char *title)
693 setstring(&bg->ytitle, title);
696 static struct graph_label *graph_find_label(struct graph *bg,
699 struct flist_head *entry;
700 struct graph_label *i;
702 flist_for_each(entry, &bg->label_list) {
703 i = flist_entry(entry, struct graph_label, list);
705 if (strcmp(label, i->label) == 0)
712 graph_label_t graph_add_label(struct graph *bg, const char *label)
714 struct graph_label *i;
716 i = graph_find_label(bg, label);
718 return i; /* already present. */
719 i = calloc(1, sizeof(*i));
720 INIT_FLIST_HEAD(&i->value_list);
722 setstring(&i->label, label);
723 flist_add_tail(&i->list, &bg->label_list);
724 INIT_PRIO_TREE_ROOT(&i->prio_tree);
728 static void __graph_value_drop(struct graph_label *l, struct graph_value *v)
730 flist_del_init(&v->list);
738 static void graph_value_drop(struct graph_label *l, struct graph_value *v)
740 if (v->flags & GV_F_PRIO_SKIP) {
741 __graph_value_drop(l, v);
746 * Find head, the guy that's on the prio tree
748 while (!(v->flags & GV_F_ON_PRIO)) {
749 assert(!flist_empty(&v->alias));
750 v = flist_entry(v->alias.next, struct graph_value, alias);
753 prio_tree_remove(&l->prio_tree, &v->node);
758 while (!flist_empty(&v->alias)) {
759 struct graph_value *a;
761 a = flist_entry(v->alias.next, struct graph_value, alias);
762 flist_del_init(&a->alias);
764 __graph_value_drop(l, a);
767 __graph_value_drop(l, v);
770 static void graph_label_add_value(struct graph_label *i, void *value,
773 struct graph *g = i->parent;
774 struct graph_value *x;
776 x = malloc(sizeof(*x));
777 memset(x, 0, sizeof(*x));
778 INIT_FLIST_HEAD(&x->alias);
779 INIT_FLIST_HEAD(&x->list);
780 flist_add_tail(&x->list, &i->value_list);
785 double xval = getx(x);
786 double minx = xval - (g->xtick_one_val * TOOLTIP_DELTA);
787 double maxx = xval + (g->xtick_one_val * TOOLTIP_DELTA);
788 struct prio_tree_node *ret;
791 * use msec to avoid dropping too much precision when
792 * storing as an integer.
794 minx = minx * 1000.0;
795 maxx = maxx * 1000.0;
797 INIT_PRIO_TREE_NODE(&x->node);
798 x->node.start = minx;
800 x->tooltip = strdup(tooltip);
801 if (x->node.last == x->node.start) {
802 x->node.last += fabs(g->xtick_delta);
803 if (x->node.last == x->node.start)
808 * If ret != &x->node, we have an alias. Since the values
809 * should be identical, we can drop it
811 ret = prio_tree_insert(&i->prio_tree, &x->node);
812 if (ret != &x->node) {
813 struct graph_value *alias;
815 alias = container_of(ret, struct graph_value, node);
816 flist_add_tail(&x->alias, &alias->alias);
818 x->flags = GV_F_ON_PRIO;
820 x->flags = GV_F_PRIO_SKIP;
822 if (g->per_label_limit != -1 &&
823 i->value_count > g->per_label_limit) {
827 * If the limit was dynamically reduced, making us more
828 * than 1 entry ahead after adding this one, drop two
829 * entries. This will make us (eventually) reach the
832 if (i->value_count - g->per_label_limit >= 2)
835 while (to_drop-- && !flist_empty(&i->value_list)) {
836 x = flist_entry(i->value_list.next, struct graph_value, list);
837 graph_value_drop(i, x);
840 * If we have aliases, we could drop > 1 above.
842 if (i->value_count <= g->per_label_limit)
848 int graph_add_data(struct graph *bg, graph_label_t label, const double value)
850 struct graph_label *i = label;
853 d = malloc(sizeof(*d));
856 graph_label_add_value(i, d, NULL);
860 static int graph_nonzero_y(struct graph_label *l)
862 struct flist_head *entry;
864 flist_for_each(entry, &l->value_list) {
865 struct graph_value *v;
867 v = flist_entry(entry, struct graph_value, list);
875 int graph_add_xy_data(struct graph *bg, graph_label_t label,
876 const double x, const double y, const char *tooltip)
878 struct graph_label *i = label;
881 if (bg->dont_graph_all_zeroes && y == 0.0 && !graph_nonzero_y(i))
886 xy = malloc(sizeof(*xy));
890 graph_label_add_value(i, xy, tooltip);
894 static void graph_free_values(struct graph_label *l)
896 struct graph_value *i;
898 while (!flist_empty(&l->value_list)) {
899 i = flist_entry(l->value_list.next, struct graph_value, list);
900 graph_value_drop(l, i);
904 static void graph_free_labels(struct graph *g)
906 struct graph_label *i;
908 while (!flist_empty(&g->label_list)) {
909 i = flist_entry(g->label_list.next, struct graph_label, list);
911 graph_free_values(i);
916 void graph_set_color(struct graph *gr, graph_label_t label, double red,
917 double green, double blue)
919 struct graph_label *i = label;
922 if (red < 0.0) { /* invisible color */
944 void graph_free(struct graph *bg)
949 graph_free_labels(bg);
952 /* For each line in the line graph, up to per_label_limit segments may
953 * be added. After that, adding more data to the end of the line
954 * causes data to drop off of the front of the line.
956 void line_graph_set_data_count_limit(struct graph *g, int per_label_limit)
958 g->per_label_limit = per_label_limit;
961 void graph_add_extra_space(struct graph *g, double left_percent, double right_percent,
962 double top_percent, double bottom_percent)
964 g->left_extra = left_percent;
965 g->right_extra = right_percent;
966 g->top_extra = top_percent;
967 g->bottom_extra = bottom_percent;
971 * Normally values are logged in a base unit of 0, but for other purposes
972 * it makes more sense to log in higher unit. For instance for bandwidth
973 * purposes, you may want to log in KB/sec (or MB/sec) rather than bytes/sec.
975 void graph_set_base_offset(struct graph *g, unsigned int base_offset)
977 g->base_offset = base_offset;
980 int graph_has_tooltips(struct graph *g)
982 struct flist_head *entry;
983 struct graph_label *i;
985 flist_for_each(entry, &g->label_list) {
986 i = flist_entry(entry, struct graph_label, list);
988 if (!prio_tree_empty(&i->prio_tree))
995 int graph_contains_xy(struct graph *g, int x, int y)
997 int first_x = g->xoffset;
998 int last_x = g->xoffset + g->xdim;
999 int first_y = g->yoffset;
1000 int last_y = g->yoffset + g->ydim;
1002 return (x >= first_x && x <= last_x) && (y >= first_y && y <= last_y);
1005 const char *graph_find_tooltip(struct graph *g, int ix, int iy)
1007 double x = ix, y = iy;
1008 struct prio_tree_iter iter;
1009 struct prio_tree_node *n;
1010 struct graph_value *best = NULL;
1011 struct flist_head *entry;
1018 x = g->xtick_zero_val + ((x - g->xtick_zero) * g->xtick_delta);
1019 y = g->ytick_zero_val + ((y - g->ytick_zero) * g->ytick_delta);
1022 maxy = y + (g->ytick_one_val * TOOLTIP_DELTA);
1023 miny = y - (g->ytick_one_val * TOOLTIP_DELTA);
1024 best_delta = UINT_MAX;
1025 flist_for_each(entry, &g->label_list) {
1026 struct graph_label *i;
1028 i = flist_entry(entry, struct graph_label, list);
1032 INIT_PRIO_TREE_ITER(&iter);
1033 prio_tree_iter_init(&iter, &i->prio_tree, x, x);
1035 n = prio_tree_next(&iter);
1040 struct graph_value *v, *rootv;
1043 v = container_of(n, struct graph_value, node);
1047 ydiff = fabs(yval - y);
1050 * zero delta, or within or match critera, break
1052 if (ydiff < best_delta) {
1055 (yval >= miny && yval <= maxy)) {
1060 if (!flist_empty(&v->alias))
1061 v = flist_entry(v->alias.next, struct graph_value, alias);
1062 } while (v != rootv);
1063 } while ((n = prio_tree_next(&iter)) != NULL);
1066 * If we got matches in one label, don't check others.
1073 return best->tooltip;
1078 void graph_set_graph_all_zeroes(struct graph *g, unsigned int set)
1080 g->dont_graph_all_zeroes = !set;