aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace_event.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/ftrace_event.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.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);