summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-05-05 10:09:53 -0400
committerSteven Rostedt <rostedt@goodmis.org>2015-05-13 14:05:16 -0400
commit7f1d2f8210195c8c309d424a77dbf06a6d2186f4 (patch)
treebbe67b455947322f4f43d082c23a096a40d18824
parent9023c930902fbbcf0cebf6110828700f792989a4 (diff)
tracing: Rename ftrace_event_file to trace_event_file
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structure ftrace_event_file is really about trace events and not "ftrace". Rename it to trace_event_file. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--include/linux/trace_events.h24
-rw-r--r--include/trace/perf.h24
-rw-r--r--kernel/trace/trace.c8
-rw-r--r--kernel/trace/trace.h24
-rw-r--r--kernel/trace/trace_events.c92
-rw-r--r--kernel/trace/trace_events_filter.c30
-rw-r--r--kernel/trace/trace_events_trigger.c52
-rw-r--r--kernel/trace/trace_kprobe.c32
-rw-r--r--kernel/trace/trace_probe.h4
-rw-r--r--kernel/trace/trace_syscalls.c32
-rw-r--r--kernel/trace/trace_uprobe.c16
11 files changed, 169 insertions, 169 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 99924c07a042..ae19233c7dd8 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -157,11 +157,11 @@ static inline enum print_line_t trace_handle_return(struct trace_seq *s)
157void tracing_generic_entry_update(struct trace_entry *entry, 157void tracing_generic_entry_update(struct trace_entry *entry,
158 unsigned long flags, 158 unsigned long flags,
159 int pc); 159 int pc);
160struct ftrace_event_file; 160struct trace_event_file;
161 161
162struct ring_buffer_event * 162struct ring_buffer_event *
163trace_event_buffer_lock_reserve(struct ring_buffer **current_buffer, 163trace_event_buffer_lock_reserve(struct ring_buffer **current_buffer,
164 struct ftrace_event_file *ftrace_file, 164 struct trace_event_file *trace_file,
165 int type, unsigned long len, 165 int type, unsigned long len,
166 unsigned long flags, int pc); 166 unsigned long flags, int pc);
167struct ring_buffer_event * 167struct ring_buffer_event *
@@ -222,14 +222,14 @@ extern int trace_event_reg(struct ftrace_event_call *event,
222struct ftrace_event_buffer { 222struct ftrace_event_buffer {
223 struct ring_buffer *buffer; 223 struct ring_buffer *buffer;
224 struct ring_buffer_event *event; 224 struct ring_buffer_event *event;
225 struct ftrace_event_file *ftrace_file; 225 struct trace_event_file *trace_file;
226 void *entry; 226 void *entry;
227 unsigned long flags; 227 unsigned long flags;
228 int pc; 228 int pc;
229}; 229};
230 230
231void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, 231void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
232 struct ftrace_event_file *ftrace_file, 232 struct trace_event_file *trace_file,
233 unsigned long len); 233 unsigned long len);
234 234
235void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer); 235void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer);
@@ -349,7 +349,7 @@ enum {
349 FTRACE_EVENT_FL_TRIGGER_COND = (1 << FTRACE_EVENT_FL_TRIGGER_COND_BIT), 349 FTRACE_EVENT_FL_TRIGGER_COND = (1 << FTRACE_EVENT_FL_TRIGGER_COND_BIT),
350}; 350};
351 351
352struct ftrace_event_file { 352struct trace_event_file {
353 struct list_head list; 353 struct list_head list;
354 struct ftrace_event_call *event_call; 354 struct ftrace_event_call *event_call;
355 struct event_filter *filter; 355 struct event_filter *filter;
@@ -414,15 +414,15 @@ enum event_trigger_type {
414 414
415extern int filter_match_preds(struct event_filter *filter, void *rec); 415extern int filter_match_preds(struct event_filter *filter, void *rec);
416 416
417extern int filter_check_discard(struct ftrace_event_file *file, void *rec, 417extern int filter_check_discard(struct trace_event_file *file, void *rec,
418 struct ring_buffer *buffer, 418 struct ring_buffer *buffer,
419 struct ring_buffer_event *event); 419 struct ring_buffer_event *event);
420extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec, 420extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec,
421 struct ring_buffer *buffer, 421 struct ring_buffer *buffer,
422 struct ring_buffer_event *event); 422 struct ring_buffer_event *event);
423extern enum event_trigger_type event_triggers_call(struct ftrace_event_file *file, 423extern enum event_trigger_type event_triggers_call(struct trace_event_file *file,
424 void *rec); 424 void *rec);
425extern void event_triggers_post_call(struct ftrace_event_file *file, 425extern void event_triggers_post_call(struct trace_event_file *file,
426 enum event_trigger_type tt); 426 enum event_trigger_type tt);
427 427
428/** 428/**
@@ -435,7 +435,7 @@ extern void event_triggers_post_call(struct ftrace_event_file *file,
435 * otherwise false. 435 * otherwise false.
436 */ 436 */
437static inline bool 437static inline bool
438ftrace_trigger_soft_disabled(struct ftrace_event_file *file) 438ftrace_trigger_soft_disabled(struct trace_event_file *file)
439{ 439{
440 unsigned long eflags = file->flags; 440 unsigned long eflags = file->flags;
441 441
@@ -462,7 +462,7 @@ ftrace_trigger_soft_disabled(struct ftrace_event_file *file)
462 * Returns true if the event is discarded, false otherwise. 462 * Returns true if the event is discarded, false otherwise.
463 */ 463 */
464static inline bool 464static inline bool
465__event_trigger_test_discard(struct ftrace_event_file *file, 465__event_trigger_test_discard(struct trace_event_file *file,
466 struct ring_buffer *buffer, 466 struct ring_buffer *buffer,
467 struct ring_buffer_event *event, 467 struct ring_buffer_event *event,
468 void *entry, 468 void *entry,
@@ -495,7 +495,7 @@ __event_trigger_test_discard(struct ftrace_event_file *file,
495 * if the event is soft disabled and should be discarded. 495 * if the event is soft disabled and should be discarded.
496 */ 496 */
497static inline void 497static inline void
498event_trigger_unlock_commit(struct ftrace_event_file *file, 498event_trigger_unlock_commit(struct trace_event_file *file,
499 struct ring_buffer *buffer, 499 struct ring_buffer *buffer,
500 struct ring_buffer_event *event, 500 struct ring_buffer_event *event,
501 void *entry, unsigned long irq_flags, int pc) 501 void *entry, unsigned long irq_flags, int pc)
@@ -526,7 +526,7 @@ event_trigger_unlock_commit(struct ftrace_event_file *file,
526 * trace_buffer_unlock_commit_regs() instead of trace_buffer_unlock_commit(). 526 * trace_buffer_unlock_commit_regs() instead of trace_buffer_unlock_commit().
527 */ 527 */
528static inline void 528static inline void
529event_trigger_unlock_commit_regs(struct ftrace_event_file *file, 529event_trigger_unlock_commit_regs(struct trace_event_file *file,
530 struct ring_buffer *buffer, 530 struct ring_buffer *buffer,
531 struct ring_buffer_event *event, 531 struct ring_buffer_event *event,
532 void *entry, unsigned long irq_flags, int pc, 532 void *entry, unsigned long irq_flags, int pc,
diff --git a/include/trace/perf.h b/include/trace/perf.h
index bb751a5975dd..ccc5cc1381e4 100644
--- a/include/trace/perf.h
+++ b/include/trace/perf.h
@@ -9,10 +9,10 @@
9 * 9 *
10 * static void ftrace_raw_event_<call>(void *__data, proto) 10 * static void ftrace_raw_event_<call>(void *__data, proto)
11 * { 11 * {
12 * struct ftrace_event_file *ftrace_file = __data; 12 * struct trace_event_file *trace_file = __data;
13 * struct ftrace_event_call *event_call = ftrace_file->event_call; 13 * struct ftrace_event_call *event_call = trace_file->event_call;
14 * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; 14 * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
15 * unsigned long eflags = ftrace_file->flags; 15 * unsigned long eflags = trace_file->flags;
16 * enum event_trigger_type __tt = ETT_NONE; 16 * enum event_trigger_type __tt = ETT_NONE;
17 * struct ring_buffer_event *event; 17 * struct ring_buffer_event *event;
18 * struct ftrace_raw_<call> *entry; <-- defined in stage 1 18 * struct ftrace_raw_<call> *entry; <-- defined in stage 1
@@ -23,7 +23,7 @@
23 * 23 *
24 * if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) { 24 * if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
25 * if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE) 25 * if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
26 * event_triggers_call(ftrace_file, NULL); 26 * event_triggers_call(trace_file, NULL);
27 * if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED) 27 * if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
28 * return; 28 * return;
29 * } 29 * }
@@ -33,7 +33,7 @@
33 * 33 *
34 * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); 34 * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args);
35 * 35 *
36 * event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, 36 * event = trace_event_buffer_lock_reserve(&buffer, trace_file,
37 * event_<call>->event.type, 37 * event_<call>->event.type,
38 * sizeof(*entry) + __data_size, 38 * sizeof(*entry) + __data_size,
39 * irq_flags, pc); 39 * irq_flags, pc);
@@ -45,16 +45,16 @@
45 * __array macros. 45 * __array macros.
46 * 46 *
47 * if (eflags & FTRACE_EVENT_FL_TRIGGER_COND) 47 * if (eflags & FTRACE_EVENT_FL_TRIGGER_COND)
48 * __tt = event_triggers_call(ftrace_file, entry); 48 * __tt = event_triggers_call(trace_file, entry);
49 * 49 *
50 * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, 50 * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
51 * &ftrace_file->flags)) 51 * &trace_file->flags))
52 * ring_buffer_discard_commit(buffer, event); 52 * ring_buffer_discard_commit(buffer, event);
53 * else if (!filter_check_discard(ftrace_file, entry, buffer, event)) 53 * else if (!filter_check_discard(trace_file, entry, buffer, event))
54 * trace_buffer_unlock_commit(buffer, event, irq_flags, pc); 54 * trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
55 * 55 *
56 * if (__tt) 56 * if (__tt)
57 * event_triggers_post_call(ftrace_file, __tt); 57 * event_triggers_post_call(trace_file, __tt);
58 * } 58 * }
59 * 59 *
60 * static struct trace_event ftrace_event_type_<call> = { 60 * static struct trace_event ftrace_event_type_<call> = {
@@ -153,18 +153,18 @@
153static notrace void \ 153static notrace void \
154ftrace_raw_event_##call(void *__data, proto) \ 154ftrace_raw_event_##call(void *__data, proto) \
155{ \ 155{ \
156 struct ftrace_event_file *ftrace_file = __data; \ 156 struct trace_event_file *trace_file = __data; \
157 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 157 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
158 struct ftrace_event_buffer fbuffer; \ 158 struct ftrace_event_buffer fbuffer; \
159 struct ftrace_raw_##call *entry; \ 159 struct ftrace_raw_##call *entry; \
160 int __data_size; \ 160 int __data_size; \
161 \ 161 \
162 if (ftrace_trigger_soft_disabled(ftrace_file)) \ 162 if (ftrace_trigger_soft_disabled(trace_file)) \
163 return; \ 163 return; \
164 \ 164 \
165 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ 165 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
166 \ 166 \
167 entry = ftrace_event_buffer_reserve(&fbuffer, ftrace_file, \ 167 entry = ftrace_event_buffer_reserve(&fbuffer, trace_file, \
168 sizeof(*entry) + __data_size); \ 168 sizeof(*entry) + __data_size); \
169 \ 169 \
170 if (!entry) \ 170 if (!entry) \
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 458031c31a37..dd29e9b6b30e 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -297,7 +297,7 @@ void trace_array_put(struct trace_array *this_tr)
297 mutex_unlock(&trace_types_lock); 297 mutex_unlock(&trace_types_lock);
298} 298}
299 299
300int filter_check_discard(struct ftrace_event_file *file, void *rec, 300int filter_check_discard(struct trace_event_file *file, void *rec,
301 struct ring_buffer *buffer, 301 struct ring_buffer *buffer,
302 struct ring_buffer_event *event) 302 struct ring_buffer_event *event)
303{ 303{
@@ -1694,13 +1694,13 @@ static struct ring_buffer *temp_buffer;
1694 1694
1695struct ring_buffer_event * 1695struct ring_buffer_event *
1696trace_event_buffer_lock_reserve(struct ring_buffer **current_rb, 1696trace_event_buffer_lock_reserve(struct ring_buffer **current_rb,
1697 struct ftrace_event_file *ftrace_file, 1697 struct trace_event_file *trace_file,
1698 int type, unsigned long len, 1698 int type, unsigned long len,
1699 unsigned long flags, int pc) 1699 unsigned long flags, int pc)
1700{ 1700{
1701 struct ring_buffer_event *entry; 1701 struct ring_buffer_event *entry;
1702 1702
1703 *current_rb = ftrace_file->tr->trace_buffer.buffer; 1703 *current_rb = trace_file->tr->trace_buffer.buffer;
1704 entry = trace_buffer_lock_reserve(*current_rb, 1704 entry = trace_buffer_lock_reserve(*current_rb,
1705 type, len, flags, pc); 1705 type, len, flags, pc);
1706 /* 1706 /*
@@ -1709,7 +1709,7 @@ trace_event_buffer_lock_reserve(struct ring_buffer **current_rb,
1709 * to store the trace event for the tigger to use. It's recusive 1709 * to store the trace event for the tigger to use. It's recusive
1710 * safe and will not be recorded anywhere. 1710 * safe and will not be recorded anywhere.
1711 */ 1711 */
1712 if (!entry && ftrace_file->flags & FTRACE_EVENT_FL_TRIGGER_COND) { 1712 if (!entry && trace_file->flags & FTRACE_EVENT_FL_TRIGGER_COND) {
1713 *current_rb = temp_buffer; 1713 *current_rb = temp_buffer;
1714 entry = trace_buffer_lock_reserve(*current_rb, 1714 entry = trace_buffer_lock_reserve(*current_rb,
1715 type, len, flags, pc); 1715 type, len, flags, pc);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index c09ecfed57db..4e1715e55b38 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -211,8 +211,8 @@ struct trace_array {
211#ifdef CONFIG_FTRACE_SYSCALLS 211#ifdef CONFIG_FTRACE_SYSCALLS
212 int sys_refcount_enter; 212 int sys_refcount_enter;
213 int sys_refcount_exit; 213 int sys_refcount_exit;
214 struct ftrace_event_file __rcu *enter_syscall_files[NR_syscalls]; 214 struct trace_event_file __rcu *enter_syscall_files[NR_syscalls];
215 struct ftrace_event_file __rcu *exit_syscall_files[NR_syscalls]; 215 struct trace_event_file __rcu *exit_syscall_files[NR_syscalls];
216#endif 216#endif
217 int stop_count; 217 int stop_count;
218 int clock_id; 218 int clock_id;
@@ -1052,9 +1052,9 @@ struct filter_pred {
1052 1052
1053extern enum regex_type 1053extern enum regex_type
1054filter_parse_regex(char *buff, int len, char **search, int *not); 1054filter_parse_regex(char *buff, int len, char **search, int *not);
1055extern void print_event_filter(struct ftrace_event_file *file, 1055extern void print_event_filter(struct trace_event_file *file,
1056 struct trace_seq *s); 1056 struct trace_seq *s);
1057extern int apply_event_filter(struct ftrace_event_file *file, 1057extern int apply_event_filter(struct trace_event_file *file,
1058 char *filter_string); 1058 char *filter_string);
1059extern int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir, 1059extern int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir,
1060 char *filter_string); 1060 char *filter_string);
@@ -1073,9 +1073,9 @@ extern void trace_event_enable_cmd_record(bool enable);
1073extern int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr); 1073extern int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr);
1074extern int event_trace_del_tracer(struct trace_array *tr); 1074extern int event_trace_del_tracer(struct trace_array *tr);
1075 1075
1076extern struct ftrace_event_file *find_event_file(struct trace_array *tr, 1076extern struct trace_event_file *find_event_file(struct trace_array *tr,
1077 const char *system, 1077 const char *system,
1078 const char *event); 1078 const char *event);
1079 1079
1080static inline void *event_file_data(struct file *filp) 1080static inline void *event_file_data(struct file *filp)
1081{ 1081{
@@ -1242,23 +1242,23 @@ struct event_command {
1242 enum event_trigger_type trigger_type; 1242 enum event_trigger_type trigger_type;
1243 bool post_trigger; 1243 bool post_trigger;
1244 int (*func)(struct event_command *cmd_ops, 1244 int (*func)(struct event_command *cmd_ops,
1245 struct ftrace_event_file *file, 1245 struct trace_event_file *file,
1246 char *glob, char *cmd, char *params); 1246 char *glob, char *cmd, char *params);
1247 int (*reg)(char *glob, 1247 int (*reg)(char *glob,
1248 struct event_trigger_ops *ops, 1248 struct event_trigger_ops *ops,
1249 struct event_trigger_data *data, 1249 struct event_trigger_data *data,
1250 struct ftrace_event_file *file); 1250 struct trace_event_file *file);
1251 void (*unreg)(char *glob, 1251 void (*unreg)(char *glob,
1252 struct event_trigger_ops *ops, 1252 struct event_trigger_ops *ops,
1253 struct event_trigger_data *data, 1253 struct event_trigger_data *data,
1254 struct ftrace_event_file *file); 1254 struct trace_event_file *file);
1255 int (*set_filter)(char *filter_str, 1255 int (*set_filter)(char *filter_str,
1256 struct event_trigger_data *data, 1256 struct event_trigger_data *data,
1257 struct ftrace_event_file *file); 1257 struct trace_event_file *file);
1258 struct event_trigger_ops *(*get_trigger_ops)(char *cmd, char *param); 1258 struct event_trigger_ops *(*get_trigger_ops)(char *cmd, char *param);
1259}; 1259};
1260 1260
1261extern int trace_event_enable_disable(struct ftrace_event_file *file, 1261extern int trace_event_enable_disable(struct trace_event_file *file,
1262 int enable, int soft_disable); 1262 int enable, int soft_disable);
1263extern int tracing_alloc_snapshot(void); 1263extern int tracing_alloc_snapshot(void);
1264 1264
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 5fbb06c6c3ec..4a7cc4630ced 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -61,7 +61,7 @@ static int system_refcount_dec(struct event_subsystem *system)
61 61
62#define do_for_each_event_file_safe(tr, file) \ 62#define do_for_each_event_file_safe(tr, file) \
63 list_for_each_entry(tr, &ftrace_trace_arrays, list) { \ 63 list_for_each_entry(tr, &ftrace_trace_arrays, list) { \
64 struct ftrace_event_file *___n; \ 64 struct trace_event_file *___n; \
65 list_for_each_entry_safe(file, ___n, &tr->events, list) 65 list_for_each_entry_safe(file, ___n, &tr->events, list)
66 66
67#define while_for_each_event_file() \ 67#define while_for_each_event_file() \
@@ -191,17 +191,17 @@ int trace_event_raw_init(struct ftrace_event_call *call)
191EXPORT_SYMBOL_GPL(trace_event_raw_init); 191EXPORT_SYMBOL_GPL(trace_event_raw_init);
192 192
193void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, 193void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
194 struct ftrace_event_file *ftrace_file, 194 struct trace_event_file *trace_file,
195 unsigned long len) 195 unsigned long len)
196{ 196{
197 struct ftrace_event_call *event_call = ftrace_file->event_call; 197 struct ftrace_event_call *event_call = trace_file->event_call;
198 198
199 local_save_flags(fbuffer->flags); 199 local_save_flags(fbuffer->flags);
200 fbuffer->pc = preempt_count(); 200 fbuffer->pc = preempt_count();
201 fbuffer->ftrace_file = ftrace_file; 201 fbuffer->trace_file = trace_file;
202 202
203 fbuffer->event = 203 fbuffer->event =
204 trace_event_buffer_lock_reserve(&fbuffer->buffer, ftrace_file, 204 trace_event_buffer_lock_reserve(&fbuffer->buffer, trace_file,
205 event_call->event.type, len, 205 event_call->event.type, len,
206 fbuffer->flags, fbuffer->pc); 206 fbuffer->flags, fbuffer->pc);
207 if (!fbuffer->event) 207 if (!fbuffer->event)
@@ -224,12 +224,12 @@ static void output_printk(struct ftrace_event_buffer *fbuffer)
224 if (!iter) 224 if (!iter)
225 return; 225 return;
226 226
227 event_call = fbuffer->ftrace_file->event_call; 227 event_call = fbuffer->trace_file->event_call;
228 if (!event_call || !event_call->event.funcs || 228 if (!event_call || !event_call->event.funcs ||
229 !event_call->event.funcs->trace) 229 !event_call->event.funcs->trace)
230 return; 230 return;
231 231
232 event = &fbuffer->ftrace_file->event_call->event; 232 event = &fbuffer->trace_file->event_call->event;
233 233
234 spin_lock_irqsave(&tracepoint_iter_lock, flags); 234 spin_lock_irqsave(&tracepoint_iter_lock, flags);
235 trace_seq_init(&iter->seq); 235 trace_seq_init(&iter->seq);
@@ -246,7 +246,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
246 if (tracepoint_printk) 246 if (tracepoint_printk)
247 output_printk(fbuffer); 247 output_printk(fbuffer);
248 248
249 event_trigger_unlock_commit(fbuffer->ftrace_file, fbuffer->buffer, 249 event_trigger_unlock_commit(fbuffer->trace_file, fbuffer->buffer,
250 fbuffer->event, fbuffer->entry, 250 fbuffer->event, fbuffer->entry,
251 fbuffer->flags, fbuffer->pc); 251 fbuffer->flags, fbuffer->pc);
252} 252}
@@ -255,7 +255,7 @@ EXPORT_SYMBOL_GPL(ftrace_event_buffer_commit);
255int trace_event_reg(struct ftrace_event_call *call, 255int trace_event_reg(struct ftrace_event_call *call,
256 enum trace_reg type, void *data) 256 enum trace_reg type, void *data)
257{ 257{
258 struct ftrace_event_file *file = data; 258 struct trace_event_file *file = data;
259 259
260 WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT)); 260 WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT));
261 switch (type) { 261 switch (type) {
@@ -292,7 +292,7 @@ EXPORT_SYMBOL_GPL(trace_event_reg);
292 292
293void trace_event_enable_cmd_record(bool enable) 293void trace_event_enable_cmd_record(bool enable)
294{ 294{
295 struct ftrace_event_file *file; 295 struct trace_event_file *file;
296 struct trace_array *tr; 296 struct trace_array *tr;
297 297
298 mutex_lock(&event_mutex); 298 mutex_lock(&event_mutex);
@@ -312,7 +312,7 @@ void trace_event_enable_cmd_record(bool enable)
312 mutex_unlock(&event_mutex); 312 mutex_unlock(&event_mutex);
313} 313}
314 314
315static int __ftrace_event_enable_disable(struct ftrace_event_file *file, 315static int __ftrace_event_enable_disable(struct trace_event_file *file,
316 int enable, int soft_disable) 316 int enable, int soft_disable)
317{ 317{
318 struct ftrace_event_call *call = file->event_call; 318 struct ftrace_event_call *call = file->event_call;
@@ -401,13 +401,13 @@ static int __ftrace_event_enable_disable(struct ftrace_event_file *file,
401 return ret; 401 return ret;
402} 402}
403 403
404int trace_event_enable_disable(struct ftrace_event_file *file, 404int trace_event_enable_disable(struct trace_event_file *file,
405 int enable, int soft_disable) 405 int enable, int soft_disable)
406{ 406{
407 return __ftrace_event_enable_disable(file, enable, soft_disable); 407 return __ftrace_event_enable_disable(file, enable, soft_disable);
408} 408}
409 409
410static int ftrace_event_enable_disable(struct ftrace_event_file *file, 410static int ftrace_event_enable_disable(struct trace_event_file *file,
411 int enable) 411 int enable)
412{ 412{
413 return __ftrace_event_enable_disable(file, enable, 0); 413 return __ftrace_event_enable_disable(file, enable, 0);
@@ -415,7 +415,7 @@ static int ftrace_event_enable_disable(struct ftrace_event_file *file,
415 415
416static void ftrace_clear_events(struct trace_array *tr) 416static void ftrace_clear_events(struct trace_array *tr)
417{ 417{
418 struct ftrace_event_file *file; 418 struct trace_event_file *file;
419 419
420 mutex_lock(&event_mutex); 420 mutex_lock(&event_mutex);
421 list_for_each_entry(file, &tr->events, list) { 421 list_for_each_entry(file, &tr->events, list) {
@@ -486,7 +486,7 @@ static void remove_subsystem(struct ftrace_subsystem_dir *dir)
486 } 486 }
487} 487}
488 488
489static void remove_event_file_dir(struct ftrace_event_file *file) 489static void remove_event_file_dir(struct trace_event_file *file)
490{ 490{
491 struct dentry *dir = file->dir; 491 struct dentry *dir = file->dir;
492 struct dentry *child; 492 struct dentry *child;
@@ -515,7 +515,7 @@ static int
515__ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match, 515__ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match,
516 const char *sub, const char *event, int set) 516 const char *sub, const char *event, int set)
517{ 517{
518 struct ftrace_event_file *file; 518 struct trace_event_file *file;
519 struct ftrace_event_call *call; 519 struct ftrace_event_call *call;
520 const char *name; 520 const char *name;
521 int ret = -EINVAL; 521 int ret = -EINVAL;
@@ -671,7 +671,7 @@ ftrace_event_write(struct file *file, const char __user *ubuf,
671static void * 671static void *
672t_next(struct seq_file *m, void *v, loff_t *pos) 672t_next(struct seq_file *m, void *v, loff_t *pos)
673{ 673{
674 struct ftrace_event_file *file = v; 674 struct trace_event_file *file = v;
675 struct ftrace_event_call *call; 675 struct ftrace_event_call *call;
676 struct trace_array *tr = m->private; 676 struct trace_array *tr = m->private;
677 677
@@ -692,13 +692,13 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
692 692
693static void *t_start(struct seq_file *m, loff_t *pos) 693static void *t_start(struct seq_file *m, loff_t *pos)
694{ 694{
695 struct ftrace_event_file *file; 695 struct trace_event_file *file;
696 struct trace_array *tr = m->private; 696 struct trace_array *tr = m->private;
697 loff_t l; 697 loff_t l;
698 698
699 mutex_lock(&event_mutex); 699 mutex_lock(&event_mutex);
700 700
701 file = list_entry(&tr->events, struct ftrace_event_file, list); 701 file = list_entry(&tr->events, struct trace_event_file, list);
702 for (l = 0; l <= *pos; ) { 702 for (l = 0; l <= *pos; ) {
703 file = t_next(m, file, &l); 703 file = t_next(m, file, &l);
704 if (!file) 704 if (!file)
@@ -710,7 +710,7 @@ static void *t_start(struct seq_file *m, loff_t *pos)
710static void * 710static void *
711s_next(struct seq_file *m, void *v, loff_t *pos) 711s_next(struct seq_file *m, void *v, loff_t *pos)
712{ 712{
713 struct ftrace_event_file *file = v; 713 struct trace_event_file *file = v;
714 struct trace_array *tr = m->private; 714 struct trace_array *tr = m->private;
715 715
716 (*pos)++; 716 (*pos)++;
@@ -725,13 +725,13 @@ s_next(struct seq_file *m, void *v, loff_t *pos)
725 725
726static void *s_start(struct seq_file *m, loff_t *pos) 726static void *s_start(struct seq_file *m, loff_t *pos)
727{ 727{
728 struct ftrace_event_file *file; 728 struct trace_event_file *file;
729 struct trace_array *tr = m->private; 729 struct trace_array *tr = m->private;
730 loff_t l; 730 loff_t l;
731 731
732 mutex_lock(&event_mutex); 732 mutex_lock(&event_mutex);
733 733
734 file = list_entry(&tr->events, struct ftrace_event_file, list); 734 file = list_entry(&tr->events, struct trace_event_file, list);
735 for (l = 0; l <= *pos; ) { 735 for (l = 0; l <= *pos; ) {
736 file = s_next(m, file, &l); 736 file = s_next(m, file, &l);
737 if (!file) 737 if (!file)
@@ -742,7 +742,7 @@ static void *s_start(struct seq_file *m, loff_t *pos)
742 742
743static int t_show(struct seq_file *m, void *v) 743static int t_show(struct seq_file *m, void *v)
744{ 744{
745 struct ftrace_event_file *file = v; 745 struct trace_event_file *file = v;
746 struct ftrace_event_call *call = file->event_call; 746 struct ftrace_event_call *call = file->event_call;
747 747
748 if (strcmp(call->class->system, TRACE_SYSTEM) != 0) 748 if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
@@ -761,7 +761,7 @@ static ssize_t
761event_enable_read(struct file *filp, char __user *ubuf, size_t cnt, 761event_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
762 loff_t *ppos) 762 loff_t *ppos)
763{ 763{
764 struct ftrace_event_file *file; 764 struct trace_event_file *file;
765 unsigned long flags; 765 unsigned long flags;
766 char buf[4] = "0"; 766 char buf[4] = "0";
767 767
@@ -791,7 +791,7 @@ static ssize_t
791event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, 791event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
792 loff_t *ppos) 792 loff_t *ppos)
793{ 793{
794 struct ftrace_event_file *file; 794 struct trace_event_file *file;
795 unsigned long val; 795 unsigned long val;
796 int ret; 796 int ret;
797 797
@@ -831,7 +831,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
831 struct ftrace_subsystem_dir *dir = filp->private_data; 831 struct ftrace_subsystem_dir *dir = filp->private_data;
832 struct event_subsystem *system = dir->subsystem; 832 struct event_subsystem *system = dir->subsystem;
833 struct ftrace_event_call *call; 833 struct ftrace_event_call *call;
834 struct ftrace_event_file *file; 834 struct trace_event_file *file;
835 struct trace_array *tr = dir->tr; 835 struct trace_array *tr = dir->tr;
836 char buf[2]; 836 char buf[2];
837 int set = 0; 837 int set = 0;
@@ -1062,7 +1062,7 @@ static ssize_t
1062event_filter_read(struct file *filp, char __user *ubuf, size_t cnt, 1062event_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
1063 loff_t *ppos) 1063 loff_t *ppos)
1064{ 1064{
1065 struct ftrace_event_file *file; 1065 struct trace_event_file *file;
1066 struct trace_seq *s; 1066 struct trace_seq *s;
1067 int r = -ENODEV; 1067 int r = -ENODEV;
1068 1068
@@ -1095,7 +1095,7 @@ static ssize_t
1095event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, 1095event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
1096 loff_t *ppos) 1096 loff_t *ppos)
1097{ 1097{
1098 struct ftrace_event_file *file; 1098 struct trace_event_file *file;
1099 char *buf; 1099 char *buf;
1100 int err = -ENODEV; 1100 int err = -ENODEV;
1101 1101
@@ -1497,7 +1497,7 @@ create_new_subsystem(const char *name)
1497 1497
1498static struct dentry * 1498static struct dentry *
1499event_subsystem_dir(struct trace_array *tr, const char *name, 1499event_subsystem_dir(struct trace_array *tr, const char *name,
1500 struct ftrace_event_file *file, struct dentry *parent) 1500 struct trace_event_file *file, struct dentry *parent)
1501{ 1501{
1502 struct ftrace_subsystem_dir *dir; 1502 struct ftrace_subsystem_dir *dir;
1503 struct event_subsystem *system; 1503 struct event_subsystem *system;
@@ -1571,7 +1571,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
1571} 1571}
1572 1572
1573static int 1573static int
1574event_create_dir(struct dentry *parent, struct ftrace_event_file *file) 1574event_create_dir(struct dentry *parent, struct trace_event_file *file)
1575{ 1575{
1576 struct ftrace_event_call *call = file->event_call; 1576 struct ftrace_event_call *call = file->event_call;
1577 struct trace_array *tr = file->tr; 1577 struct trace_array *tr = file->tr;
@@ -1636,7 +1636,7 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file)
1636 1636
1637static void remove_event_from_tracers(struct ftrace_event_call *call) 1637static void remove_event_from_tracers(struct ftrace_event_call *call)
1638{ 1638{
1639 struct ftrace_event_file *file; 1639 struct trace_event_file *file;
1640 struct trace_array *tr; 1640 struct trace_array *tr;
1641 1641
1642 do_for_each_event_file_safe(tr, file) { 1642 do_for_each_event_file_safe(tr, file) {
@@ -1657,7 +1657,7 @@ static void remove_event_from_tracers(struct ftrace_event_call *call)
1657static void event_remove(struct ftrace_event_call *call) 1657static void event_remove(struct ftrace_event_call *call)
1658{ 1658{
1659 struct trace_array *tr; 1659 struct trace_array *tr;
1660 struct ftrace_event_file *file; 1660 struct trace_event_file *file;
1661 1661
1662 do_for_each_event_file(tr, file) { 1662 do_for_each_event_file(tr, file) {
1663 if (file->event_call != call) 1663 if (file->event_call != call)
@@ -1836,11 +1836,11 @@ void trace_event_enum_update(struct trace_enum_map **map, int len)
1836 up_write(&trace_event_sem); 1836 up_write(&trace_event_sem);
1837} 1837}
1838 1838
1839static struct ftrace_event_file * 1839static struct trace_event_file *
1840trace_create_new_event(struct ftrace_event_call *call, 1840trace_create_new_event(struct ftrace_event_call *call,
1841 struct trace_array *tr) 1841 struct trace_array *tr)
1842{ 1842{
1843 struct ftrace_event_file *file; 1843 struct trace_event_file *file;
1844 1844
1845 file = kmem_cache_alloc(file_cachep, GFP_TRACE); 1845 file = kmem_cache_alloc(file_cachep, GFP_TRACE);
1846 if (!file) 1846 if (!file)
@@ -1860,7 +1860,7 @@ trace_create_new_event(struct ftrace_event_call *call,
1860static int 1860static int
1861__trace_add_new_event(struct ftrace_event_call *call, struct trace_array *tr) 1861__trace_add_new_event(struct ftrace_event_call *call, struct trace_array *tr)
1862{ 1862{
1863 struct ftrace_event_file *file; 1863 struct trace_event_file *file;
1864 1864
1865 file = trace_create_new_event(call, tr); 1865 file = trace_create_new_event(call, tr);
1866 if (!file) 1866 if (!file)
@@ -1878,7 +1878,7 @@ static __init int
1878__trace_early_add_new_event(struct ftrace_event_call *call, 1878__trace_early_add_new_event(struct ftrace_event_call *call,
1879 struct trace_array *tr) 1879 struct trace_array *tr)
1880{ 1880{
1881 struct ftrace_event_file *file; 1881 struct trace_event_file *file;
1882 1882
1883 file = trace_create_new_event(call, tr); 1883 file = trace_create_new_event(call, tr);
1884 if (!file) 1884 if (!file)
@@ -1921,7 +1921,7 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
1921static int probe_remove_event_call(struct ftrace_event_call *call) 1921static int probe_remove_event_call(struct ftrace_event_call *call)
1922{ 1922{
1923 struct trace_array *tr; 1923 struct trace_array *tr;
1924 struct ftrace_event_file *file; 1924 struct trace_event_file *file;
1925 1925
1926#ifdef CONFIG_PERF_EVENTS 1926#ifdef CONFIG_PERF_EVENTS
1927 if (call->perf_refcount) 1927 if (call->perf_refcount)
@@ -2066,10 +2066,10 @@ __trace_add_event_dirs(struct trace_array *tr)
2066 } 2066 }
2067} 2067}
2068 2068
2069struct ftrace_event_file * 2069struct trace_event_file *
2070find_event_file(struct trace_array *tr, const char *system, const char *event) 2070find_event_file(struct trace_array *tr, const char *system, const char *event)
2071{ 2071{
2072 struct ftrace_event_file *file; 2072 struct trace_event_file *file;
2073 struct ftrace_event_call *call; 2073 struct ftrace_event_call *call;
2074 const char *name; 2074 const char *name;
2075 2075
@@ -2098,7 +2098,7 @@ find_event_file(struct trace_array *tr, const char *system, const char *event)
2098#define DISABLE_EVENT_STR "disable_event" 2098#define DISABLE_EVENT_STR "disable_event"
2099 2099
2100struct event_probe_data { 2100struct event_probe_data {
2101 struct ftrace_event_file *file; 2101 struct trace_event_file *file;
2102 unsigned long count; 2102 unsigned long count;
2103 int ref; 2103 int ref;
2104 bool enable; 2104 bool enable;
@@ -2226,7 +2226,7 @@ event_enable_func(struct ftrace_hash *hash,
2226 char *glob, char *cmd, char *param, int enabled) 2226 char *glob, char *cmd, char *param, int enabled)
2227{ 2227{
2228 struct trace_array *tr = top_trace_array(); 2228 struct trace_array *tr = top_trace_array();
2229 struct ftrace_event_file *file; 2229 struct trace_event_file *file;
2230 struct ftrace_probe_ops *ops; 2230 struct ftrace_probe_ops *ops;
2231 struct event_probe_data *data; 2231 struct event_probe_data *data;
2232 const char *system; 2232 const char *system;
@@ -2358,7 +2358,7 @@ static inline int register_event_cmds(void) { return 0; }
2358#endif /* CONFIG_DYNAMIC_FTRACE */ 2358#endif /* CONFIG_DYNAMIC_FTRACE */
2359 2359
2360/* 2360/*
2361 * The top level array has already had its ftrace_event_file 2361 * The top level array has already had its trace_event_file
2362 * descriptors created in order to allow for early events to 2362 * descriptors created in order to allow for early events to
2363 * be recorded. This function is called after the tracefs has been 2363 * be recorded. This function is called after the tracefs has been
2364 * initialized, and we now have to create the files associated 2364 * initialized, and we now have to create the files associated
@@ -2367,7 +2367,7 @@ static inline int register_event_cmds(void) { return 0; }
2367static __init void 2367static __init void
2368__trace_early_add_event_dirs(struct trace_array *tr) 2368__trace_early_add_event_dirs(struct trace_array *tr)
2369{ 2369{
2370 struct ftrace_event_file *file; 2370 struct trace_event_file *file;
2371 int ret; 2371 int ret;
2372 2372
2373 2373
@@ -2407,7 +2407,7 @@ __trace_early_add_events(struct trace_array *tr)
2407static void 2407static void
2408__trace_remove_event_dirs(struct trace_array *tr) 2408__trace_remove_event_dirs(struct trace_array *tr)
2409{ 2409{
2410 struct ftrace_event_file *file, *next; 2410 struct trace_event_file *file, *next;
2411 2411
2412 list_for_each_entry_safe(file, next, &tr->events, list) 2412 list_for_each_entry_safe(file, next, &tr->events, list)
2413 remove_event_file_dir(file); 2413 remove_event_file_dir(file);
@@ -2557,7 +2557,7 @@ int event_trace_del_tracer(struct trace_array *tr)
2557static __init int event_trace_memsetup(void) 2557static __init int event_trace_memsetup(void)
2558{ 2558{
2559 field_cachep = KMEM_CACHE(ftrace_event_field, SLAB_PANIC); 2559 field_cachep = KMEM_CACHE(ftrace_event_field, SLAB_PANIC);
2560 file_cachep = KMEM_CACHE(ftrace_event_file, SLAB_PANIC); 2560 file_cachep = KMEM_CACHE(trace_event_file, SLAB_PANIC);
2561 return 0; 2561 return 0;
2562} 2562}
2563 2563
@@ -2755,7 +2755,7 @@ static __init void event_test_stuff(void)
2755static __init void event_trace_self_tests(void) 2755static __init void event_trace_self_tests(void)
2756{ 2756{
2757 struct ftrace_subsystem_dir *dir; 2757 struct ftrace_subsystem_dir *dir;
2758 struct ftrace_event_file *file; 2758 struct trace_event_file *file;
2759 struct ftrace_event_call *call; 2759 struct ftrace_event_call *call;
2760 struct event_subsystem *system; 2760 struct event_subsystem *system;
2761 struct trace_array *tr; 2761 struct trace_array *tr;
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index ced69da0ff55..13ad0a87d31e 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -643,7 +643,7 @@ static void append_filter_err(struct filter_parse_state *ps,
643 free_page((unsigned long) buf); 643 free_page((unsigned long) buf);
644} 644}
645 645
646static inline struct event_filter *event_filter(struct ftrace_event_file *file) 646static inline struct event_filter *event_filter(struct trace_event_file *file)
647{ 647{
648 if (file->event_call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) 648 if (file->event_call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
649 return file->event_call->filter; 649 return file->event_call->filter;
@@ -652,7 +652,7 @@ static inline struct event_filter *event_filter(struct ftrace_event_file *file)
652} 652}
653 653
654/* caller must hold event_mutex */ 654/* caller must hold event_mutex */
655void print_event_filter(struct ftrace_event_file *file, struct trace_seq *s) 655void print_event_filter(struct trace_event_file *file, struct trace_seq *s)
656{ 656{
657 struct event_filter *filter = event_filter(file); 657 struct event_filter *filter = event_filter(file);
658 658
@@ -780,7 +780,7 @@ static void __free_preds(struct event_filter *filter)
780 filter->n_preds = 0; 780 filter->n_preds = 0;
781} 781}
782 782
783static void filter_disable(struct ftrace_event_file *file) 783static void filter_disable(struct trace_event_file *file)
784{ 784{
785 struct ftrace_event_call *call = file->event_call; 785 struct ftrace_event_call *call = file->event_call;
786 786
@@ -837,7 +837,7 @@ static int __alloc_preds(struct event_filter *filter, int n_preds)
837 return 0; 837 return 0;
838} 838}
839 839
840static inline void __remove_filter(struct ftrace_event_file *file) 840static inline void __remove_filter(struct trace_event_file *file)
841{ 841{
842 struct ftrace_event_call *call = file->event_call; 842 struct ftrace_event_call *call = file->event_call;
843 843
@@ -851,7 +851,7 @@ static inline void __remove_filter(struct ftrace_event_file *file)
851static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir, 851static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir,
852 struct trace_array *tr) 852 struct trace_array *tr)
853{ 853{
854 struct ftrace_event_file *file; 854 struct trace_event_file *file;
855 855
856 list_for_each_entry(file, &tr->events, list) { 856 list_for_each_entry(file, &tr->events, list) {
857 if (file->system != dir) 857 if (file->system != dir)
@@ -860,7 +860,7 @@ static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir,
860 } 860 }
861} 861}
862 862
863static inline void __free_subsystem_filter(struct ftrace_event_file *file) 863static inline void __free_subsystem_filter(struct trace_event_file *file)
864{ 864{
865 struct ftrace_event_call *call = file->event_call; 865 struct ftrace_event_call *call = file->event_call;
866 866
@@ -876,7 +876,7 @@ static inline void __free_subsystem_filter(struct ftrace_event_file *file)
876static void filter_free_subsystem_filters(struct ftrace_subsystem_dir *dir, 876static void filter_free_subsystem_filters(struct ftrace_subsystem_dir *dir,
877 struct trace_array *tr) 877 struct trace_array *tr)
878{ 878{
879 struct ftrace_event_file *file; 879 struct trace_event_file *file;
880 880
881 list_for_each_entry(file, &tr->events, list) { 881 list_for_each_entry(file, &tr->events, list) {
882 if (file->system != dir) 882 if (file->system != dir)
@@ -1662,7 +1662,7 @@ fail:
1662 return err; 1662 return err;
1663} 1663}
1664 1664
1665static inline void event_set_filtered_flag(struct ftrace_event_file *file) 1665static inline void event_set_filtered_flag(struct trace_event_file *file)
1666{ 1666{
1667 struct ftrace_event_call *call = file->event_call; 1667 struct ftrace_event_call *call = file->event_call;
1668 1668
@@ -1672,7 +1672,7 @@ static inline void event_set_filtered_flag(struct ftrace_event_file *file)
1672 file->flags |= FTRACE_EVENT_FL_FILTERED; 1672 file->flags |= FTRACE_EVENT_FL_FILTERED;
1673} 1673}
1674 1674
1675static inline void event_set_filter(struct ftrace_event_file *file, 1675static inline void event_set_filter(struct trace_event_file *file,
1676 struct event_filter *filter) 1676 struct event_filter *filter)
1677{ 1677{
1678 struct ftrace_event_call *call = file->event_call; 1678 struct ftrace_event_call *call = file->event_call;
@@ -1683,7 +1683,7 @@ static inline void event_set_filter(struct ftrace_event_file *file,
1683 rcu_assign_pointer(file->filter, filter); 1683 rcu_assign_pointer(file->filter, filter);
1684} 1684}
1685 1685
1686static inline void event_clear_filter(struct ftrace_event_file *file) 1686static inline void event_clear_filter(struct trace_event_file *file)
1687{ 1687{
1688 struct ftrace_event_call *call = file->event_call; 1688 struct ftrace_event_call *call = file->event_call;
1689 1689
@@ -1694,7 +1694,7 @@ static inline void event_clear_filter(struct ftrace_event_file *file)
1694} 1694}
1695 1695
1696static inline void 1696static inline void
1697event_set_no_set_filter_flag(struct ftrace_event_file *file) 1697event_set_no_set_filter_flag(struct trace_event_file *file)
1698{ 1698{
1699 struct ftrace_event_call *call = file->event_call; 1699 struct ftrace_event_call *call = file->event_call;
1700 1700
@@ -1705,7 +1705,7 @@ event_set_no_set_filter_flag(struct ftrace_event_file *file)
1705} 1705}
1706 1706
1707static inline void 1707static inline void
1708event_clear_no_set_filter_flag(struct ftrace_event_file *file) 1708event_clear_no_set_filter_flag(struct trace_event_file *file)
1709{ 1709{
1710 struct ftrace_event_call *call = file->event_call; 1710 struct ftrace_event_call *call = file->event_call;
1711 1711
@@ -1716,7 +1716,7 @@ event_clear_no_set_filter_flag(struct ftrace_event_file *file)
1716} 1716}
1717 1717
1718static inline bool 1718static inline bool
1719event_no_set_filter_flag(struct ftrace_event_file *file) 1719event_no_set_filter_flag(struct trace_event_file *file)
1720{ 1720{
1721 struct ftrace_event_call *call = file->event_call; 1721 struct ftrace_event_call *call = file->event_call;
1722 1722
@@ -1740,7 +1740,7 @@ static int replace_system_preds(struct ftrace_subsystem_dir *dir,
1740 struct filter_parse_state *ps, 1740 struct filter_parse_state *ps,
1741 char *filter_string) 1741 char *filter_string)
1742{ 1742{
1743 struct ftrace_event_file *file; 1743 struct trace_event_file *file;
1744 struct filter_list *filter_item; 1744 struct filter_list *filter_item;
1745 struct filter_list *tmp; 1745 struct filter_list *tmp;
1746 LIST_HEAD(filter_list); 1746 LIST_HEAD(filter_list);
@@ -1961,7 +1961,7 @@ static int create_system_filter(struct ftrace_subsystem_dir *dir,
1961} 1961}
1962 1962
1963/* caller must hold event_mutex */ 1963/* caller must hold event_mutex */
1964int apply_event_filter(struct ftrace_event_file *file, char *filter_string) 1964int apply_event_filter(struct trace_event_file *file, char *filter_string)
1965{ 1965{
1966 struct ftrace_event_call *call = file->event_call; 1966 struct ftrace_event_call *call = file->event_call;
1967 struct event_filter *filter; 1967 struct event_filter *filter;
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index 8712df9decb4..bb6f2ff52ad2 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -40,7 +40,7 @@ trigger_data_free(struct event_trigger_data *data)
40 40
41/** 41/**
42 * event_triggers_call - Call triggers associated with a trace event 42 * event_triggers_call - Call triggers associated with a trace event
43 * @file: The ftrace_event_file associated with the event 43 * @file: The trace_event_file associated with the event
44 * @rec: The trace entry for the event, NULL for unconditional invocation 44 * @rec: The trace entry for the event, NULL for unconditional invocation
45 * 45 *
46 * For each trigger associated with an event, invoke the trigger 46 * For each trigger associated with an event, invoke the trigger
@@ -63,7 +63,7 @@ trigger_data_free(struct event_trigger_data *data)
63 * any trigger that should be deferred, ETT_NONE if nothing to defer. 63 * any trigger that should be deferred, ETT_NONE if nothing to defer.
64 */ 64 */
65enum event_trigger_type 65enum event_trigger_type
66event_triggers_call(struct ftrace_event_file *file, void *rec) 66event_triggers_call(struct trace_event_file *file, void *rec)
67{ 67{
68 struct event_trigger_data *data; 68 struct event_trigger_data *data;
69 enum event_trigger_type tt = ETT_NONE; 69 enum event_trigger_type tt = ETT_NONE;
@@ -92,7 +92,7 @@ EXPORT_SYMBOL_GPL(event_triggers_call);
92 92
93/** 93/**
94 * event_triggers_post_call - Call 'post_triggers' for a trace event 94 * event_triggers_post_call - Call 'post_triggers' for a trace event
95 * @file: The ftrace_event_file associated with the event 95 * @file: The trace_event_file associated with the event
96 * @tt: enum event_trigger_type containing a set bit for each trigger to invoke 96 * @tt: enum event_trigger_type containing a set bit for each trigger to invoke
97 * 97 *
98 * For each trigger associated with an event, invoke the trigger 98 * For each trigger associated with an event, invoke the trigger
@@ -103,7 +103,7 @@ EXPORT_SYMBOL_GPL(event_triggers_call);
103 * Called from tracepoint handlers (with rcu_read_lock_sched() held). 103 * Called from tracepoint handlers (with rcu_read_lock_sched() held).
104 */ 104 */
105void 105void
106event_triggers_post_call(struct ftrace_event_file *file, 106event_triggers_post_call(struct trace_event_file *file,
107 enum event_trigger_type tt) 107 enum event_trigger_type tt)
108{ 108{
109 struct event_trigger_data *data; 109 struct event_trigger_data *data;
@@ -119,7 +119,7 @@ EXPORT_SYMBOL_GPL(event_triggers_post_call);
119 119
120static void *trigger_next(struct seq_file *m, void *t, loff_t *pos) 120static void *trigger_next(struct seq_file *m, void *t, loff_t *pos)
121{ 121{
122 struct ftrace_event_file *event_file = event_file_data(m->private); 122 struct trace_event_file *event_file = event_file_data(m->private);
123 123
124 if (t == SHOW_AVAILABLE_TRIGGERS) 124 if (t == SHOW_AVAILABLE_TRIGGERS)
125 return NULL; 125 return NULL;
@@ -129,7 +129,7 @@ static void *trigger_next(struct seq_file *m, void *t, loff_t *pos)
129 129
130static void *trigger_start(struct seq_file *m, loff_t *pos) 130static void *trigger_start(struct seq_file *m, loff_t *pos)
131{ 131{
132 struct ftrace_event_file *event_file; 132 struct trace_event_file *event_file;
133 133
134 /* ->stop() is called even if ->start() fails */ 134 /* ->stop() is called even if ->start() fails */
135 mutex_lock(&event_mutex); 135 mutex_lock(&event_mutex);
@@ -201,7 +201,7 @@ static int event_trigger_regex_open(struct inode *inode, struct file *file)
201 return ret; 201 return ret;
202} 202}
203 203
204static int trigger_process_regex(struct ftrace_event_file *file, char *buff) 204static int trigger_process_regex(struct trace_event_file *file, char *buff)
205{ 205{
206 char *command, *next = buff; 206 char *command, *next = buff;
207 struct event_command *p; 207 struct event_command *p;
@@ -227,7 +227,7 @@ static ssize_t event_trigger_regex_write(struct file *file,
227 const char __user *ubuf, 227 const char __user *ubuf,
228 size_t cnt, loff_t *ppos) 228 size_t cnt, loff_t *ppos)
229{ 229{
230 struct ftrace_event_file *event_file; 230 struct trace_event_file *event_file;
231 ssize_t ret; 231 ssize_t ret;
232 char *buf; 232 char *buf;
233 233
@@ -430,7 +430,7 @@ event_trigger_free(struct event_trigger_ops *ops,
430 trigger_data_free(data); 430 trigger_data_free(data);
431} 431}
432 432
433static int trace_event_trigger_enable_disable(struct ftrace_event_file *file, 433static int trace_event_trigger_enable_disable(struct trace_event_file *file,
434 int trigger_enable) 434 int trigger_enable)
435{ 435{
436 int ret = 0; 436 int ret = 0;
@@ -466,7 +466,7 @@ static int trace_event_trigger_enable_disable(struct ftrace_event_file *file,
466void 466void
467clear_event_triggers(struct trace_array *tr) 467clear_event_triggers(struct trace_array *tr)
468{ 468{
469 struct ftrace_event_file *file; 469 struct trace_event_file *file;
470 470
471 list_for_each_entry(file, &tr->events, list) { 471 list_for_each_entry(file, &tr->events, list) {
472 struct event_trigger_data *data; 472 struct event_trigger_data *data;
@@ -480,7 +480,7 @@ clear_event_triggers(struct trace_array *tr)
480 480
481/** 481/**
482 * update_cond_flag - Set or reset the TRIGGER_COND bit 482 * update_cond_flag - Set or reset the TRIGGER_COND bit
483 * @file: The ftrace_event_file associated with the event 483 * @file: The trace_event_file associated with the event
484 * 484 *
485 * If an event has triggers and any of those triggers has a filter or 485 * If an event has triggers and any of those triggers has a filter or
486 * a post_trigger, trigger invocation needs to be deferred until after 486 * a post_trigger, trigger invocation needs to be deferred until after
@@ -488,7 +488,7 @@ clear_event_triggers(struct trace_array *tr)
488 * its TRIGGER_COND bit set, otherwise the TRIGGER_COND bit should be 488 * its TRIGGER_COND bit set, otherwise the TRIGGER_COND bit should be
489 * cleared. 489 * cleared.
490 */ 490 */
491static void update_cond_flag(struct ftrace_event_file *file) 491static void update_cond_flag(struct trace_event_file *file)
492{ 492{
493 struct event_trigger_data *data; 493 struct event_trigger_data *data;
494 bool set_cond = false; 494 bool set_cond = false;
@@ -511,7 +511,7 @@ static void update_cond_flag(struct ftrace_event_file *file)
511 * @glob: The raw string used to register the trigger 511 * @glob: The raw string used to register the trigger
512 * @ops: The trigger ops associated with the trigger 512 * @ops: The trigger ops associated with the trigger
513 * @data: Trigger-specific data to associate with the trigger 513 * @data: Trigger-specific data to associate with the trigger
514 * @file: The ftrace_event_file associated with the event 514 * @file: The trace_event_file associated with the event
515 * 515 *
516 * Common implementation for event trigger registration. 516 * Common implementation for event trigger registration.
517 * 517 *
@@ -522,7 +522,7 @@ static void update_cond_flag(struct ftrace_event_file *file)
522 */ 522 */
523static int register_trigger(char *glob, struct event_trigger_ops *ops, 523static int register_trigger(char *glob, struct event_trigger_ops *ops,
524 struct event_trigger_data *data, 524 struct event_trigger_data *data,
525 struct ftrace_event_file *file) 525 struct trace_event_file *file)
526{ 526{
527 struct event_trigger_data *test; 527 struct event_trigger_data *test;
528 int ret = 0; 528 int ret = 0;
@@ -557,7 +557,7 @@ out:
557 * @glob: The raw string used to register the trigger 557 * @glob: The raw string used to register the trigger
558 * @ops: The trigger ops associated with the trigger 558 * @ops: The trigger ops associated with the trigger
559 * @test: Trigger-specific data used to find the trigger to remove 559 * @test: Trigger-specific data used to find the trigger to remove
560 * @file: The ftrace_event_file associated with the event 560 * @file: The trace_event_file associated with the event
561 * 561 *
562 * Common implementation for event trigger unregistration. 562 * Common implementation for event trigger unregistration.
563 * 563 *
@@ -566,7 +566,7 @@ out:
566 */ 566 */
567static void unregister_trigger(char *glob, struct event_trigger_ops *ops, 567static void unregister_trigger(char *glob, struct event_trigger_ops *ops,
568 struct event_trigger_data *test, 568 struct event_trigger_data *test,
569 struct ftrace_event_file *file) 569 struct trace_event_file *file)
570{ 570{
571 struct event_trigger_data *data; 571 struct event_trigger_data *data;
572 bool unregistered = false; 572 bool unregistered = false;
@@ -588,7 +588,7 @@ static void unregister_trigger(char *glob, struct event_trigger_ops *ops,
588/** 588/**
589 * event_trigger_callback - Generic event_command @func implementation 589 * event_trigger_callback - Generic event_command @func implementation
590 * @cmd_ops: The command ops, used for trigger registration 590 * @cmd_ops: The command ops, used for trigger registration
591 * @file: The ftrace_event_file associated with the event 591 * @file: The trace_event_file associated with the event
592 * @glob: The raw string used to register the trigger 592 * @glob: The raw string used to register the trigger
593 * @cmd: The cmd portion of the string used to register the trigger 593 * @cmd: The cmd portion of the string used to register the trigger
594 * @param: The params portion of the string used to register the trigger 594 * @param: The params portion of the string used to register the trigger
@@ -603,7 +603,7 @@ static void unregister_trigger(char *glob, struct event_trigger_ops *ops,
603 */ 603 */
604static int 604static int
605event_trigger_callback(struct event_command *cmd_ops, 605event_trigger_callback(struct event_command *cmd_ops,
606 struct ftrace_event_file *file, 606 struct trace_event_file *file,
607 char *glob, char *cmd, char *param) 607 char *glob, char *cmd, char *param)
608{ 608{
609 struct event_trigger_data *trigger_data; 609 struct event_trigger_data *trigger_data;
@@ -688,7 +688,7 @@ event_trigger_callback(struct event_command *cmd_ops,
688 * set_trigger_filter - Generic event_command @set_filter implementation 688 * set_trigger_filter - Generic event_command @set_filter implementation
689 * @filter_str: The filter string for the trigger, NULL to remove filter 689 * @filter_str: The filter string for the trigger, NULL to remove filter
690 * @trigger_data: Trigger-specific data 690 * @trigger_data: Trigger-specific data
691 * @file: The ftrace_event_file associated with the event 691 * @file: The trace_event_file associated with the event
692 * 692 *
693 * Common implementation for event command filter parsing and filter 693 * Common implementation for event command filter parsing and filter
694 * instantiation. 694 * instantiation.
@@ -702,7 +702,7 @@ event_trigger_callback(struct event_command *cmd_ops,
702 */ 702 */
703static int set_trigger_filter(char *filter_str, 703static int set_trigger_filter(char *filter_str,
704 struct event_trigger_data *trigger_data, 704 struct event_trigger_data *trigger_data,
705 struct ftrace_event_file *file) 705 struct trace_event_file *file)
706{ 706{
707 struct event_trigger_data *data = trigger_data; 707 struct event_trigger_data *data = trigger_data;
708 struct event_filter *filter = NULL, *tmp; 708 struct event_filter *filter = NULL, *tmp;
@@ -900,7 +900,7 @@ snapshot_count_trigger(struct event_trigger_data *data)
900static int 900static int
901register_snapshot_trigger(char *glob, struct event_trigger_ops *ops, 901register_snapshot_trigger(char *glob, struct event_trigger_ops *ops,
902 struct event_trigger_data *data, 902 struct event_trigger_data *data,
903 struct ftrace_event_file *file) 903 struct trace_event_file *file)
904{ 904{
905 int ret = register_trigger(glob, ops, data, file); 905 int ret = register_trigger(glob, ops, data, file);
906 906
@@ -1053,7 +1053,7 @@ static __init void unregister_trigger_traceon_traceoff_cmds(void)
1053#define DISABLE_EVENT_STR "disable_event" 1053#define DISABLE_EVENT_STR "disable_event"
1054 1054
1055struct enable_trigger_data { 1055struct enable_trigger_data {
1056 struct ftrace_event_file *file; 1056 struct trace_event_file *file;
1057 bool enable; 1057 bool enable;
1058}; 1058};
1059 1059
@@ -1159,10 +1159,10 @@ static struct event_trigger_ops event_disable_count_trigger_ops = {
1159 1159
1160static int 1160static int
1161event_enable_trigger_func(struct event_command *cmd_ops, 1161event_enable_trigger_func(struct event_command *cmd_ops,
1162 struct ftrace_event_file *file, 1162 struct trace_event_file *file,
1163 char *glob, char *cmd, char *param) 1163 char *glob, char *cmd, char *param)
1164{ 1164{
1165 struct ftrace_event_file *event_enable_file; 1165 struct trace_event_file *event_enable_file;
1166 struct enable_trigger_data *enable_data; 1166 struct enable_trigger_data *enable_data;
1167 struct event_trigger_data *trigger_data; 1167 struct event_trigger_data *trigger_data;
1168 struct event_trigger_ops *trigger_ops; 1168 struct event_trigger_ops *trigger_ops;
@@ -1294,7 +1294,7 @@ event_enable_trigger_func(struct event_command *cmd_ops,
1294static int event_enable_register_trigger(char *glob, 1294static int event_enable_register_trigger(char *glob,
1295 struct event_trigger_ops *ops, 1295 struct event_trigger_ops *ops,
1296 struct event_trigger_data *data, 1296 struct event_trigger_data *data,
1297 struct ftrace_event_file *file) 1297 struct trace_event_file *file)
1298{ 1298{
1299 struct enable_trigger_data *enable_data = data->private_data; 1299 struct enable_trigger_data *enable_data = data->private_data;
1300 struct enable_trigger_data *test_enable_data; 1300 struct enable_trigger_data *test_enable_data;
@@ -1331,7 +1331,7 @@ out:
1331static void event_enable_unregister_trigger(char *glob, 1331static void event_enable_unregister_trigger(char *glob,
1332 struct event_trigger_ops *ops, 1332 struct event_trigger_ops *ops,
1333 struct event_trigger_data *test, 1333 struct event_trigger_data *test,
1334 struct ftrace_event_file *file) 1334 struct trace_event_file *file)
1335{ 1335{
1336 struct enable_trigger_data *test_enable_data = test->private_data; 1336 struct enable_trigger_data *test_enable_data = test->private_data;
1337 struct enable_trigger_data *enable_data; 1337 struct enable_trigger_data *enable_data;
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 59c35210a7e7..87c63d039b9d 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -359,7 +359,7 @@ static struct trace_kprobe *find_trace_kprobe(const char *event,
359 * if the file is NULL, enable "perf" handler, or enable "trace" handler. 359 * if the file is NULL, enable "perf" handler, or enable "trace" handler.
360 */ 360 */
361static int 361static int
362enable_trace_kprobe(struct trace_kprobe *tk, struct ftrace_event_file *file) 362enable_trace_kprobe(struct trace_kprobe *tk, struct trace_event_file *file)
363{ 363{
364 int ret = 0; 364 int ret = 0;
365 365
@@ -394,7 +394,7 @@ enable_trace_kprobe(struct trace_kprobe *tk, struct ftrace_event_file *file)
394 * if the file is NULL, disable "perf" handler, or disable "trace" handler. 394 * if the file is NULL, disable "perf" handler, or disable "trace" handler.
395 */ 395 */
396static int 396static int
397disable_trace_kprobe(struct trace_kprobe *tk, struct ftrace_event_file *file) 397disable_trace_kprobe(struct trace_kprobe *tk, struct trace_event_file *file)
398{ 398{
399 struct event_file_link *link = NULL; 399 struct event_file_link *link = NULL;
400 int wait = 0; 400 int wait = 0;
@@ -917,7 +917,7 @@ static const struct file_operations kprobe_profile_ops = {
917/* Kprobe handler */ 917/* Kprobe handler */
918static nokprobe_inline void 918static nokprobe_inline void
919__kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs, 919__kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
920 struct ftrace_event_file *ftrace_file) 920 struct trace_event_file *trace_file)
921{ 921{
922 struct kprobe_trace_entry_head *entry; 922 struct kprobe_trace_entry_head *entry;
923 struct ring_buffer_event *event; 923 struct ring_buffer_event *event;
@@ -926,9 +926,9 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
926 unsigned long irq_flags; 926 unsigned long irq_flags;
927 struct ftrace_event_call *call = &tk->tp.call; 927 struct ftrace_event_call *call = &tk->tp.call;
928 928
929 WARN_ON(call != ftrace_file->event_call); 929 WARN_ON(call != trace_file->event_call);
930 930
931 if (ftrace_trigger_soft_disabled(ftrace_file)) 931 if (ftrace_trigger_soft_disabled(trace_file))
932 return; 932 return;
933 933
934 local_save_flags(irq_flags); 934 local_save_flags(irq_flags);
@@ -937,7 +937,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
937 dsize = __get_data_size(&tk->tp, regs); 937 dsize = __get_data_size(&tk->tp, regs);
938 size = sizeof(*entry) + tk->tp.size + dsize; 938 size = sizeof(*entry) + tk->tp.size + dsize;
939 939
940 event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, 940 event = trace_event_buffer_lock_reserve(&buffer, trace_file,
941 call->event.type, 941 call->event.type,
942 size, irq_flags, pc); 942 size, irq_flags, pc);
943 if (!event) 943 if (!event)
@@ -947,7 +947,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
947 entry->ip = (unsigned long)tk->rp.kp.addr; 947 entry->ip = (unsigned long)tk->rp.kp.addr;
948 store_trace_args(sizeof(*entry), &tk->tp, regs, (u8 *)&entry[1], dsize); 948 store_trace_args(sizeof(*entry), &tk->tp, regs, (u8 *)&entry[1], dsize);
949 949
950 event_trigger_unlock_commit_regs(ftrace_file, buffer, event, 950 event_trigger_unlock_commit_regs(trace_file, buffer, event,
951 entry, irq_flags, pc, regs); 951 entry, irq_flags, pc, regs);
952} 952}
953 953
@@ -965,7 +965,7 @@ NOKPROBE_SYMBOL(kprobe_trace_func);
965static nokprobe_inline void 965static nokprobe_inline void
966__kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri, 966__kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
967 struct pt_regs *regs, 967 struct pt_regs *regs,
968 struct ftrace_event_file *ftrace_file) 968 struct trace_event_file *trace_file)
969{ 969{
970 struct kretprobe_trace_entry_head *entry; 970 struct kretprobe_trace_entry_head *entry;
971 struct ring_buffer_event *event; 971 struct ring_buffer_event *event;
@@ -974,9 +974,9 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
974 unsigned long irq_flags; 974 unsigned long irq_flags;
975 struct ftrace_event_call *call = &tk->tp.call; 975 struct ftrace_event_call *call = &tk->tp.call;
976 976
977 WARN_ON(call != ftrace_file->event_call); 977 WARN_ON(call != trace_file->event_call);
978 978
979 if (ftrace_trigger_soft_disabled(ftrace_file)) 979 if (ftrace_trigger_soft_disabled(trace_file))
980 return; 980 return;
981 981
982 local_save_flags(irq_flags); 982 local_save_flags(irq_flags);
@@ -985,7 +985,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
985 dsize = __get_data_size(&tk->tp, regs); 985 dsize = __get_data_size(&tk->tp, regs);
986 size = sizeof(*entry) + tk->tp.size + dsize; 986 size = sizeof(*entry) + tk->tp.size + dsize;
987 987
988 event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, 988 event = trace_event_buffer_lock_reserve(&buffer, trace_file,
989 call->event.type, 989 call->event.type,
990 size, irq_flags, pc); 990 size, irq_flags, pc);
991 if (!event) 991 if (!event)
@@ -996,7 +996,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
996 entry->ret_ip = (unsigned long)ri->ret_addr; 996 entry->ret_ip = (unsigned long)ri->ret_addr;
997 store_trace_args(sizeof(*entry), &tk->tp, regs, (u8 *)&entry[1], dsize); 997 store_trace_args(sizeof(*entry), &tk->tp, regs, (u8 *)&entry[1], dsize);
998 998
999 event_trigger_unlock_commit_regs(ftrace_file, buffer, event, 999 event_trigger_unlock_commit_regs(trace_file, buffer, event,
1000 entry, irq_flags, pc, regs); 1000 entry, irq_flags, pc, regs);
1001} 1001}
1002 1002
@@ -1210,7 +1210,7 @@ static int kprobe_register(struct ftrace_event_call *event,
1210 enum trace_reg type, void *data) 1210 enum trace_reg type, void *data)
1211{ 1211{
1212 struct trace_kprobe *tk = (struct trace_kprobe *)event->data; 1212 struct trace_kprobe *tk = (struct trace_kprobe *)event->data;
1213 struct ftrace_event_file *file = data; 1213 struct trace_event_file *file = data;
1214 1214
1215 switch (type) { 1215 switch (type) {
1216 case TRACE_REG_REGISTER: 1216 case TRACE_REG_REGISTER:
@@ -1364,10 +1364,10 @@ static __used int kprobe_trace_selftest_target(int a1, int a2, int a3,
1364 return a1 + a2 + a3 + a4 + a5 + a6; 1364 return a1 + a2 + a3 + a4 + a5 + a6;
1365} 1365}
1366 1366
1367static struct ftrace_event_file * 1367static struct trace_event_file *
1368find_trace_probe_file(struct trace_kprobe *tk, struct trace_array *tr) 1368find_trace_probe_file(struct trace_kprobe *tk, struct trace_array *tr)
1369{ 1369{
1370 struct ftrace_event_file *file; 1370 struct trace_event_file *file;
1371 1371
1372 list_for_each_entry(file, &tr->events, list) 1372 list_for_each_entry(file, &tr->events, list)
1373 if (file->event_call == &tk->tp.call) 1373 if (file->event_call == &tk->tp.call)
@@ -1385,7 +1385,7 @@ static __init int kprobe_trace_self_tests_init(void)
1385 int ret, warn = 0; 1385 int ret, warn = 0;
1386 int (*target)(int, int, int, int, int, int); 1386 int (*target)(int, int, int, int, int, int);
1387 struct trace_kprobe *tk; 1387 struct trace_kprobe *tk;
1388 struct ftrace_event_file *file; 1388 struct trace_event_file *file;
1389 1389
1390 if (tracing_is_disabled()) 1390 if (tracing_is_disabled())
1391 return -ENODEV; 1391 return -ENODEV;
diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
index ab283e146b70..9fcdfbbcd8b5 100644
--- a/kernel/trace/trace_probe.h
+++ b/kernel/trace/trace_probe.h
@@ -281,7 +281,7 @@ struct trace_probe {
281}; 281};
282 282
283struct event_file_link { 283struct event_file_link {
284 struct ftrace_event_file *file; 284 struct trace_event_file *file;
285 struct list_head list; 285 struct list_head list;
286}; 286};
287 287
@@ -314,7 +314,7 @@ static inline int is_good_name(const char *name)
314} 314}
315 315
316static inline struct event_file_link * 316static inline struct event_file_link *
317find_event_file_link(struct trace_probe *tp, struct ftrace_event_file *file) 317find_event_file_link(struct trace_probe *tp, struct trace_event_file *file)
318{ 318{
319 struct event_file_link *link; 319 struct event_file_link *link;
320 320
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index f97f6e3a676c..ee4525261e82 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -293,7 +293,7 @@ static int __init syscall_exit_define_fields(struct ftrace_event_call *call)
293static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id) 293static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
294{ 294{
295 struct trace_array *tr = data; 295 struct trace_array *tr = data;
296 struct ftrace_event_file *ftrace_file; 296 struct trace_event_file *trace_file;
297 struct syscall_trace_enter *entry; 297 struct syscall_trace_enter *entry;
298 struct syscall_metadata *sys_data; 298 struct syscall_metadata *sys_data;
299 struct ring_buffer_event *event; 299 struct ring_buffer_event *event;
@@ -308,11 +308,11 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
308 return; 308 return;
309 309
310 /* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE) */ 310 /* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE) */
311 ftrace_file = rcu_dereference_sched(tr->enter_syscall_files[syscall_nr]); 311 trace_file = rcu_dereference_sched(tr->enter_syscall_files[syscall_nr]);
312 if (!ftrace_file) 312 if (!trace_file)
313 return; 313 return;
314 314
315 if (ftrace_trigger_soft_disabled(ftrace_file)) 315 if (ftrace_trigger_soft_disabled(trace_file))
316 return; 316 return;
317 317
318 sys_data = syscall_nr_to_meta(syscall_nr); 318 sys_data = syscall_nr_to_meta(syscall_nr);
@@ -334,14 +334,14 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
334 entry->nr = syscall_nr; 334 entry->nr = syscall_nr;
335 syscall_get_arguments(current, regs, 0, sys_data->nb_args, entry->args); 335 syscall_get_arguments(current, regs, 0, sys_data->nb_args, entry->args);
336 336
337 event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 337 event_trigger_unlock_commit(trace_file, buffer, event, entry,
338 irq_flags, pc); 338 irq_flags, pc);
339} 339}
340 340
341static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) 341static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
342{ 342{
343 struct trace_array *tr = data; 343 struct trace_array *tr = data;
344 struct ftrace_event_file *ftrace_file; 344 struct trace_event_file *trace_file;
345 struct syscall_trace_exit *entry; 345 struct syscall_trace_exit *entry;
346 struct syscall_metadata *sys_data; 346 struct syscall_metadata *sys_data;
347 struct ring_buffer_event *event; 347 struct ring_buffer_event *event;
@@ -355,11 +355,11 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
355 return; 355 return;
356 356
357 /* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE()) */ 357 /* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE()) */
358 ftrace_file = rcu_dereference_sched(tr->exit_syscall_files[syscall_nr]); 358 trace_file = rcu_dereference_sched(tr->exit_syscall_files[syscall_nr]);
359 if (!ftrace_file) 359 if (!trace_file)
360 return; 360 return;
361 361
362 if (ftrace_trigger_soft_disabled(ftrace_file)) 362 if (ftrace_trigger_soft_disabled(trace_file))
363 return; 363 return;
364 364
365 sys_data = syscall_nr_to_meta(syscall_nr); 365 sys_data = syscall_nr_to_meta(syscall_nr);
@@ -380,11 +380,11 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
380 entry->nr = syscall_nr; 380 entry->nr = syscall_nr;
381 entry->ret = syscall_get_return_value(current, regs); 381 entry->ret = syscall_get_return_value(current, regs);
382 382
383 event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 383 event_trigger_unlock_commit(trace_file, buffer, event, entry,
384 irq_flags, pc); 384 irq_flags, pc);
385} 385}
386 386
387static int reg_event_syscall_enter(struct ftrace_event_file *file, 387static int reg_event_syscall_enter(struct trace_event_file *file,
388 struct ftrace_event_call *call) 388 struct ftrace_event_call *call)
389{ 389{
390 struct trace_array *tr = file->tr; 390 struct trace_array *tr = file->tr;
@@ -405,7 +405,7 @@ static int reg_event_syscall_enter(struct ftrace_event_file *file,
405 return ret; 405 return ret;
406} 406}
407 407
408static void unreg_event_syscall_enter(struct ftrace_event_file *file, 408static void unreg_event_syscall_enter(struct trace_event_file *file,
409 struct ftrace_event_call *call) 409 struct ftrace_event_call *call)
410{ 410{
411 struct trace_array *tr = file->tr; 411 struct trace_array *tr = file->tr;
@@ -422,7 +422,7 @@ static void unreg_event_syscall_enter(struct ftrace_event_file *file,
422 mutex_unlock(&syscall_trace_lock); 422 mutex_unlock(&syscall_trace_lock);
423} 423}
424 424
425static int reg_event_syscall_exit(struct ftrace_event_file *file, 425static int reg_event_syscall_exit(struct trace_event_file *file,
426 struct ftrace_event_call *call) 426 struct ftrace_event_call *call)
427{ 427{
428 struct trace_array *tr = file->tr; 428 struct trace_array *tr = file->tr;
@@ -443,7 +443,7 @@ static int reg_event_syscall_exit(struct ftrace_event_file *file,
443 return ret; 443 return ret;
444} 444}
445 445
446static void unreg_event_syscall_exit(struct ftrace_event_file *file, 446static void unreg_event_syscall_exit(struct trace_event_file *file,
447 struct ftrace_event_call *call) 447 struct ftrace_event_call *call)
448{ 448{
449 struct trace_array *tr = file->tr; 449 struct trace_array *tr = file->tr;
@@ -696,7 +696,7 @@ static void perf_sysexit_disable(struct ftrace_event_call *call)
696static int syscall_enter_register(struct ftrace_event_call *event, 696static int syscall_enter_register(struct ftrace_event_call *event,
697 enum trace_reg type, void *data) 697 enum trace_reg type, void *data)
698{ 698{
699 struct ftrace_event_file *file = data; 699 struct trace_event_file *file = data;
700 700
701 switch (type) { 701 switch (type) {
702 case TRACE_REG_REGISTER: 702 case TRACE_REG_REGISTER:
@@ -724,7 +724,7 @@ static int syscall_enter_register(struct ftrace_event_call *event,
724static int syscall_exit_register(struct ftrace_event_call *event, 724static int syscall_exit_register(struct ftrace_event_call *event,
725 enum trace_reg type, void *data) 725 enum trace_reg type, void *data)
726{ 726{
727 struct ftrace_event_file *file = data; 727 struct trace_event_file *file = data;
728 728
729 switch (type) { 729 switch (type) {
730 case TRACE_REG_REGISTER: 730 case TRACE_REG_REGISTER:
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index c8e45d8d6a92..3f61ec4a3164 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -770,7 +770,7 @@ static void uprobe_buffer_put(struct uprobe_cpu_buffer *ucb)
770static void __uprobe_trace_func(struct trace_uprobe *tu, 770static void __uprobe_trace_func(struct trace_uprobe *tu,
771 unsigned long func, struct pt_regs *regs, 771 unsigned long func, struct pt_regs *regs,
772 struct uprobe_cpu_buffer *ucb, int dsize, 772 struct uprobe_cpu_buffer *ucb, int dsize,
773 struct ftrace_event_file *ftrace_file) 773 struct trace_event_file *trace_file)
774{ 774{
775 struct uprobe_trace_entry_head *entry; 775 struct uprobe_trace_entry_head *entry;
776 struct ring_buffer_event *event; 776 struct ring_buffer_event *event;
@@ -779,17 +779,17 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
779 int size, esize; 779 int size, esize;
780 struct ftrace_event_call *call = &tu->tp.call; 780 struct ftrace_event_call *call = &tu->tp.call;
781 781
782 WARN_ON(call != ftrace_file->event_call); 782 WARN_ON(call != trace_file->event_call);
783 783
784 if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) 784 if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE))
785 return; 785 return;
786 786
787 if (ftrace_trigger_soft_disabled(ftrace_file)) 787 if (ftrace_trigger_soft_disabled(trace_file))
788 return; 788 return;
789 789
790 esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu)); 790 esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
791 size = esize + tu->tp.size + dsize; 791 size = esize + tu->tp.size + dsize;
792 event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, 792 event = trace_event_buffer_lock_reserve(&buffer, trace_file,
793 call->event.type, size, 0, 0); 793 call->event.type, size, 0, 0);
794 if (!event) 794 if (!event)
795 return; 795 return;
@@ -806,7 +806,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
806 806
807 memcpy(data, ucb->buf, tu->tp.size + dsize); 807 memcpy(data, ucb->buf, tu->tp.size + dsize);
808 808
809 event_trigger_unlock_commit(ftrace_file, buffer, event, entry, 0, 0); 809 event_trigger_unlock_commit(trace_file, buffer, event, entry, 0, 0);
810} 810}
811 811
812/* uprobe handler */ 812/* uprobe handler */
@@ -881,7 +881,7 @@ typedef bool (*filter_func_t)(struct uprobe_consumer *self,
881 struct mm_struct *mm); 881 struct mm_struct *mm);
882 882
883static int 883static int
884probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file, 884probe_event_enable(struct trace_uprobe *tu, struct trace_event_file *file,
885 filter_func_t filter) 885 filter_func_t filter)
886{ 886{
887 bool enabled = trace_probe_is_enabled(&tu->tp); 887 bool enabled = trace_probe_is_enabled(&tu->tp);
@@ -938,7 +938,7 @@ probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file,
938} 938}
939 939
940static void 940static void
941probe_event_disable(struct trace_uprobe *tu, struct ftrace_event_file *file) 941probe_event_disable(struct trace_uprobe *tu, struct trace_event_file *file)
942{ 942{
943 if (!trace_probe_is_enabled(&tu->tp)) 943 if (!trace_probe_is_enabled(&tu->tp))
944 return; 944 return;
@@ -1163,7 +1163,7 @@ trace_uprobe_register(struct ftrace_event_call *event, enum trace_reg type,
1163 void *data) 1163 void *data)
1164{ 1164{
1165 struct trace_uprobe *tu = event->data; 1165 struct trace_uprobe *tu = event->data;
1166 struct ftrace_event_file *file = data; 1166 struct trace_event_file *file = data;
1167 1167
1168 switch (type) { 1168 switch (type) {
1169 case TRACE_REG_REGISTER: 1169 case TRACE_REG_REGISTER: