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.c51
1 files changed, 41 insertions, 10 deletions
diff --git a/rt-plot-task.c b/rt-plot-task.c
index 9e8ffe7..b6d794d 100644
--- a/rt-plot-task.c
+++ b/rt-plot-task.c
@@ -93,7 +93,7 @@ next_box_record(struct graph_info *ginfo, struct rt_task_info *rtt_info,
93static struct record* 93static struct record*
94__find_record(struct graph_info *ginfo, gint pid, guint64 time, int display) 94__find_record(struct graph_info *ginfo, gint pid, guint64 time, int display)
95{ 95{
96 int next_cpu, match, eid, is_sa = 0; 96 int next_cpu, match, eid, ignored= 0;
97 struct record *record = NULL; 97 struct record *record = NULL;
98 struct rt_graph_info *rtg_info = &ginfo->rtg_info; 98 struct rt_graph_info *rtg_info = &ginfo->rtg_info;
99 99
@@ -106,9 +106,15 @@ __find_record(struct graph_info *ginfo, gint pid, guint64 time, int display)
106 match = record_matches_pid(ginfo, record, pid); 106 match = record_matches_pid(ginfo, record, pid);
107 if (display) { 107 if (display) {
108 eid = pevent_data_type(ginfo->pevent, record); 108 eid = pevent_data_type(ginfo->pevent, record);
109 is_sa = (eid == rtg_info->switch_away_id); 109 ignored = (eid == rtg_info->switch_away_id ||
110 eid == rtg_info->switch_to_id ||
111 eid == rtg_info->task_completion_id ||
112 eid == rtg_info->task_block_id ||
113 eid == rtg_info->task_resume_id ||
114 eid == rtg_info->task_release_id);
110 } 115 }
111 } while (!(get_rts(ginfo, record) > time && match && !is_sa)); 116 ignored = ignored && eid == ginfo->event_sched_switch_id;
117 } while (!(get_rts(ginfo, record) > time && match && !ignored));
112 118
113 return record; 119 return record;
114} 120}
@@ -358,12 +364,12 @@ static int try_resume(struct graph_info *ginfo, struct rt_task_info *rtt_info,
358 match = rt_graph_check_task_resume(&ginfo->rtg_info, ginfo->pevent, 364 match = rt_graph_check_task_resume(&ginfo->rtg_info, ginfo->pevent,
359 record, &pid, &ts); 365 record, &pid, &ts);
360 if (match && pid == rtt_info->pid) { 366 if (match && pid == rtt_info->pid) {
361 /* info->box = TRUE; */ 367 info->box = TRUE;
362 /* info->bcolor = 0x0; */ 368 info->bcolor = 0x0;
363 /* info->bfill = TRUE; */ 369 info->bfill = TRUE;
364 /* info->bthin = TRUE; */ 370 info->bthin = TRUE;
365 /* info->bstart = rtt_info->block_time; */ 371 info->bstart = rtt_info->block_time;
366 /* info->bend = ts; */ 372 info->bend = ts;
367 rtt_info->fresh = FALSE; 373 rtt_info->fresh = FALSE;
368 374
369 rtt_info->block_time = 0ULL; 375 rtt_info->block_time = 0ULL;
@@ -442,7 +448,8 @@ static int try_other(struct graph_info *ginfo, struct rt_task_info *rtt_info,
442 my_pid = (pid == epid); 448 my_pid = (pid == epid);
443 my_cpu = (rtt_info->run_time && record->cpu == rtt_info->run_cpu); 449 my_cpu = (rtt_info->run_time && record->cpu == rtt_info->run_cpu);
444 not_sa = (eid != ginfo->rtg_info.switch_away_id); 450 not_sa = (eid != ginfo->rtg_info.switch_away_id);
445 if (not_sa && (my_pid || my_cpu)) { 451 if (not_sa && (my_pid || my_cpu) &&
452 eid != ginfo->event_sched_switch_id) {
446 info->line = TRUE; 453 info->line = TRUE;
447 info->lcolor = hash_pid(record->cpu); 454 info->lcolor = hash_pid(record->cpu);
448 info->ltime = ts; 455 info->ltime = ts;
@@ -469,6 +476,13 @@ static void do_plot_end(struct graph_info *ginfo, struct rt_task_info *rtt_info,
469 info->blabel = rtt_info->label; 476 info->blabel = rtt_info->label;
470 } else if (rtt_info->block_time && rtt_info->block_cpu != NO_CPU) { 477 } else if (rtt_info->block_time && rtt_info->block_cpu != NO_CPU) {
471 /* Blocking happened */ 478 /* Blocking happened */
479 info->box = TRUE;
480 info->bcolor = 0x0;
481 info->bfill = TRUE;
482 info->bthin = TRUE;
483 info->bstart = rtt_info->block_time;
484 info->bend = ginfo->view_end_time;
485 rtt_info->fresh = FALSE;
472 } else if (rtt_info->fresh) { 486 } else if (rtt_info->fresh) {
473 /* Nothing happened!*/ 487 /* Nothing happened!*/
474 record = next_box_record(ginfo, rtt_info, 488 record = next_box_record(ginfo, rtt_info,
@@ -484,6 +498,13 @@ static void do_plot_end(struct graph_info *ginfo, struct rt_task_info *rtt_info,
484 info->bend = ginfo->view_end_time; 498 info->bend = ginfo->view_end_time;
485 } else if (eid == rtg_info->task_resume_id) { 499 } else if (eid == rtg_info->task_resume_id) {
486 /* In a block */ 500 /* In a block */
501 info->box = TRUE;
502 info->bcolor = 0x0;
503 info->bfill = TRUE;
504 info->bthin = TRUE;
505 info->bstart = ginfo->view_start_time;
506 info->bend = ginfo->view_end_time;
507 rtt_info->fresh = FALSE;
487 } 508 }
488 free_record(record); 509 free_record(record);
489 } 510 }
@@ -614,6 +635,16 @@ static int rt_task_plot_display_info(struct graph_info *ginfo,
614 if (record) { 635 if (record) {
615 rts = get_rts(ginfo, record); 636 rts = get_rts(ginfo, record);
616 eid = pevent_data_type(ginfo->pevent, record); 637 eid = pevent_data_type(ginfo->pevent, record);
638
639 if (in_res(ginfo, deadline, time)) {
640 trace_seq_printf(s, "litmus_deadline for %d:%d at %llu\n",
641 pid, job, deadline);
642 }
643 if (in_res(ginfo, release, time)) {
644 trace_seq_printf(s, "litmus_release for %d:%d at %llu\n",
645 pid, job, release);
646 }
647
617 if (in_res(ginfo, rts, time)) { 648 if (in_res(ginfo, rts, time)) {
618 event = pevent_data_event_from_type(ginfo->pevent, eid); 649 event = pevent_data_event_from_type(ginfo->pevent, eid);
619 if (event) { 650 if (event) {