diff options
Diffstat (limited to 'rt-plot-task.c')
-rw-r--r-- | rt-plot-task.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/rt-plot-task.c b/rt-plot-task.c index 48bcdde..f8d29ed 100644 --- a/rt-plot-task.c +++ b/rt-plot-task.c | |||
@@ -93,11 +93,8 @@ __find_record(struct graph_info *ginfo, gint pid, guint64 time, int display) | |||
93 | struct rt_graph_info *rtg_info = &ginfo->rtg_info; | 93 | struct rt_graph_info *rtg_info = &ginfo->rtg_info; |
94 | 94 | ||
95 | set_cpus_to_rts(ginfo, time); | 95 | set_cpus_to_rts(ginfo, time); |
96 | do { | 96 | while ((record = tracecmd_read_next_data(ginfo->handle, &next_cpu))) { |
97 | free_record(record); | 97 | free_record(record); |
98 | record = tracecmd_read_next_data(ginfo->handle, &next_cpu); | ||
99 | if (!record) | ||
100 | return NULL; | ||
101 | match = record_matches_pid(ginfo, record, pid); | 98 | match = record_matches_pid(ginfo, record, pid); |
102 | if (display) { | 99 | if (display) { |
103 | eid = pevent_data_type(ginfo->pevent, record); | 100 | eid = pevent_data_type(ginfo->pevent, record); |
@@ -109,7 +106,9 @@ __find_record(struct graph_info *ginfo, gint pid, guint64 time, int display) | |||
109 | eid == rtg_info->task_release_id); | 106 | eid == rtg_info->task_release_id); |
110 | } | 107 | } |
111 | ignored = ignored && eid == ginfo->event_sched_switch_id; | 108 | ignored = ignored && eid == ginfo->event_sched_switch_id; |
112 | } while (!(get_rts(ginfo, record) > time && match && !ignored)); | 109 | if (get_rts(ginfo, record) >= time && match && !ignored) |
110 | break; | ||
111 | }; | ||
113 | 112 | ||
114 | return record; | 113 | return record; |
115 | } | 114 | } |
@@ -593,13 +592,6 @@ static int rt_task_plot_display_last_event(struct graph_info *ginfo, | |||
593 | return 1; | 592 | return 1; |
594 | } | 593 | } |
595 | 594 | ||
596 | static inline int in_res(struct graph_info *ginfo, unsigned long long time, | ||
597 | unsigned long target) | ||
598 | { | ||
599 | return time > target - 2/ginfo->resolution && | ||
600 | time < target + 2/ginfo->resolution; | ||
601 | } | ||
602 | |||
603 | static int rt_task_plot_display_info(struct graph_info *ginfo, | 595 | static int rt_task_plot_display_info(struct graph_info *ginfo, |
604 | struct graph_plot *plot, | 596 | struct graph_plot *plot, |
605 | struct trace_seq *s, | 597 | struct trace_seq *s, |