Lines Matching refs:call
95 trace_find_event_field(struct trace_event_call *call, char *name) in trace_find_event_field() argument
100 head = trace_get_fields(call); in trace_find_event_field()
139 int trace_define_field(struct trace_event_call *call, const char *type, in trace_define_field() argument
145 if (WARN_ON(!call->class)) in trace_define_field()
148 head = trace_get_fields(call); in trace_define_field()
195 static void trace_destroy_fields(struct trace_event_call *call) in trace_destroy_fields() argument
200 head = trace_get_fields(call); in trace_destroy_fields()
207 int trace_event_raw_init(struct trace_event_call *call) in trace_event_raw_init() argument
211 id = register_trace_event(&call->event); in trace_event_raw_init()
301 int trace_event_reg(struct trace_event_call *call, in trace_event_reg() argument
306 WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT)); in trace_event_reg()
309 return tracepoint_probe_register(call->tp, in trace_event_reg()
310 call->class->probe, in trace_event_reg()
313 tracepoint_probe_unregister(call->tp, in trace_event_reg()
314 call->class->probe, in trace_event_reg()
320 return tracepoint_probe_register(call->tp, in trace_event_reg()
321 call->class->perf_probe, in trace_event_reg()
322 call); in trace_event_reg()
324 tracepoint_probe_unregister(call->tp, in trace_event_reg()
325 call->class->perf_probe, in trace_event_reg()
326 call); in trace_event_reg()
364 struct trace_event_call *call = file->event_call; in __ftrace_event_enable_disable() local
398 call->class->reg(call, TRACE_REG_UNREGISTER, file); in __ftrace_event_enable_disable()
433 ret = call->class->reg(call, TRACE_REG_REGISTER, file); in __ftrace_event_enable_disable()
437 "%s\n", trace_event_name(call)); in __ftrace_event_enable_disable()
443 call->flags |= TRACE_EVENT_FL_WAS_ENABLED; in __ftrace_event_enable_disable()
707 struct trace_event_call *call; in __ftrace_set_clr_event_nolock() local
713 call = file->event_call; in __ftrace_set_clr_event_nolock()
714 name = trace_event_name(call); in __ftrace_set_clr_event_nolock()
716 if (!name || !call->class || !call->class->reg) in __ftrace_set_clr_event_nolock()
719 if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) in __ftrace_set_clr_event_nolock()
724 strcmp(match, call->class->system) != 0) in __ftrace_set_clr_event_nolock()
727 if (sub && strcmp(sub, call->class->system) != 0) in __ftrace_set_clr_event_nolock()
863 struct trace_event_call *call; in t_next() local
869 call = file->event_call; in t_next()
874 if (call->class && call->class->reg && in t_next()
875 !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in t_next()
935 struct trace_event_call *call = file->event_call; in t_show() local
937 if (strcmp(call->class->system, TRACE_SYSTEM) != 0) in t_show()
938 seq_printf(m, "%s:", call->class->system); in t_show()
939 seq_printf(m, "%s\n", trace_event_name(call)); in t_show()
1074 struct trace_event_call *call; in system_enable_read() local
1083 call = file->event_call; in system_enable_read()
1084 if (!trace_event_name(call) || !call->class || !call->class->reg) in system_enable_read()
1087 if (system && strcmp(call->class->system, system->name) != 0) in system_enable_read()
1161 struct trace_event_call *call = event_file_data(m->private); in f_next() local
1163 struct list_head *head = trace_get_fields(call); in f_next()
1193 struct trace_event_call *call = event_file_data(m->private); in f_show() local
1199 seq_printf(m, "name: %s\n", trace_event_name(call)); in f_show()
1200 seq_printf(m, "ID: %d\n", call->event.type); in f_show()
1210 call->print_fmt); in f_show()
2058 struct trace_event_call *call = file->event_call; in event_create_dir() local
2069 if (strcmp(call->class->system, TRACE_SYSTEM) != 0) { in event_create_dir()
2070 d_events = event_subsystem_dir(tr, call->class->system, file, parent); in event_create_dir()
2076 name = trace_event_name(call); in event_create_dir()
2083 if (call->class->reg && !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in event_create_dir()
2088 if (call->event.type && call->class->reg) in event_create_dir()
2090 (void *)(long)call->event.type, in event_create_dir()
2098 head = trace_get_fields(call); in event_create_dir()
2100 ret = call->class->define_fields(call); in event_create_dir()
2114 if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) in event_create_dir()
2118 trace_create_file("format", 0444, file->dir, call, in event_create_dir()
2124 static void remove_event_from_tracers(struct trace_event_call *call) in remove_event_from_tracers() argument
2130 if (file->event_call != call) in remove_event_from_tracers()
2144 static void event_remove(struct trace_event_call *call) in event_remove() argument
2150 if (file->event_call != call) in event_remove()
2162 if (call->event.funcs) in event_remove()
2163 __unregister_trace_event(&call->event); in event_remove()
2164 remove_event_from_tracers(call); in event_remove()
2165 list_del(&call->list); in event_remove()
2168 static int event_init(struct trace_event_call *call) in event_init() argument
2173 name = trace_event_name(call); in event_init()
2177 if (call->class->raw_init) { in event_init()
2178 ret = call->class->raw_init(call); in event_init()
2187 __register_event(struct trace_event_call *call, struct module *mod) in __register_event() argument
2191 ret = event_init(call); in __register_event()
2195 list_add(&call->list, &ftrace_events); in __register_event()
2196 call->mod = mod; in __register_event()
2223 static void update_event_printk(struct trace_event_call *call, in update_event_printk() argument
2230 for (ptr = call->print_fmt; *ptr; ptr++) { in update_event_printk()
2301 struct trace_event_call *call, *p; in trace_event_enum_update() local
2307 list_for_each_entry_safe(call, p, &ftrace_events, list) { in trace_event_enum_update()
2309 if (!last_system || call->class->system != last_system) { in trace_event_enum_update()
2311 last_system = call->class->system; in trace_event_enum_update()
2315 if (call->class->system == map[i]->system) { in trace_event_enum_update()
2319 update_event_printk(call, map[i]); in trace_event_enum_update()
2327 trace_create_new_event(struct trace_event_call *call, in trace_create_new_event() argument
2336 file->event_call = call; in trace_create_new_event()
2348 __trace_add_new_event(struct trace_event_call *call, struct trace_array *tr) in __trace_add_new_event() argument
2352 file = trace_create_new_event(call, tr); in __trace_add_new_event()
2365 __trace_early_add_new_event(struct trace_event_call *call, in __trace_early_add_new_event() argument
2370 file = trace_create_new_event(call, tr); in __trace_early_add_new_event()
2378 static void __add_event_to_tracers(struct trace_event_call *call);
2381 int trace_add_event_call(struct trace_event_call *call) in trace_add_event_call() argument
2387 ret = __register_event(call, NULL); in trace_add_event_call()
2389 __add_event_to_tracers(call); in trace_add_event_call()
2400 static void __trace_remove_event_call(struct trace_event_call *call) in __trace_remove_event_call() argument
2402 event_remove(call); in __trace_remove_event_call()
2403 trace_destroy_fields(call); in __trace_remove_event_call()
2404 free_event_filter(call->filter); in __trace_remove_event_call()
2405 call->filter = NULL; in __trace_remove_event_call()
2408 static int probe_remove_event_call(struct trace_event_call *call) in probe_remove_event_call() argument
2414 if (call->perf_refcount) in probe_remove_event_call()
2418 if (file->event_call != call) in probe_remove_event_call()
2436 __trace_remove_event_call(call); in probe_remove_event_call()
2442 int trace_remove_event_call(struct trace_event_call *call) in trace_remove_event_call() argument
2449 ret = probe_remove_event_call(call); in trace_remove_event_call()
2466 struct trace_event_call **call, **start, **end; in trace_module_add_events() local
2481 for_each_event(call, start, end) { in trace_module_add_events()
2482 __register_event(*call, mod); in trace_module_add_events()
2483 __add_event_to_tracers(*call); in trace_module_add_events()
2489 struct trace_event_call *call, *p; in trace_module_remove_events() local
2493 list_for_each_entry_safe(call, p, &ftrace_events, list) { in trace_module_remove_events()
2494 if (call->mod == mod) { in trace_module_remove_events()
2495 if (call->flags & TRACE_EVENT_FL_WAS_ENABLED) in trace_module_remove_events()
2497 __trace_remove_event_call(call); in trace_module_remove_events()
2545 struct trace_event_call *call; in __trace_add_event_dirs() local
2548 list_for_each_entry(call, &ftrace_events, list) { in __trace_add_event_dirs()
2549 ret = __trace_add_new_event(call, tr); in __trace_add_event_dirs()
2552 trace_event_name(call)); in __trace_add_event_dirs()
2560 struct trace_event_call *call; in find_event_file() local
2565 call = file->event_call; in find_event_file()
2566 name = trace_event_name(call); in find_event_file()
2568 if (!name || !call->class || !call->class->reg) in find_event_file()
2571 if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) in find_event_file()
2575 strcmp(system, call->class->system) == 0) in find_event_file()
2878 struct trace_event_call *call; in __trace_early_add_events() local
2881 list_for_each_entry(call, &ftrace_events, list) { in __trace_early_add_events()
2883 if (WARN_ON_ONCE(call->mod)) in __trace_early_add_events()
2886 ret = __trace_early_add_new_event(call, tr); in __trace_early_add_events()
2889 trace_event_name(call)); in __trace_early_add_events()
2903 static void __add_event_to_tracers(struct trace_event_call *call) in __add_event_to_tracers() argument
2908 __trace_add_new_event(call, tr); in __add_event_to_tracers()
3089 struct trace_event_call **iter, *call; in event_trace_enable() local
3097 call = *iter; in event_trace_enable()
3098 ret = event_init(call); in event_trace_enable()
3100 list_add(&call->list, &ftrace_events); in event_trace_enable()
3255 struct trace_event_call *call; in event_trace_self_tests() local
3268 call = file->event_call; in event_trace_self_tests()
3271 if (!call->class || !call->class->probe) in event_trace_self_tests()
3281 if (call->class->system && in event_trace_self_tests()
3282 strcmp(call->class->system, "syscalls") == 0) in event_trace_self_tests()
3286 pr_info("Testing event %s: ", trace_event_name(call)); in event_trace_self_tests()