aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/litmus/litmus.h10
-rw-r--r--include/litmus/rt_param.h3
-rw-r--r--include/litmus/trace.h13
3 files changed, 26 insertions, 0 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index b5d8abb4aea5..5883a67c5750 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -127,6 +127,16 @@ void srp_ceiling_block(void);
127 127
128#define bheap2task(hn) ((struct task_struct*) hn->value) 128#define bheap2task(hn) ((struct task_struct*) hn->value)
129 129
130static inline struct control_page* get_control_page(struct task_struct *t)
131{
132 return tsk_rt(t)->ctrl_page;
133}
134
135static inline int has_control_page(struct task_struct* t)
136{
137 return tsk_rt(t)->ctrl_page != NULL;
138}
139
130#ifdef CONFIG_NP_SECTION 140#ifdef CONFIG_NP_SECTION
131 141
132static inline int is_kernel_np(struct task_struct *t) 142static inline int is_kernel_np(struct task_struct *t)
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 3fb3c76225f2..57496662afde 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -66,6 +66,9 @@ struct control_page {
66 * its non-preemptive section? */ 66 * its non-preemptive section? */
67 int delayed_preemption; 67 int delayed_preemption;
68 68
69 /* locking overhead tracing: time stamp prior to system call */
70 uint64_t ts_syscall_start; /* Feather-Trace cycles */
71
69 /* to be extended */ 72 /* to be extended */
70}; 73};
71 74
diff --git a/include/litmus/trace.h b/include/litmus/trace.h
index 3f0743ec9063..5aba68f18893 100644
--- a/include/litmus/trace.h
+++ b/include/litmus/trace.h
@@ -29,6 +29,7 @@ feather_callback void save_timestamp_def(unsigned long event, unsigned long type
29feather_callback void save_timestamp_task(unsigned long event, unsigned long t_ptr); 29feather_callback void save_timestamp_task(unsigned long event, unsigned long t_ptr);
30feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu); 30feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu);
31feather_callback void save_task_latency(unsigned long event, unsigned long when_ptr); 31feather_callback void save_task_latency(unsigned long event, unsigned long when_ptr);
32feather_callback void save_timestamp_time(unsigned long event, unsigned long time_ptr);
32 33
33#define TIMESTAMP(id) ft_event0(id, save_timestamp) 34#define TIMESTAMP(id) ft_event0(id, save_timestamp)
34 35
@@ -43,6 +44,9 @@ feather_callback void save_task_latency(unsigned long event, unsigned long when_
43#define LTIMESTAMP(id, task) \ 44#define LTIMESTAMP(id, task) \
44 ft_event1(id, save_task_latency, (unsigned long) task) 45 ft_event1(id, save_task_latency, (unsigned long) task)
45 46
47#define TIMESTAMP_TIME(id, time_ptr) \
48 ft_event1(id, save_timestamp_time, (unsigned long) time_ptr)
49
46#else /* !CONFIG_SCHED_OVERHEAD_TRACE */ 50#else /* !CONFIG_SCHED_OVERHEAD_TRACE */
47 51
48#define TIMESTAMP(id) /* no tracing */ 52#define TIMESTAMP(id) /* no tracing */
@@ -55,6 +59,8 @@ feather_callback void save_task_latency(unsigned long event, unsigned long when_
55 59
56#define LTIMESTAMP(id, when_ptr) /* no tracing */ 60#define LTIMESTAMP(id, when_ptr) /* no tracing */
57 61
62#define TIMESTAMP_TIME(id, time_ptr) /* no tracing */
63
58#endif 64#endif
59 65
60 66
@@ -106,6 +112,13 @@ feather_callback void save_task_latency(unsigned long event, unsigned long when_
106#define TS_UNLOCK_START TIMESTAMP(180) 112#define TS_UNLOCK_START TIMESTAMP(180)
107#define TS_UNLOCK_END TIMESTAMP(181) 113#define TS_UNLOCK_END TIMESTAMP(181)
108 114
115#define TS_SYSCALL_IN_START(p) TIMESTAMP_TIME(190, p)
116#define TS_SYSCALL_IN_END TIMESTAMP(191)
117
118#define TS_SYSCALL_OUT_START TIMESTAMP(200)
119#define TS_SYSCALL_OUT_END TIMESTAMP(201)
120
121
109#define TS_SEND_RESCHED_START(c) CTIMESTAMP(190, c) 122#define TS_SEND_RESCHED_START(c) CTIMESTAMP(190, c)
110#define TS_SEND_RESCHED_END DTIMESTAMP(191, TSK_UNKNOWN) 123#define TS_SEND_RESCHED_END DTIMESTAMP(191, TSK_UNKNOWN)
111 124