aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace_event.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 09:43:54 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 10:06:11 -0400
commit7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch)
tree5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/linux/ftrace_event.h
parent7d754596756240fa918b94cd0c3011c77a638987 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
Merge 'Linux v3.0' into Litmus
Some notes: * Litmus^RT scheduling class is the topmost scheduling class (above stop_sched_class). * scheduler_ipi() function (e.g., in smp_reschedule_interrupt()) may increase IPI latencies. * Added path into schedule() to quickly re-evaluate scheduling decision without becoming preemptive again. This used to be a standard path before the removal of BKL. Conflicts: Makefile arch/arm/kernel/calls.S arch/arm/kernel/smp.c arch/x86/include/asm/unistd_32.h arch/x86/kernel/smp.c arch/x86/kernel/syscall_table_32.S include/linux/hrtimer.h kernel/printk.c kernel/sched.c kernel/sched_fair.c
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r--include/linux/ftrace_event.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 02b8b24f8f51..59d3ef100eb9 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -16,6 +16,11 @@ struct trace_print_flags {
16 const char *name; 16 const char *name;
17}; 17};
18 18
19struct trace_print_flags_u64 {
20 unsigned long long mask;
21 const char *name;
22};
23
19const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim, 24const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
20 unsigned long flags, 25 unsigned long flags,
21 const struct trace_print_flags *flag_array); 26 const struct trace_print_flags *flag_array);
@@ -23,6 +28,13 @@ const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
23const char *ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, 28const char *ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
24 const struct trace_print_flags *symbol_array); 29 const struct trace_print_flags *symbol_array);
25 30
31#if BITS_PER_LONG == 32
32const char *ftrace_print_symbols_seq_u64(struct trace_seq *p,
33 unsigned long long val,
34 const struct trace_print_flags_u64
35 *symbol_array);
36#endif
37
26const char *ftrace_print_hex_seq(struct trace_seq *p, 38const char *ftrace_print_hex_seq(struct trace_seq *p,
27 const unsigned char *buf, int len); 39 const unsigned char *buf, int len);
28 40
@@ -37,7 +49,7 @@ struct trace_entry {
37 unsigned char flags; 49 unsigned char flags;
38 unsigned char preempt_count; 50 unsigned char preempt_count;
39 int pid; 51 int pid;
40 int lock_depth; 52 int padding;
41}; 53};
42 54
43#define FTRACE_MAX_EVENT \ 55#define FTRACE_MAX_EVENT \
@@ -154,12 +166,14 @@ enum {
154 TRACE_EVENT_FL_ENABLED_BIT, 166 TRACE_EVENT_FL_ENABLED_BIT,
155 TRACE_EVENT_FL_FILTERED_BIT, 167 TRACE_EVENT_FL_FILTERED_BIT,
156 TRACE_EVENT_FL_RECORDED_CMD_BIT, 168 TRACE_EVENT_FL_RECORDED_CMD_BIT,
169 TRACE_EVENT_FL_CAP_ANY_BIT,
157}; 170};
158 171
159enum { 172enum {
160 TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), 173 TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
161 TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), 174 TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
162 TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), 175 TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT),
176 TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT),
163}; 177};
164 178
165struct ftrace_event_call { 179struct ftrace_event_call {
@@ -191,14 +205,21 @@ struct ftrace_event_call {
191 unsigned int flags; 205 unsigned int flags;
192 206
193#ifdef CONFIG_PERF_EVENTS 207#ifdef CONFIG_PERF_EVENTS
194 int perf_refcount; 208 int perf_refcount;
195 struct hlist_head *perf_events; 209 struct hlist_head __percpu *perf_events;
196#endif 210#endif
197}; 211};
198 212
213#define __TRACE_EVENT_FLAGS(name, value) \
214 static int __init trace_init_flags_##name(void) \
215 { \
216 event_##name.flags = value; \
217 return 0; \
218 } \
219 early_initcall(trace_init_flags_##name);
220
199#define PERF_MAX_TRACE_SIZE 2048 221#define PERF_MAX_TRACE_SIZE 2048
200 222
201#define MAX_FILTER_PRED 32
202#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ 223#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
203 224
204extern void destroy_preds(struct ftrace_event_call *call); 225extern void destroy_preds(struct ftrace_event_call *call);
@@ -215,6 +236,10 @@ enum {
215 FILTER_PTR_STRING, 236 FILTER_PTR_STRING,
216}; 237};
217 238
239#define EVENT_STORAGE_SIZE 128
240extern struct mutex event_storage_mutex;
241extern char event_storage[EVENT_STORAGE_SIZE];
242
218extern int trace_event_raw_init(struct ftrace_event_call *call); 243extern int trace_event_raw_init(struct ftrace_event_call *call);
219extern int trace_define_field(struct ftrace_event_call *call, const char *type, 244extern int trace_define_field(struct ftrace_event_call *call, const char *type,
220 const char *name, int offset, int size, 245 const char *name, int offset, int size,
@@ -252,8 +277,8 @@ DECLARE_PER_CPU(struct pt_regs, perf_trace_regs);
252 277
253extern int perf_trace_init(struct perf_event *event); 278extern int perf_trace_init(struct perf_event *event);
254extern void perf_trace_destroy(struct perf_event *event); 279extern void perf_trace_destroy(struct perf_event *event);
255extern int perf_trace_enable(struct perf_event *event); 280extern int perf_trace_add(struct perf_event *event, int flags);
256extern void perf_trace_disable(struct perf_event *event); 281extern void perf_trace_del(struct perf_event *event, int flags);
257extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, 282extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
258 char *filter_str); 283 char *filter_str);
259extern void ftrace_profile_free_filter(struct perf_event *event); 284extern void ftrace_profile_free_filter(struct perf_event *event);