aboutsummaryrefslogtreecommitdiffstats
path: root/rt-graph.h
diff options
context:
space:
mode:
authorJonathan <hermanjl@hermanjl-Aspire-5553G.(none)>2012-03-06 16:10:41 -0500
committerJonathan <hermanjl@hermanjl-Aspire-5553G.(none)>2012-03-06 16:10:41 -0500
commit471b1045226249deacf12ad419b24d962bded880 (patch)
treeda61dd2c1d1942421cee3b812d4853bb47392b34 /rt-graph.h
parentbb3a47fd55929bbeef0a6dfdef1017391d5b7425 (diff)
rt-graph: real-time plots now draw other events
Vertical lines mark events which were run either with the tasks pid or ran on the task's cpu while it is executing.
Diffstat (limited to 'rt-graph.h')
-rw-r--r--rt-graph.h46
1 files changed, 31 insertions, 15 deletions
diff --git a/rt-graph.h b/rt-graph.h
index 8fbe6f3..be9aa44 100644
--- a/rt-graph.h
+++ b/rt-graph.h
@@ -6,6 +6,10 @@
6#include "trace-cmd.h" 6#include "trace-cmd.h"
7#include "rt-plot-task.h" 7#include "rt-plot-task.h"
8 8
9#define RT_TS_FIELD "__rt_ts"
10#define TS_HASH_SIZE 6
11struct ts_list;
12
9struct rt_graph_info { 13struct rt_graph_info {
10 14
11 /* List of all real-time tasks */ 15 /* List of all real-time tasks */
@@ -19,15 +23,15 @@ struct rt_graph_info {
19 struct format_field *param_wcet_field; 23 struct format_field *param_wcet_field;
20 struct format_field *param_period_field; 24 struct format_field *param_period_field;
21 25
22 gint task_switch_to_id; 26 gint switch_to_id;
23 struct format_field *switch_to_pid_field; 27 struct format_field *switch_to_pid_field;
24 struct format_field *switch_to_job_field; 28 struct format_field *switch_to_job_field;
25 struct format_field *switch_to_when_field; 29 struct format_field *switch_to_ts_field;
26 30
27 gint task_switch_away_id; 31 gint switch_away_id;
28 struct format_field *switch_to_pid_field; 32 struct format_field *switch_away_pid_field;
29 struct format_field *switch_to_job_field; 33 struct format_field *switch_away_job_field;
30 struct format_field *switch_to_when_field; 34 struct format_field *switch_away_ts_field;
31 35
32 gint task_release_id; 36 gint task_release_id;
33 struct format_field *release_pid_field; 37 struct format_field *release_pid_field;
@@ -38,28 +42,40 @@ struct rt_graph_info {
38 gint task_completion_id; 42 gint task_completion_id;
39 struct format_field *completion_pid_field; 43 struct format_field *completion_pid_field;
40 struct format_field *completion_job_field; 44 struct format_field *completion_job_field;
41 struct format_field *completion_when_field; 45 struct format_field *completion_ts_field;
42 46
43 gint task_block_id; 47 gint task_block_id;
44 struct format_field *block_pid_field; 48 struct format_field *block_pid_field;
45 struct format_field *block_when_field; 49 struct format_field *block_ts_field;
46 50
47 gint task_resume_id; 51 gint task_resume_id;
48 struct format_field *resume_pid_field; 52 struct format_field *resume_pid_field;
49 struct format_field *resume_when_field; 53 struct format_field *resume_ts_field;
54
55 /* Cache of ts fields for new events */
56 struct ts_list *events[TS_HASH_SIZE];
57};
58
59struct ts_list {
60 struct ts_list *next;
61 gint eid;
62 struct format_field *ts_field;
50}; 63};
51 64
52/* Event parsers */ 65/* Event parsers */
66void rt_graph_check_any(struct rt_graph_info *rtinfo,
67 struct pevent *pevent, struct record *record,
68 gint *epid, unsigned long long *ts);
53int rt_graph_check_task_param(struct rt_graph_info *rtinfo, struct pevent *pevent, 69int rt_graph_check_task_param(struct rt_graph_info *rtinfo, struct pevent *pevent,
54 struct record *record, gint *pid, 70 struct record *record, gint *pid,
55 unsigned long long *wcet, 71 unsigned long long *wcet,
56 unsigned long long *period); 72 unsigned long long *period);
57int rt_graph_check_task_switch_to(struct rt_graph_info *rtinfo, struct pevent *pevent, 73int rt_graph_check_switch_to(struct rt_graph_info *rtinfo, struct pevent *pevent,
58 struct record *record, gint *pid, gint *job, 74 struct record *record, gint *pid, gint *job,
59 unsigned long long *when); 75 unsigned long long *when);
60int rt_graph_check_task_switch_away(struct rt_graph_info *rtinfo, struct pevent *pevent, 76int rt_graph_check_switch_away(struct rt_graph_info *rtinfo, struct pevent *pevent,
61 struct record *record, gint *pid, gint *job, 77 struct record *record, gint *pid, gint *job,
62 unsigned long long *when); 78 unsigned long long *when);
63int rt_graph_check_task_release(struct rt_graph_info *rtinfo, struct pevent *pevent, 79int rt_graph_check_task_release(struct rt_graph_info *rtinfo, struct pevent *pevent,
64 struct record *record, gint *pid, gint *job, 80 struct record *record, gint *pid, gint *job,
65 unsigned long long *release, 81 unsigned long long *release,