diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-17 21:26:50 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-17 21:26:50 -0500 |
commit | 10f45252adb78753aa50d25b148fc608e3b4c224 (patch) | |
tree | 08c8c75e25bf594a20b1aa15b1acd65d4715c04f /include | |
parent | f450dbd5414ff909283ca6fb48fc2c03cb244370 (diff) |
Add tracing support and hook up Litmus KConfig for x86
- fix requesting more than 2^11 pages (MAX_ORDER)
to system allocator
to be merged:
- feather-trace generic implementation
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/feather_trace.h | 14 | ||||
-rw-r--r-- | include/litmus/sched_trace.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/include/litmus/feather_trace.h b/include/litmus/feather_trace.h index 3ac1ee5e0277..eef8af7a414e 100644 --- a/include/litmus/feather_trace.h +++ b/include/litmus/feather_trace.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _FEATHER_TRACE_H_ | 1 | #ifndef _FEATHER_TRACE_H_ |
2 | #define _FEATHER_TRACE_H_ | 2 | #define _FEATHER_TRACE_H_ |
3 | 3 | ||
4 | #include <asm/feather_trace.h> | ||
4 | 5 | ||
5 | int ft_enable_event(unsigned long id); | 6 | int ft_enable_event(unsigned long id); |
6 | int ft_disable_event(unsigned long id); | 7 | int ft_disable_event(unsigned long id); |
@@ -30,6 +31,19 @@ extern int ft_events[MAX_EVENTS]; | |||
30 | 31 | ||
31 | #define ft_event3(id, callback, p, p2, p3) \ | 32 | #define ft_event3(id, callback, p, p2, p3) \ |
32 | if (ft_events[id]) callback(id, p, p2, p3); | 33 | if (ft_events[id]) callback(id, p, p2, p3); |
34 | |||
35 | #include <asm/atomic.h> | ||
36 | |||
37 | static inline int fetch_and_inc(int *val) | ||
38 | { | ||
39 | return atomic_add_return(1, (atomic_t*) val) - 1; | ||
40 | } | ||
41 | |||
42 | static inline int fetch_and_dec(int *val) | ||
43 | { | ||
44 | return atomic_sub_return(1, (atomic_t*) val) + 1; | ||
45 | } | ||
46 | |||
33 | #endif | 47 | #endif |
34 | 48 | ||
35 | 49 | ||
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h index afd0391d127b..aae6ac27fe1b 100644 --- a/include/litmus/sched_trace.h +++ b/include/litmus/sched_trace.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* sched_trace.h -- record scheduler events to a byte stream for offline analysis. | 1 | /* |
2 | * sched_trace.h -- record scheduler events to a byte stream for offline analysis. | ||
2 | */ | 3 | */ |
3 | #ifndef _LINUX_SCHED_TRACE_H_ | 4 | #ifndef _LINUX_SCHED_TRACE_H_ |
4 | #define _LINUX_SCHED_TRACE_H_ | 5 | #define _LINUX_SCHED_TRACE_H_ |