• Home
  • Raw
  • Download

Lines Matching refs:data

20 void trigger_data_free(struct event_trigger_data *data)  in trigger_data_free()  argument
22 if (data->cmd_ops->set_filter) in trigger_data_free()
23 data->cmd_ops->set_filter(NULL, data, NULL); in trigger_data_free()
28 kfree(data); in trigger_data_free()
60 struct event_trigger_data *data; in event_triggers_call() local
67 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call()
68 if (data->paused) in event_triggers_call()
71 data->ops->trigger(data, buffer, rec, event); in event_triggers_call()
74 filter = rcu_dereference_sched(data->filter); in event_triggers_call()
77 if (event_command_post_trigger(data->cmd_ops)) { in event_triggers_call()
78 tt |= data->cmd_ops->trigger_type; in event_triggers_call()
81 data->ops->trigger(data, buffer, rec, event); in event_triggers_call()
117 struct event_trigger_data *data; in event_triggers_post_call() local
119 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call()
120 if (data->paused) in event_triggers_post_call()
122 if (data->cmd_ops->trigger_type & tt) in event_triggers_post_call()
123 data->ops->trigger(data, NULL, NULL, NULL); in event_triggers_post_call()
143 struct event_trigger_data *data; in check_user_trigger() local
145 list_for_each_entry_rcu(data, &file->triggers, list, in check_user_trigger()
147 if (data->flags & EVENT_TRIGGER_FL_PROBE) in check_user_trigger()
177 struct event_trigger_data *data; in trigger_show() local
191 data = list_entry(v, struct event_trigger_data, list); in trigger_show()
192 data->ops->print(m, data); in trigger_show()
415 void *data, char *filter_str) in event_trigger_print() argument
417 long count = (long)data; in event_trigger_print()
445 int event_trigger_init(struct event_trigger_data *data) in event_trigger_init() argument
447 data->ref++; in event_trigger_init()
461 event_trigger_free(struct event_trigger_data *data) in event_trigger_free() argument
463 if (WARN_ON_ONCE(data->ref <= 0)) in event_trigger_free()
466 data->ref--; in event_trigger_free()
467 if (!data->ref) in event_trigger_free()
468 trigger_data_free(data); in event_trigger_free()
510 struct event_trigger_data *data, *n; in clear_event_triggers() local
511 list_for_each_entry_safe(data, n, &file->triggers, list) { in clear_event_triggers()
513 list_del_rcu(&data->list); in clear_event_triggers()
514 if (data->ops->free) in clear_event_triggers()
515 data->ops->free(data); in clear_event_triggers()
532 struct event_trigger_data *data; in update_cond_flag() local
537 list_for_each_entry(data, &file->triggers, list) { in update_cond_flag()
538 if (data->filter || event_command_post_trigger(data->cmd_ops) || in update_cond_flag()
539 event_command_needs_rec(data->cmd_ops)) { in update_cond_flag()
565 struct event_trigger_data *data, in register_trigger() argument
574 if (test->cmd_ops->trigger_type == data->cmd_ops->trigger_type) { in register_trigger()
580 if (data->ops->init) { in register_trigger()
581 ret = data->ops->init(data); in register_trigger()
586 list_add_rcu(&data->list, &file->triggers); in register_trigger()
591 list_del_rcu(&data->list); in register_trigger()
613 struct event_trigger_data *data = NULL, *iter; in unregister_trigger() local
619 data = iter; in unregister_trigger()
620 list_del_rcu(&data->list); in unregister_trigger()
627 if (data && data->ops->free) in unregister_trigger()
628 data->ops->free(data); in unregister_trigger()
1052 struct event_trigger_data *data = trigger_data; in set_trigger_filter() local
1076 tmp = rcu_access_pointer(data->filter); in set_trigger_filter()
1078 rcu_assign_pointer(data->filter, filter); in set_trigger_filter()
1086 kfree(data->filter_str); in set_trigger_filter()
1087 data->filter_str = NULL; in set_trigger_filter()
1090 data->filter_str = kstrdup(filter_str, GFP_KERNEL); in set_trigger_filter()
1091 if (!data->filter_str) { in set_trigger_filter()
1092 free_event_filter(rcu_access_pointer(data->filter)); in set_trigger_filter()
1093 data->filter = NULL; in set_trigger_filter()
1119 struct event_trigger_data *data; in find_named_trigger() local
1124 list_for_each_entry(data, &named_triggers, named_list) { in find_named_trigger()
1125 if (data->named_data) in find_named_trigger()
1127 if (strcmp(data->name, name) == 0) in find_named_trigger()
1128 return data; in find_named_trigger()
1142 struct event_trigger_data *data; in is_named_trigger() local
1144 list_for_each_entry(data, &named_triggers, named_list) { in is_named_trigger()
1145 if (test == data) in is_named_trigger()
1159 int save_named_trigger(const char *name, struct event_trigger_data *data) in save_named_trigger() argument
1161 data->name = kstrdup(name, GFP_KERNEL); in save_named_trigger()
1162 if (!data->name) in save_named_trigger()
1165 list_add(&data->named_list, &named_triggers); in save_named_trigger()
1174 void del_named_trigger(struct event_trigger_data *data) in del_named_trigger() argument
1176 kfree(data->name); in del_named_trigger()
1177 data->name = NULL; in del_named_trigger()
1179 list_del(&data->named_list); in del_named_trigger()
1182 static void __pause_named_trigger(struct event_trigger_data *data, bool pause) in __pause_named_trigger() argument
1187 if (strcmp(test->name, data->name) == 0) { in __pause_named_trigger()
1207 void pause_named_trigger(struct event_trigger_data *data) in pause_named_trigger() argument
1209 __pause_named_trigger(data, true); in pause_named_trigger()
1221 void unpause_named_trigger(struct event_trigger_data *data) in unpause_named_trigger() argument
1223 __pause_named_trigger(data, false); in unpause_named_trigger()
1238 void set_named_trigger_data(struct event_trigger_data *data, in set_named_trigger_data() argument
1241 data->named_data = named_data; in set_named_trigger_data()
1245 get_named_trigger_data(struct event_trigger_data *data) in get_named_trigger_data() argument
1247 return data->named_data; in get_named_trigger_data()
1251 traceon_trigger(struct event_trigger_data *data, in traceon_trigger() argument
1255 struct trace_event_file *file = data->private_data; in traceon_trigger()
1272 traceon_count_trigger(struct event_trigger_data *data, in traceon_count_trigger() argument
1276 struct trace_event_file *file = data->private_data; in traceon_count_trigger()
1286 if (!data->count) in traceon_count_trigger()
1289 if (data->count != -1) in traceon_count_trigger()
1290 (data->count)--; in traceon_count_trigger()
1299 traceoff_trigger(struct event_trigger_data *data, in traceoff_trigger() argument
1303 struct trace_event_file *file = data->private_data; in traceoff_trigger()
1320 traceoff_count_trigger(struct event_trigger_data *data, in traceoff_count_trigger() argument
1324 struct trace_event_file *file = data->private_data; in traceoff_count_trigger()
1334 if (!data->count) in traceoff_count_trigger()
1337 if (data->count != -1) in traceoff_count_trigger()
1338 (data->count)--; in traceoff_count_trigger()
1347 traceon_trigger_print(struct seq_file *m, struct event_trigger_data *data) in traceon_trigger_print() argument
1349 return event_trigger_print("traceon", m, (void *)data->count, in traceon_trigger_print()
1350 data->filter_str); in traceon_trigger_print()
1354 traceoff_trigger_print(struct seq_file *m, struct event_trigger_data *data) in traceoff_trigger_print() argument
1356 return event_trigger_print("traceoff", m, (void *)data->count, in traceoff_trigger_print()
1357 data->filter_str); in traceoff_trigger_print()
1427 snapshot_trigger(struct event_trigger_data *data, in snapshot_trigger() argument
1431 struct trace_event_file *file = data->private_data; in snapshot_trigger()
1440 snapshot_count_trigger(struct event_trigger_data *data, in snapshot_count_trigger() argument
1444 if (!data->count) in snapshot_count_trigger()
1447 if (data->count != -1) in snapshot_count_trigger()
1448 (data->count)--; in snapshot_count_trigger()
1450 snapshot_trigger(data, buffer, rec, event); in snapshot_count_trigger()
1455 struct event_trigger_data *data, in register_snapshot_trigger() argument
1463 return register_trigger(glob, data, file); in register_snapshot_trigger()
1467 snapshot_trigger_print(struct seq_file *m, struct event_trigger_data *data) in snapshot_trigger_print() argument
1469 return event_trigger_print("snapshot", m, (void *)data->count, in snapshot_trigger_print()
1470 data->filter_str); in snapshot_trigger_print()
1535 stacktrace_trigger(struct event_trigger_data *data, in stacktrace_trigger() argument
1539 struct trace_event_file *file = data->private_data; in stacktrace_trigger()
1548 stacktrace_count_trigger(struct event_trigger_data *data, in stacktrace_count_trigger() argument
1552 if (!data->count) in stacktrace_count_trigger()
1555 if (data->count != -1) in stacktrace_count_trigger()
1556 (data->count)--; in stacktrace_count_trigger()
1558 stacktrace_trigger(data, buffer, rec, event); in stacktrace_count_trigger()
1562 stacktrace_trigger_print(struct seq_file *m, struct event_trigger_data *data) in stacktrace_trigger_print() argument
1564 return event_trigger_print("stacktrace", m, (void *)data->count, in stacktrace_trigger_print()
1565 data->filter_str); in stacktrace_trigger_print()
1619 event_enable_trigger(struct event_trigger_data *data, in event_enable_trigger() argument
1623 struct enable_trigger_data *enable_data = data->private_data; in event_enable_trigger()
1632 event_enable_count_trigger(struct event_trigger_data *data, in event_enable_count_trigger() argument
1636 struct enable_trigger_data *enable_data = data->private_data; in event_enable_count_trigger()
1638 if (!data->count) in event_enable_count_trigger()
1645 if (data->count != -1) in event_enable_count_trigger()
1646 (data->count)--; in event_enable_count_trigger()
1648 event_enable_trigger(data, buffer, rec, event); in event_enable_count_trigger()
1652 struct event_trigger_data *data) in event_enable_trigger_print() argument
1654 struct enable_trigger_data *enable_data = data->private_data; in event_enable_trigger_print()
1663 if (data->count == -1) in event_enable_trigger_print()
1666 seq_printf(m, ":count=%ld", data->count); in event_enable_trigger_print()
1668 if (data->filter_str) in event_enable_trigger_print()
1669 seq_printf(m, " if %s\n", data->filter_str); in event_enable_trigger_print()
1676 void event_enable_trigger_free(struct event_trigger_data *data) in event_enable_trigger_free() argument
1678 struct enable_trigger_data *enable_data = data->private_data; in event_enable_trigger_free()
1680 if (WARN_ON_ONCE(data->ref <= 0)) in event_enable_trigger_free()
1683 data->ref--; in event_enable_trigger_free()
1684 if (!data->ref) { in event_enable_trigger_free()
1688 trigger_data_free(data); in event_enable_trigger_free()
1831 struct event_trigger_data *data, in event_enable_register_trigger() argument
1834 struct enable_trigger_data *enable_data = data->private_data; in event_enable_register_trigger()
1845 data->cmd_ops->trigger_type) && in event_enable_register_trigger()
1852 if (data->ops->init) { in event_enable_register_trigger()
1853 ret = data->ops->init(data); in event_enable_register_trigger()
1858 list_add_rcu(&data->list, &file->triggers); in event_enable_register_trigger()
1863 list_del_rcu(&data->list); in event_enable_register_trigger()
1875 struct event_trigger_data *data = NULL, *iter; in event_enable_unregister_trigger() local
1886 data = iter; in event_enable_unregister_trigger()
1887 list_del_rcu(&data->list); in event_enable_unregister_trigger()
1894 if (data && data->ops->free) in event_enable_unregister_trigger()
1895 data->ops->free(data); in event_enable_unregister_trigger()