aboutsummaryrefslogtreecommitdiffstats
path: root/rt-graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt-graph.c')
-rw-r--r--rt-graph.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/rt-graph.c b/rt-graph.c
index ecb24cb..0a72134 100644
--- a/rt-graph.c
+++ b/rt-graph.c
@@ -94,6 +94,8 @@ int rt_graph_check_task_param(struct rt_graph_info *rtg_info,
94 unsigned long long *period) 94 unsigned long long *period)
95{ 95{
96 struct event_format *event; 96 struct event_format *event;
97 struct rt_task_params *params;
98 struct task_list *list;
97 unsigned long long val; 99 unsigned long long val;
98 gint id; 100 gint id;
99 int ret = 0; 101 int ret = 0;
@@ -127,7 +129,19 @@ int rt_graph_check_task_param(struct rt_graph_info *rtg_info,
127 dprintf(3, "Read task_param (%d) record for task %d " 129 dprintf(3, "Read task_param (%d) record for task %d "
128 "(%llu, %llu)\n", id, *pid, *wcet, *period); 130 "(%llu, %llu)\n", id, *pid, *wcet, *period);
129 131
130 add_task_hash(rtg_info->tasks, *pid); 132 list = add_task_hash(rtg_info->tasks, *pid);
133 if (!list->data) {
134 /* If this pid is plotted, sections of time might later
135 * be viewed which are after this _param event. In this
136 * case, that plot would never read a _param event and
137 * would not know about the task's wcet and deadline.
138 * Store them with the task to avoid this issue.
139 */
140 params = malloc_or_die(sizeof(*params));
141 params->wcet = *wcet;
142 params->period = *period;
143 list->data = params;
144 }
131 145
132 if (*period > rtg_info->max_period) 146 if (*period > rtg_info->max_period)
133 rtg_info->max_period = *period; 147 rtg_info->max_period = *period;