aboutsummaryrefslogtreecommitdiffstats
path: root/rt-plot.h
diff options
context:
space:
mode:
Diffstat (limited to 'rt-plot.h')
-rw-r--r--rt-plot.h65
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
7struct graph_plot;
8struct graph_info;
9struct rt_plot_common;
10
11typedef int (*record_matches_cb)(struct rt_plot_common *rt,
12 struct graph_info *ginfo,
13 struct record *record);
14typedef int (*is_drawn_cb)(struct graph_info *ginfo, int eid);
15typedef 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);
19struct rt_plot_common {
20 record_matches_cb record_matches;
21 is_drawn_cb is_drawn;
22 write_header_cb write_header;
23};
24
25int
26rt_plot_display_last_event(struct graph_info *ginfo, struct graph_plot *plot,
27 struct trace_seq *s, unsigned long long time);
28int
29rt_plot_display_info(struct graph_info *ginfo, struct graph_plot *plot,
30 struct trace_seq *s, unsigned long long time);
31struct record*
32rt_plot_find_record(struct graph_info *ginfo, struct graph_plot *plot,
33 unsigned long long time);
34int
35rt_plot_match_time(struct graph_info *ginfo, struct graph_plot *plot,
36 unsigned long long time);
37struct record*
38__find_rt_record(struct graph_info *ginfo, struct rt_plot_common *rt,
39 guint64 time, int display);
40
41static inline struct record*
42find_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
47static inline struct record*
48find_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
54unsigned long long next_rts(struct graph_info *ginfo, int cpu,
55 unsigned long long ft_target);
56void set_cpu_to_rts(struct graph_info *ginfo,
57 unsigned long long rt_target, int cpu);
58void set_cpus_to_rts(struct graph_info *ginfo,
59 unsigned long long rt_target);
60struct 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