diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-15 07:34:27 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-10-18 16:14:02 -0400 |
commit | 80e2d84533265a8231534f10c56d9eba01cec99a (patch) | |
tree | b980aed88b8cfa79ab6d271b93fb51093694f855 /include/litmus | |
parent | 5454446ed47708b26d40337e47affea5e1f298ef (diff) |
Feather-Trace: add support for locking-related syscall overheads
Support recording timestamps that allow tracing the entry and exit
costs of locking-related system calls.
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/litmus.h | 16 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index 807b7888695a..f7893ef18162 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
@@ -259,4 +259,20 @@ static inline quanta_t time2quanta(lt_t time, enum round round) | |||
259 | /* By how much is cpu staggered behind CPU 0? */ | 259 | /* By how much is cpu staggered behind CPU 0? */ |
260 | u64 cpu_stagger_offset(int cpu); | 260 | u64 cpu_stagger_offset(int cpu); |
261 | 261 | ||
262 | static inline struct control_page* get_control_page(struct task_struct *t) | ||
263 | { | ||
264 | return tsk_rt(t)->ctrl_page; | ||
265 | } | ||
266 | |||
267 | static inline int has_control_page(struct task_struct* t) | ||
268 | { | ||
269 | return tsk_rt(t)->ctrl_page != NULL; | ||
270 | } | ||
271 | |||
272 | |||
273 | #define TS_SYSCALL_IN_START \ | ||
274 | if (has_control_page(current)) { \ | ||
275 | __TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); \ | ||
276 | } | ||
277 | |||
262 | #endif | 278 | #endif |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index fac939dbd33a..6456ed04fddb 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -89,8 +89,14 @@ union np_flag { | |||
89 | * determining preemption/migration overheads). | 89 | * determining preemption/migration overheads). |
90 | */ | 90 | */ |
91 | struct control_page { | 91 | struct control_page { |
92 | /* This flag is used by userspace to communicate non-preempive | ||
93 | * sections. */ | ||
92 | volatile union np_flag sched; | 94 | volatile union np_flag sched; |
93 | 95 | ||
96 | /* Locking overhead tracing: userspace records here the time stamp | ||
97 | * prior to starting the system call. */ | ||
98 | uint64_t ts_syscall_start; /* Feather-Trace cycles */ | ||
99 | |||
94 | /* to be extended */ | 100 | /* to be extended */ |
95 | }; | 101 | }; |
96 | 102 | ||