• Home
  • Raw
  • Download

Lines Matching refs:file

56 event_triggers_call(struct trace_event_file *file, void *rec,  in event_triggers_call()  argument
63 if (list_empty(&file->triggers)) in event_triggers_call()
66 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call()
99 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument
104 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call()
175 static int event_trigger_regex_open(struct inode *inode, struct file *file) in event_trigger_regex_open() argument
185 if (unlikely(!event_file_data(file))) { in event_trigger_regex_open()
190 if ((file->f_mode & FMODE_WRITE) && in event_trigger_regex_open()
191 (file->f_flags & O_TRUNC)) { in event_trigger_regex_open()
195 event_file = event_file_data(file); in event_trigger_regex_open()
203 if (file->f_mode & FMODE_READ) { in event_trigger_regex_open()
204 ret = seq_open(file, &event_triggers_seq_ops); in event_trigger_regex_open()
206 struct seq_file *m = file->private_data; in event_trigger_regex_open()
207 m->private = file; in event_trigger_regex_open()
216 static int trigger_process_regex(struct trace_event_file *file, char *buff) in trigger_process_regex() argument
228 ret = p->func(p, file, buff, command, next); in trigger_process_regex()
238 static ssize_t event_trigger_regex_write(struct file *file, in event_trigger_regex_write() argument
259 event_file = event_file_data(file); in event_trigger_regex_write()
278 static int event_trigger_regex_release(struct inode *inode, struct file *file) in event_trigger_regex_release() argument
282 if (file->f_mode & FMODE_READ) in event_trigger_regex_release()
283 seq_release(inode, file); in event_trigger_regex_release()
291 event_trigger_write(struct file *filp, const char __user *ubuf, in event_trigger_write()
298 event_trigger_open(struct inode *inode, struct file *filp) in event_trigger_open()
305 event_trigger_release(struct inode *inode, struct file *file) in event_trigger_release() argument
307 return event_trigger_regex_release(inode, file); in event_trigger_release()
440 int trace_event_trigger_enable_disable(struct trace_event_file *file, in trace_event_trigger_enable_disable() argument
446 if (atomic_inc_return(&file->tm_ref) > 1) in trace_event_trigger_enable_disable()
448 set_bit(EVENT_FILE_FL_TRIGGER_MODE_BIT, &file->flags); in trace_event_trigger_enable_disable()
449 ret = trace_event_enable_disable(file, 1, 1); in trace_event_trigger_enable_disable()
451 if (atomic_dec_return(&file->tm_ref) > 0) in trace_event_trigger_enable_disable()
453 clear_bit(EVENT_FILE_FL_TRIGGER_MODE_BIT, &file->flags); in trace_event_trigger_enable_disable()
454 ret = trace_event_enable_disable(file, 0, 1); in trace_event_trigger_enable_disable()
476 struct trace_event_file *file; in clear_event_triggers() local
478 list_for_each_entry(file, &tr->events, list) { in clear_event_triggers()
480 list_for_each_entry_safe(data, n, &file->triggers, list) { in clear_event_triggers()
481 trace_event_trigger_enable_disable(file, 0); in clear_event_triggers()
499 void update_cond_flag(struct trace_event_file *file) in update_cond_flag() argument
506 list_for_each_entry(data, &file->triggers, list) { in update_cond_flag()
515 set_bit(EVENT_FILE_FL_TRIGGER_COND_BIT, &file->flags); in update_cond_flag()
517 clear_bit(EVENT_FILE_FL_TRIGGER_COND_BIT, &file->flags); in update_cond_flag()
536 struct trace_event_file *file) in register_trigger() argument
543 list_for_each_entry(test, &file->triggers, list) { in register_trigger()
556 list_add_rcu(&data->list, &file->triggers); in register_trigger()
559 update_cond_flag(file); in register_trigger()
560 if (trace_event_trigger_enable_disable(file, 1) < 0) { in register_trigger()
562 update_cond_flag(file); in register_trigger()
583 struct trace_event_file *file) in unregister_trigger() argument
590 list_for_each_entry(data, &file->triggers, list) { in unregister_trigger()
594 trace_event_trigger_enable_disable(file, 0); in unregister_trigger()
595 update_cond_flag(file); in unregister_trigger()
622 struct trace_event_file *file, in event_trigger_callback() argument
645 trigger_data->private_data = file; in event_trigger_callback()
650 cmd_ops->unreg(glob+1, trigger_ops, trigger_data, file); in event_trigger_callback()
678 ret = cmd_ops->set_filter(param, trigger_data, file); in event_trigger_callback()
685 ret = cmd_ops->reg(glob, trigger_ops, trigger_data, file); in event_trigger_callback()
692 cmd_ops->unreg(glob, trigger_ops, trigger_data, file); in event_trigger_callback()
727 struct trace_event_file *file) in set_trigger_filter() argument
746 ret = create_event_filter(file->tr, file->event_call, in set_trigger_filter()
1064 struct trace_event_file *file = data->private_data; in snapshot_trigger() local
1066 if (file) in snapshot_trigger()
1067 tracing_snapshot_instance(file->tr); in snapshot_trigger()
1088 struct trace_event_file *file) in register_snapshot_trigger() argument
1090 int ret = register_trigger(glob, ops, data, file); in register_snapshot_trigger()
1092 if (ret > 0 && tracing_alloc_snapshot_instance(file->tr) != 0) { in register_snapshot_trigger()
1093 unregister_trigger(glob, ops, data, file); in register_snapshot_trigger()
1254 clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &enable_data->file->flags); in event_enable_trigger()
1256 set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &enable_data->file->flags); in event_enable_trigger()
1269 if (enable_data->enable == !(enable_data->file->flags & EVENT_FILE_FL_SOFT_DISABLED)) in event_enable_count_trigger()
1288 enable_data->file->event_call->class->system, in event_enable_trigger_print()
1289 trace_event_name(enable_data->file->event_call)); in event_enable_trigger_print()
1315 trace_event_enable_disable(enable_data->file, 0, 1); in event_enable_trigger_free()
1316 module_put(enable_data->file->event_call->mod); in event_enable_trigger_free()
1351 struct trace_event_file *file, in event_enable_trigger_func() argument
1358 struct trace_array *tr = file->tr; in event_enable_trigger_func()
1416 enable_data->file = event_enable_file; in event_enable_trigger_func()
1420 cmd_ops->unreg(glob+1, trigger_ops, trigger_data, file); in event_enable_trigger_func()
1452 ret = cmd_ops->set_filter(param, trigger_data, file); in event_enable_trigger_func()
1467 ret = cmd_ops->reg(glob, trigger_ops, trigger_data, file); in event_enable_trigger_func()
1499 struct trace_event_file *file) in event_enable_register_trigger() argument
1508 list_for_each_entry(test, &file->triggers, list) { in event_enable_register_trigger()
1513 (test_enable_data->file == enable_data->file)) { in event_enable_register_trigger()
1525 list_add_rcu(&data->list, &file->triggers); in event_enable_register_trigger()
1528 update_cond_flag(file); in event_enable_register_trigger()
1529 if (trace_event_trigger_enable_disable(file, 1) < 0) { in event_enable_register_trigger()
1531 update_cond_flag(file); in event_enable_register_trigger()
1541 struct trace_event_file *file) in event_enable_unregister_trigger() argument
1550 list_for_each_entry(data, &file->triggers, list) { in event_enable_unregister_trigger()
1555 (enable_data->file == test_enable_data->file)) { in event_enable_unregister_trigger()
1558 trace_event_trigger_enable_disable(file, 0); in event_enable_unregister_trigger()
1559 update_cond_flag(file); in event_enable_unregister_trigger()