diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2012-01-24 03:36:12 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-01-30 14:07:08 -0500 |
commit | 83b11ea1c6ad113519c488853cf06e626c95a64d (patch) | |
tree | 79180eb8e7094014dced059873a741698e28090b /include/litmus/trace_irq.h | |
parent | 5bd89a34d89f252619d83fef3c9325e24311389e (diff) |
Feather-Trace: keep track of interrupt-related interference.2012.1
Increment a processor-local counter whenever an interrupt is handled.
This allows Feather-Trace to include a (truncated) counter and a flag
to report interference from interrupts. This could be used to filter
samples that were disturbed by interrupts.
Diffstat (limited to 'include/litmus/trace_irq.h')
-rw-r--r-- | include/litmus/trace_irq.h | 21 |
1 files changed, 21 insertions, 0 deletions
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 | ||