Lines Matching full:ep
41 struct trace_eprobe *ep; member
45 #define for_each_trace_eprobe_tp(ep, _tp) \ argument
46 list_for_each_entry(ep, trace_probe_probe_list(_tp), tp.list)
50 static void trace_event_probe_cleanup(struct trace_eprobe *ep) in trace_event_probe_cleanup() argument
52 if (!ep) in trace_event_probe_cleanup()
54 trace_probe_cleanup(&ep->tp); in trace_event_probe_cleanup()
55 kfree(ep->event_name); in trace_event_probe_cleanup()
56 kfree(ep->event_system); in trace_event_probe_cleanup()
57 if (ep->event) in trace_event_probe_cleanup()
58 trace_event_put_ref(ep->event); in trace_event_probe_cleanup()
59 kfree(ep->filter_str); in trace_event_probe_cleanup()
60 kfree(ep); in trace_event_probe_cleanup()
75 struct trace_eprobe *ep = to_trace_eprobe(ev); in eprobe_dyn_event_show() local
78 seq_printf(m, "e:%s/%s", trace_probe_group_name(&ep->tp), in eprobe_dyn_event_show()
79 trace_probe_name(&ep->tp)); in eprobe_dyn_event_show()
80 seq_printf(m, " %s.%s", ep->event_system, ep->event_name); in eprobe_dyn_event_show()
82 for (i = 0; i < ep->tp.nr_args; i++) in eprobe_dyn_event_show()
83 seq_printf(m, " %s=%s", ep->tp.args[i].name, ep->tp.args[i].comm); in eprobe_dyn_event_show()
89 static int unregister_trace_eprobe(struct trace_eprobe *ep) in unregister_trace_eprobe() argument
92 if (trace_probe_has_sibling(&ep->tp)) in unregister_trace_eprobe()
96 if (trace_probe_is_enabled(&ep->tp)) in unregister_trace_eprobe()
100 if (trace_probe_unregister_event_call(&ep->tp)) in unregister_trace_eprobe()
104 dyn_event_remove(&ep->devent); in unregister_trace_eprobe()
105 trace_probe_unlink(&ep->tp); in unregister_trace_eprobe()
112 struct trace_eprobe *ep = to_trace_eprobe(ev); in eprobe_dyn_event_release() local
113 int ret = unregister_trace_eprobe(ep); in eprobe_dyn_event_release()
116 trace_event_probe_cleanup(ep); in eprobe_dyn_event_release()
122 struct trace_eprobe *ep = to_trace_eprobe(ev); in eprobe_dyn_event_is_busy() local
124 return trace_probe_is_enabled(&ep->tp); in eprobe_dyn_event_is_busy()
130 struct trace_eprobe *ep = to_trace_eprobe(ev); in eprobe_dyn_event_match() local
152 if (system && strcmp(trace_probe_group_name(&ep->tp), system) != 0) in eprobe_dyn_event_match()
156 if (event[0] != '\0' && strcmp(trace_probe_name(&ep->tp), event) != 0) in eprobe_dyn_event_match()
171 if (strncmp(ep->event_system, argv[0], slash - argv[0])) in eprobe_dyn_event_match()
173 if (strcmp(ep->event_name, slash + 1)) in eprobe_dyn_event_match()
183 return trace_probe_match_command_args(&ep->tp, argc, argv); in eprobe_dyn_event_match()
199 struct trace_eprobe *ep; in alloc_event_probe() local
210 ep = kzalloc(struct_size(ep, tp.args, nargs), GFP_KERNEL); in alloc_event_probe()
211 if (!ep) { in alloc_event_probe()
215 ep->event = event; in alloc_event_probe()
216 ep->event_name = kstrdup(event_name, GFP_KERNEL); in alloc_event_probe()
217 if (!ep->event_name) in alloc_event_probe()
219 ep->event_system = kstrdup(sys_name, GFP_KERNEL); in alloc_event_probe()
220 if (!ep->event_system) in alloc_event_probe()
223 ret = trace_probe_init(&ep->tp, this_event, group, false, nargs); in alloc_event_probe()
227 dyn_event_init(&ep->devent, &eprobe_dyn_event_ops); in alloc_event_probe()
228 return ep; in alloc_event_probe()
230 trace_event_probe_cleanup(ep); in alloc_event_probe()
261 struct trace_eprobe *ep; in print_eprobe_event() local
271 ep = container_of(tp, struct trace_eprobe, tp); in print_eprobe_event()
272 type = ep->event->event.type; in print_eprobe_event()
422 struct trace_event_call *call = trace_probe_event_call(&edata->ep->tp); in NOKPROBE_SYMBOL()
432 dsize = get_eprobe_size(&edata->ep->tp, rec); in NOKPROBE_SYMBOL()
435 sizeof(*entry) + edata->ep->tp.size + dsize); in NOKPROBE_SYMBOL()
441 store_trace_args(&entry[1], &edata->ep->tp, rec, NULL, sizeof(*entry), dsize); in NOKPROBE_SYMBOL()
529 new_eprobe_trigger(struct trace_eprobe *ep, struct trace_event_file *file) in new_eprobe_trigger() argument
556 if (ep->filter_str) { in new_eprobe_trigger()
557 ret = create_event_filter(file->tr, ep->event, in new_eprobe_trigger()
558 ep->filter_str, false, &filter); in new_eprobe_trigger()
565 edata->ep = ep; in new_eprobe_trigger()
576 static int enable_eprobe(struct trace_eprobe *ep, in enable_eprobe() argument
583 file = find_event_file(tr, ep->event_system, ep->event_name); in enable_eprobe()
586 trigger = new_eprobe_trigger(ep, eprobe_file); in enable_eprobe()
602 static int disable_eprobe(struct trace_eprobe *ep, in disable_eprobe() argument
610 file = find_event_file(tr, ep->event_system, ep->event_name); in disable_eprobe()
618 if (edata->ep == ep) { in disable_eprobe()
648 struct trace_eprobe *ep; in enable_trace_eprobe() local
669 for_each_trace_eprobe_tp(ep, tp) { in enable_trace_eprobe()
670 ret = enable_eprobe(ep, file); in enable_trace_eprobe()
686 for_each_trace_eprobe_tp(ep, tp) { in enable_trace_eprobe()
687 disable_eprobe(ep, file->tr); in enable_trace_eprobe()
705 struct trace_eprobe *ep; in disable_trace_eprobe() local
721 for_each_trace_eprobe_tp(ep, tp) in disable_trace_eprobe()
722 disable_eprobe(ep, file->tr); in disable_trace_eprobe()
761 static inline void init_trace_eprobe_call(struct trace_eprobe *ep) in init_trace_eprobe_call() argument
763 struct trace_event_call *call = trace_probe_event_call(&ep->tp); in init_trace_eprobe_call()
798 static int trace_eprobe_tp_update_arg(struct trace_eprobe *ep, const char *argv[], int i) in trace_eprobe_tp_update_arg() argument
801 .event = ep->event, in trace_eprobe_tp_update_arg()
806 ret = traceprobe_parse_probe_arg(&ep->tp, i, argv[i], &ctx); in trace_eprobe_tp_update_arg()
809 ret = traceprobe_update_arg(&ep->tp.args[i]); in trace_eprobe_tp_update_arg()
815 static int trace_eprobe_parse_filter(struct trace_eprobe *ep, int argc, const char *argv[]) in trace_eprobe_parse_filter() argument
830 ep->filter_str = kzalloc(len, GFP_KERNEL); in trace_eprobe_parse_filter()
831 if (!ep->filter_str) in trace_eprobe_parse_filter()
834 p = ep->filter_str; in trace_eprobe_parse_filter()
848 ret = create_event_filter(top_trace_array(), ep->event, ep->filter_str, in trace_eprobe_parse_filter()
856 kfree(ep->filter_str); in trace_eprobe_parse_filter()
857 ep->filter_str = NULL; in trace_eprobe_parse_filter()
872 struct trace_eprobe *ep = NULL; in __trace_eprobe_create() local
922 ep = alloc_event_probe(group, event, event_call, argc - 2); in __trace_eprobe_create()
925 if (IS_ERR(ep)) { in __trace_eprobe_create()
926 ret = PTR_ERR(ep); in __trace_eprobe_create()
931 ep = NULL; in __trace_eprobe_create()
937 ret = trace_eprobe_parse_filter(ep, filter_cnt, argv + filter_idx); in __trace_eprobe_create()
941 ep->filter_str = NULL; in __trace_eprobe_create()
947 ret = trace_eprobe_tp_update_arg(ep, argv, i); in __trace_eprobe_create()
951 ret = traceprobe_set_print_fmt(&ep->tp, PROBE_PRINT_EVENT); in __trace_eprobe_create()
954 init_trace_eprobe_call(ep); in __trace_eprobe_create()
956 ret = trace_probe_register_event_call(&ep->tp); in __trace_eprobe_create()
965 ret = dyn_event_add(&ep->devent, &ep->tp.event->call); in __trace_eprobe_create()
967 trace_probe_unregister_event_call(&ep->tp); in __trace_eprobe_create()
976 trace_event_probe_cleanup(ep); in __trace_eprobe_create()