Lines Matching refs:call
92 trace_find_event_field(struct ftrace_event_call *call, char *name) in trace_find_event_field() argument
101 head = trace_get_fields(call); in trace_find_event_field()
132 int trace_define_field(struct ftrace_event_call *call, const char *type, in trace_define_field() argument
138 if (WARN_ON(!call->class)) in trace_define_field()
141 head = trace_get_fields(call); in trace_define_field()
169 static void trace_destroy_fields(struct ftrace_event_call *call) in trace_destroy_fields() argument
174 head = trace_get_fields(call); in trace_destroy_fields()
181 int trace_event_raw_init(struct ftrace_event_call *call) in trace_event_raw_init() argument
185 id = register_ftrace_event(&call->event); in trace_event_raw_init()
255 int ftrace_event_reg(struct ftrace_event_call *call, in ftrace_event_reg() argument
260 WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT)); in ftrace_event_reg()
263 return tracepoint_probe_register(call->tp, in ftrace_event_reg()
264 call->class->probe, in ftrace_event_reg()
267 tracepoint_probe_unregister(call->tp, in ftrace_event_reg()
268 call->class->probe, in ftrace_event_reg()
274 return tracepoint_probe_register(call->tp, in ftrace_event_reg()
275 call->class->perf_probe, in ftrace_event_reg()
276 call); in ftrace_event_reg()
278 tracepoint_probe_unregister(call->tp, in ftrace_event_reg()
279 call->class->perf_probe, in ftrace_event_reg()
280 call); in ftrace_event_reg()
318 struct ftrace_event_call *call = file->event_call; in __ftrace_event_enable_disable() local
351 call->class->reg(call, TRACE_REG_UNREGISTER, file); in __ftrace_event_enable_disable()
386 ret = call->class->reg(call, TRACE_REG_REGISTER, file); in __ftrace_event_enable_disable()
390 "%s\n", ftrace_event_name(call)); in __ftrace_event_enable_disable()
396 call->flags |= TRACE_EVENT_FL_WAS_ENABLED; in __ftrace_event_enable_disable()
519 struct ftrace_event_call *call; in __ftrace_set_clr_event_nolock() local
525 call = file->event_call; in __ftrace_set_clr_event_nolock()
526 name = ftrace_event_name(call); in __ftrace_set_clr_event_nolock()
528 if (!name || !call->class || !call->class->reg) in __ftrace_set_clr_event_nolock()
531 if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) in __ftrace_set_clr_event_nolock()
536 strcmp(match, call->class->system) != 0) in __ftrace_set_clr_event_nolock()
539 if (sub && strcmp(sub, call->class->system) != 0) in __ftrace_set_clr_event_nolock()
675 struct ftrace_event_call *call; in t_next() local
681 call = file->event_call; in t_next()
686 if (call->class && call->class->reg && in t_next()
687 !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in t_next()
747 struct ftrace_event_call *call = file->event_call; in t_show() local
749 if (strcmp(call->class->system, TRACE_SYSTEM) != 0) in t_show()
750 seq_printf(m, "%s:", call->class->system); in t_show()
751 seq_printf(m, "%s\n", ftrace_event_name(call)); in t_show()
834 struct ftrace_event_call *call; in system_enable_read() local
843 call = file->event_call; in system_enable_read()
844 if (!ftrace_event_name(call) || !call->class || !call->class->reg) in system_enable_read()
847 if (system && strcmp(call->class->system, system->name) != 0) in system_enable_read()
921 struct ftrace_event_call *call = event_file_data(m->private); in f_next() local
923 struct list_head *head = trace_get_fields(call); in f_next()
953 struct ftrace_event_call *call = event_file_data(m->private); in f_show() local
959 seq_printf(m, "name: %s\n", ftrace_event_name(call)); in f_show()
960 seq_printf(m, "ID: %d\n", call->event.type); in f_show()
970 call->print_fmt); in f_show()
1577 struct ftrace_event_call *call = file->event_call; in event_create_dir() local
1588 if (strcmp(call->class->system, TRACE_SYSTEM) != 0) { in event_create_dir()
1589 d_events = event_subsystem_dir(tr, call->class->system, file, parent); in event_create_dir()
1595 name = ftrace_event_name(call); in event_create_dir()
1602 if (call->class->reg && !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in event_create_dir()
1607 if (call->event.type && call->class->reg) in event_create_dir()
1609 (void *)(long)call->event.type, in event_create_dir()
1617 head = trace_get_fields(call); in event_create_dir()
1619 ret = call->class->define_fields(call); in event_create_dir()
1633 if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in event_create_dir()
1637 trace_create_file("format", 0444, file->dir, call, in event_create_dir()
1643 static void remove_event_from_tracers(struct ftrace_event_call *call) in remove_event_from_tracers() argument
1649 if (file->event_call != call) in remove_event_from_tracers()
1663 static void event_remove(struct ftrace_event_call *call) in event_remove() argument
1669 if (file->event_call != call) in event_remove()
1681 if (call->event.funcs) in event_remove()
1682 __unregister_ftrace_event(&call->event); in event_remove()
1683 remove_event_from_tracers(call); in event_remove()
1684 list_del(&call->list); in event_remove()
1687 static int event_init(struct ftrace_event_call *call) in event_init() argument
1692 name = ftrace_event_name(call); in event_init()
1696 if (call->class->raw_init) { in event_init()
1697 ret = call->class->raw_init(call); in event_init()
1706 __register_event(struct ftrace_event_call *call, struct module *mod) in __register_event() argument
1710 ret = event_init(call); in __register_event()
1714 list_add(&call->list, &ftrace_events); in __register_event()
1715 call->mod = mod; in __register_event()
1742 static void update_event_printk(struct ftrace_event_call *call, in update_event_printk() argument
1749 for (ptr = call->print_fmt; *ptr; ptr++) { in update_event_printk()
1820 struct ftrace_event_call *call, *p; in trace_event_enum_update() local
1826 list_for_each_entry_safe(call, p, &ftrace_events, list) { in trace_event_enum_update()
1828 if (!last_system || call->class->system != last_system) { in trace_event_enum_update()
1830 last_system = call->class->system; in trace_event_enum_update()
1834 if (call->class->system == map[i]->system) { in trace_event_enum_update()
1838 update_event_printk(call, map[i]); in trace_event_enum_update()
1846 trace_create_new_event(struct ftrace_event_call *call, in trace_create_new_event() argument
1855 file->event_call = call; in trace_create_new_event()
1867 __trace_add_new_event(struct ftrace_event_call *call, struct trace_array *tr) in __trace_add_new_event() argument
1871 file = trace_create_new_event(call, tr); in __trace_add_new_event()
1884 __trace_early_add_new_event(struct ftrace_event_call *call, in __trace_early_add_new_event() argument
1889 file = trace_create_new_event(call, tr); in __trace_early_add_new_event()
1897 static void __add_event_to_tracers(struct ftrace_event_call *call);
1900 int trace_add_event_call(struct ftrace_event_call *call) in trace_add_event_call() argument
1906 ret = __register_event(call, NULL); in trace_add_event_call()
1908 __add_event_to_tracers(call); in trace_add_event_call()
1919 static void __trace_remove_event_call(struct ftrace_event_call *call) in __trace_remove_event_call() argument
1921 event_remove(call); in __trace_remove_event_call()
1922 trace_destroy_fields(call); in __trace_remove_event_call()
1923 free_event_filter(call->filter); in __trace_remove_event_call()
1924 call->filter = NULL; in __trace_remove_event_call()
1927 static int probe_remove_event_call(struct ftrace_event_call *call) in probe_remove_event_call() argument
1933 if (call->perf_refcount) in probe_remove_event_call()
1937 if (file->event_call != call) in probe_remove_event_call()
1955 __trace_remove_event_call(call); in probe_remove_event_call()
1961 int trace_remove_event_call(struct ftrace_event_call *call) in trace_remove_event_call() argument
1968 ret = probe_remove_event_call(call); in trace_remove_event_call()
1985 struct ftrace_event_call **call, **start, **end; in trace_module_add_events() local
2000 for_each_event(call, start, end) { in trace_module_add_events()
2001 __register_event(*call, mod); in trace_module_add_events()
2002 __add_event_to_tracers(*call); in trace_module_add_events()
2008 struct ftrace_event_call *call, *p; in trace_module_remove_events() local
2012 list_for_each_entry_safe(call, p, &ftrace_events, list) { in trace_module_remove_events()
2013 if (call->mod == mod) { in trace_module_remove_events()
2014 if (call->flags & TRACE_EVENT_FL_WAS_ENABLED) in trace_module_remove_events()
2016 __trace_remove_event_call(call); in trace_module_remove_events()
2064 struct ftrace_event_call *call; in __trace_add_event_dirs() local
2067 list_for_each_entry(call, &ftrace_events, list) { in __trace_add_event_dirs()
2068 ret = __trace_add_new_event(call, tr); in __trace_add_event_dirs()
2071 ftrace_event_name(call)); in __trace_add_event_dirs()
2079 struct ftrace_event_call *call; in find_event_file() local
2084 call = file->event_call; in find_event_file()
2085 name = ftrace_event_name(call); in find_event_file()
2087 if (!name || !call->class || !call->class->reg) in find_event_file()
2090 if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) in find_event_file()
2094 strcmp(system, call->class->system) == 0) in find_event_file()
2397 struct ftrace_event_call *call; in __trace_early_add_events() local
2400 list_for_each_entry(call, &ftrace_events, list) { in __trace_early_add_events()
2402 if (WARN_ON_ONCE(call->mod)) in __trace_early_add_events()
2405 ret = __trace_early_add_new_event(call, tr); in __trace_early_add_events()
2408 ftrace_event_name(call)); in __trace_early_add_events()
2422 static void __add_event_to_tracers(struct ftrace_event_call *call) in __add_event_to_tracers() argument
2427 __trace_add_new_event(call, tr); in __add_event_to_tracers()
2602 struct ftrace_event_call **iter, *call; in event_trace_enable() local
2610 call = *iter; in event_trace_enable()
2611 ret = event_init(call); in event_trace_enable()
2613 list_add(&call->list, &ftrace_events); in event_trace_enable()
2765 struct ftrace_event_call *call; in event_trace_self_tests() local
2778 call = file->event_call; in event_trace_self_tests()
2781 if (!call->class || !call->class->probe) in event_trace_self_tests()
2791 if (call->class->system && in event_trace_self_tests()
2792 strcmp(call->class->system, "syscalls") == 0) in event_trace_self_tests()
2796 pr_info("Testing event %s: ", ftrace_event_name(call)); in event_trace_self_tests()