diff options
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/trace.h | 4 | ||||
-rw-r--r-- | include/litmus/trace_irq.h | 21 |
2 files changed, 24 insertions, 1 deletions
diff --git a/include/litmus/trace.h b/include/litmus/trace.h index e2926a08c2f4..e809376d6487 100644 --- a/include/litmus/trace.h +++ b/include/litmus/trace.h | |||
@@ -20,7 +20,9 @@ struct timestamp { | |||
20 | uint32_t seq_no; | 20 | uint32_t seq_no; |
21 | uint8_t cpu; | 21 | uint8_t cpu; |
22 | uint8_t event; | 22 | uint8_t event; |
23 | uint8_t task_type; | 23 | uint8_t task_type:2; |
24 | uint8_t irq_flag:1; | ||
25 | uint8_t irq_count:5; | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | /* tracing callbacks */ | 28 | /* tracing callbacks */ |
diff --git a/include/litmus/trace_irq.h b/include/litmus/trace_irq.h new file mode 100644 index 000000000000..f18b127a089d --- /dev/null +++ b/include/litmus/trace_irq.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _LITMUS_TRACE_IRQ_H_ | ||
2 | #define _LITMUS_TRACE_IRQ_H_ | ||
3 | |||
4 | #ifdef CONFIG_SCHED_OVERHEAD_TRACE | ||
5 | |||
6 | extern DEFINE_PER_CPU(atomic_t, irq_fired_count); | ||
7 | |||
8 | static inline void ft_irq_fired(void) | ||
9 | { | ||
10 | /* Only called with preemptions disabled. */ | ||
11 | atomic_inc(&__get_cpu_var(irq_fired_count)); | ||
12 | } | ||
13 | |||
14 | |||
15 | #else | ||
16 | |||
17 | #define ft_irq_fired() /* nothing to do */ | ||
18 | |||
19 | #endif | ||
20 | |||
21 | #endif | ||