aboutsummaryrefslogtreecommitdiffstats
path: root/rt-plot-task.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt-plot-task.c')
-rw-r--r--rt-plot-task.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rt-plot-task.c b/rt-plot-task.c
index 0415ecc..77a517b 100644
--- a/rt-plot-task.c
+++ b/rt-plot-task.c
@@ -63,11 +63,7 @@ next_box_record(struct graph_info *ginfo, struct rt_task_info *rtt_info,
63static int update_job(struct rt_task_info *rtt_info, int job) 63static int update_job(struct rt_task_info *rtt_info, int job)
64{ 64{
65 rtt_info->fresh = FALSE; 65 rtt_info->fresh = FALSE;
66 if (job < rtt_info->last_job) { 66 if (job > rtt_info->last_job) {
67 printf("Inconsistent job state for %d:%d -> %d\n",
68 rtt_info->pid, rtt_info->last_job, job);
69 return 0;
70 } else if (job > rtt_info->last_job) {
71 rtt_info->last_job = job; 67 rtt_info->last_job = job;
72 snprintf(rtt_info->label, LLABEL, "%d:%d", 68 snprintf(rtt_info->label, LLABEL, "%d:%d",
73 rtt_info->pid, rtt_info->last_job); 69 rtt_info->pid, rtt_info->last_job);
@@ -237,7 +233,7 @@ static int try_block(struct graph_info *ginfo, struct rt_task_info *rtt_info,
237 dprintf(3, "Block for %d on %d at %llu\n", 233 dprintf(3, "Block for %d on %d at %llu\n",
238 pid, record->cpu, ts); 234 pid, record->cpu, ts);
239 ret = 1; 235 ret = 1;
240 } 236 }
241 return ret; 237 return ret;
242} 238}
243 239
@@ -585,6 +581,7 @@ void rt_plot_task_update_callback(gboolean accept,
585 } 581 }
586 /* Remove the plot */ 582 /* Remove the plot */
587 trace_graph_plot_remove(ginfo, plot); 583 trace_graph_plot_remove(ginfo, plot);
584 trace_graph_plot_remove_task(ginfo, plot, rtt_info->pid);
588 } 585 }
589 586
590 /* Now add any plots that need to be added */ 587 /* Now add any plots that need to be added */
@@ -662,6 +659,8 @@ void rt_plot_task(struct graph_info *ginfo, int pid, int pos)
662 &rt_task_cb, rtt_info); 659 &rt_task_cb, rtt_info);
663 free(plot_label); 660 free(plot_label);
664 trace_graph_plot_add_all_recs(ginfo, plot); 661 trace_graph_plot_add_all_recs(ginfo, plot);
662
663 trace_graph_plot_add_task(ginfo, plot, pid);
665} 664}
666 665
667void rt_plot_add_all_tasks(struct graph_info *ginfo) 666void rt_plot_add_all_tasks(struct graph_info *ginfo)