aboutsummaryrefslogtreecommitdiffstats
path: root/trace-plot.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-plot.c')
-rw-r--r--trace-plot.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/trace-plot.c b/trace-plot.c
index e459969..5629e47 100644
--- a/trace-plot.c
+++ b/trace-plot.c
@@ -76,6 +76,7 @@ allocate_plot(struct graph_info *ginfo,
76struct graph_plot * 76struct graph_plot *
77trace_graph_plot_append(struct graph_info *ginfo, 77trace_graph_plot_append(struct graph_info *ginfo,
78 const char *label, enum graph_plot_type type, 78 const char *label, enum graph_plot_type type,
79 enum plot_time_type time,
79 const struct plot_callbacks *cb, void *data) 80 const struct plot_callbacks *cb, void *data)
80{ 81{
81 struct graph_plot *plot; 82 struct graph_plot *plot;
@@ -84,6 +85,7 @@ trace_graph_plot_append(struct graph_info *ginfo,
84 85
85 plot->type = type; 86 plot->type = type;
86 plot->pos = ginfo->plots; 87 plot->pos = ginfo->plots;
88 plot->time = time;
87 89
88 if (!ginfo->plots) { 90 if (!ginfo->plots) {
89 ginfo->plot_array = malloc_or_die(sizeof(ginfo->plot_array[0])); 91 ginfo->plot_array = malloc_or_die(sizeof(ginfo->plot_array[0]));
@@ -107,13 +109,15 @@ trace_graph_plot_append(struct graph_info *ginfo,
107struct graph_plot * 109struct graph_plot *
108trace_graph_plot_insert(struct graph_info *ginfo, 110trace_graph_plot_insert(struct graph_info *ginfo,
109 int pos, const char *label, enum graph_plot_type type, 111 int pos, const char *label, enum graph_plot_type type,
112 enum plot_time_type time,
110 const struct plot_callbacks *cb, void *data) 113 const struct plot_callbacks *cb, void *data)
111{ 114{
112 struct graph_plot *plot; 115 struct graph_plot *plot;
113 int i; 116 int i;
114 117
115 if (pos >= ginfo->plots) 118 if (pos >= ginfo->plots)
116 return trace_graph_plot_append(ginfo, label, type, cb, data); 119 return trace_graph_plot_append(ginfo, label, type,
120 time, cb, data);
117 121
118 if (pos < 0) 122 if (pos < 0)
119 pos = 0; 123 pos = 0;
@@ -121,6 +125,7 @@ trace_graph_plot_insert(struct graph_info *ginfo,
121 plot = allocate_plot(ginfo, label, cb, data); 125 plot = allocate_plot(ginfo, label, cb, data);
122 plot->pos = pos; 126 plot->pos = pos;
123 plot->type = type; 127 plot->type = type;
128 plot->time = time;
124 ginfo->plot_array = realloc(ginfo->plot_array, 129 ginfo->plot_array = realloc(ginfo->plot_array,
125 sizeof(ginfo->plot_array[0]) * 130 sizeof(ginfo->plot_array[0]) *
126 (ginfo->plots + 1)); 131 (ginfo->plots + 1));