diff options
Diffstat (limited to 'rt-plot.h')
-rw-r--r-- | rt-plot.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/rt-plot.h b/rt-plot.h new file mode 100644 index 0000000..0abc5c4 --- /dev/null +++ b/rt-plot.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef __RT_PLOT_H | ||
2 | #define __RT_PLOT_H | ||
3 | |||
4 | #include <gtk/gtk.h> | ||
5 | #include "trace-cmd.h" | ||
6 | |||
7 | struct graph_plot; | ||
8 | struct graph_info; | ||
9 | struct rt_plot_common; | ||
10 | |||
11 | typedef int (*record_matches_cb)(struct rt_plot_common *rt, | ||
12 | struct graph_info *ginfo, | ||
13 | struct record *record); | ||
14 | typedef int (*is_drawn_cb)(struct graph_info *ginfo, int eid); | ||
15 | typedef struct record* (*write_header_cb)(struct rt_plot_common *rt, | ||
16 | struct graph_info *ginfo, | ||
17 | struct trace_seq *s, | ||
18 | unsigned long long time); | ||
19 | struct rt_plot_common { | ||
20 | record_matches_cb record_matches; | ||
21 | is_drawn_cb is_drawn; | ||
22 | write_header_cb write_header; | ||
23 | }; | ||
24 | |||
25 | int | ||
26 | rt_plot_display_last_event(struct graph_info *ginfo, struct graph_plot *plot, | ||
27 | struct trace_seq *s, unsigned long long time); | ||
28 | int | ||
29 | rt_plot_display_info(struct graph_info *ginfo, struct graph_plot *plot, | ||
30 | struct trace_seq *s, unsigned long long time); | ||
31 | struct record* | ||
32 | rt_plot_find_record(struct graph_info *ginfo, struct graph_plot *plot, | ||
33 | unsigned long long time); | ||
34 | int | ||
35 | rt_plot_match_time(struct graph_info *ginfo, struct graph_plot *plot, | ||
36 | unsigned long long time); | ||
37 | struct record* | ||
38 | __find_rt_record(struct graph_info *ginfo, struct rt_plot_common *rt, | ||
39 | guint64 time, int display); | ||
40 | |||
41 | static inline struct record* | ||
42 | find_rt_record(struct graph_info *ginfo, struct rt_plot_common *rt, guint64 time) | ||
43 | { | ||
44 | return __find_rt_record(ginfo, rt, time, 0); | ||
45 | } | ||
46 | |||
47 | static inline struct record* | ||
48 | find_rt_display_record(struct graph_info *ginfo, | ||
49 | struct rt_plot_common *rt, guint64 time) | ||
50 | { | ||
51 | return __find_rt_record(ginfo, rt, time, 1); | ||
52 | } | ||
53 | |||
54 | unsigned long long next_rts(struct graph_info *ginfo, int cpu, | ||
55 | unsigned long long ft_target); | ||
56 | void set_cpu_to_rts(struct graph_info *ginfo, | ||
57 | unsigned long long rt_target, int cpu); | ||
58 | void set_cpus_to_rts(struct graph_info *ginfo, | ||
59 | unsigned long long rt_target); | ||
60 | struct record* get_previous_release(struct graph_info *ginfo, int tid, | ||
61 | unsigned long long time, int *job, | ||
62 | unsigned long long *release, | ||
63 | unsigned long long *deadline); | ||
64 | |||
65 | #endif | ||