Lines Matching refs:tp
60 struct trace_probe tp; member
64 (offsetof(struct trace_uprobe, tp.args) + \
253 tu->tp.call.class = &tu->tp.class; in alloc_trace_uprobe()
254 tu->tp.call.name = kstrdup(event, GFP_KERNEL); in alloc_trace_uprobe()
255 if (!tu->tp.call.name) in alloc_trace_uprobe()
258 tu->tp.class.system = kstrdup(group, GFP_KERNEL); in alloc_trace_uprobe()
259 if (!tu->tp.class.system) in alloc_trace_uprobe()
263 INIT_LIST_HEAD(&tu->tp.files); in alloc_trace_uprobe()
271 kfree(tu->tp.call.name); in alloc_trace_uprobe()
281 for (i = 0; i < tu->tp.nr_args; i++) in free_trace_uprobe()
282 traceprobe_free_probe_arg(&tu->tp.args[i]); in free_trace_uprobe()
285 kfree(tu->tp.call.class->system); in free_trace_uprobe()
286 kfree(tu->tp.call.name); in free_trace_uprobe()
296 if (strcmp(trace_event_name(&tu->tp.call), event) == 0 && in find_probe_event()
297 strcmp(tu->tp.call.class->system, group) == 0) in find_probe_event()
326 old_tu = find_probe_event(trace_event_name(&tu->tp.call), in register_trace_uprobe()
327 tu->tp.call.class->system); in register_trace_uprobe()
500 struct probe_arg *parg = &tu->tp.args[i]; in create_trace_uprobe()
503 tu->tp.nr_args++; in create_trace_uprobe()
529 if (traceprobe_conflict_field_name(parg->name, tu->tp.args, i)) { in create_trace_uprobe()
537 ret = traceprobe_parse_probe_arg(arg, &tu->tp.size, parg, in create_trace_uprobe()
602 seq_printf(m, "%c:%s/%s", c, tu->tp.call.class->system, in probes_seq_show()
603 trace_event_name(&tu->tp.call)); in probes_seq_show()
621 for (i = 0; i < tu->tp.nr_args; i++) in probes_seq_show()
622 seq_printf(m, " %s=%s", tu->tp.args[i].name, tu->tp.args[i].comm); in probes_seq_show()
669 trace_event_name(&tu->tp.call), tu->nhit); in probes_profile_seq_show()
795 struct trace_event_call *call = &tu->tp.call; in __uprobe_trace_func()
799 if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) in __uprobe_trace_func()
806 size = esize + tu->tp.size + dsize; in __uprobe_trace_func()
822 memcpy(data, ucb->buf, tu->tp.size + dsize); in __uprobe_trace_func()
837 list_for_each_entry_rcu(link, &tu->tp.files, list) in uprobe_trace_func()
851 list_for_each_entry_rcu(link, &tu->tp.files, list) in uretprobe_trace_func()
867 tu = container_of(event, struct trace_uprobe, tp.call.event); in print_uprobe_event()
871 trace_event_name(&tu->tp.call), in print_uprobe_event()
876 trace_event_name(&tu->tp.call), in print_uprobe_event()
881 for (i = 0; i < tu->tp.nr_args; i++) { in print_uprobe_event()
882 struct probe_arg *parg = &tu->tp.args[i]; in print_uprobe_event()
902 bool enabled = trace_probe_is_enabled(&tu->tp); in probe_event_enable()
907 if (tu->tp.flags & TP_FLAG_PROFILE) in probe_event_enable()
915 list_add_tail_rcu(&link->list, &tu->tp.files); in probe_event_enable()
917 tu->tp.flags |= TP_FLAG_TRACE; in probe_event_enable()
919 if (tu->tp.flags & TP_FLAG_TRACE) in probe_event_enable()
922 tu->tp.flags |= TP_FLAG_PROFILE; in probe_event_enable()
948 tu->tp.flags &= ~TP_FLAG_TRACE; in probe_event_enable()
950 tu->tp.flags &= ~TP_FLAG_PROFILE; in probe_event_enable()
958 if (!trace_probe_is_enabled(&tu->tp)) in probe_event_disable()
964 link = find_event_file_link(&tu->tp, file); in probe_event_disable()
973 if (!list_empty(&tu->tp.files)) in probe_event_disable()
980 tu->tp.flags &= file ? ~TP_FLAG_TRACE : ~TP_FLAG_PROFILE; in probe_event_disable()
1000 for (i = 0; i < tu->tp.nr_args; i++) { in uprobe_event_define_fields()
1001 struct probe_arg *parg = &tu->tp.args[i]; in uprobe_event_define_fields()
1111 struct trace_event_call *call = &tu->tp.call; in __uprobe_perf_func()
1124 size = esize + tu->tp.size + dsize; in __uprobe_perf_func()
1147 memcpy(data, ucb->buf, tu->tp.size + dsize); in __uprobe_perf_func()
1149 if (size - esize > tu->tp.size + dsize) { in __uprobe_perf_func()
1150 int len = tu->tp.size + dsize; in __uprobe_perf_func()
1236 dsize = __get_data_size(&tu->tp, regs); in uprobe_dispatcher()
1240 store_trace_args(esize, &tu->tp, regs, ucb->buf, dsize); in uprobe_dispatcher()
1242 if (tu->tp.flags & TP_FLAG_TRACE) in uprobe_dispatcher()
1246 if (tu->tp.flags & TP_FLAG_PROFILE) in uprobe_dispatcher()
1271 dsize = __get_data_size(&tu->tp, regs); in uretprobe_dispatcher()
1275 store_trace_args(esize, &tu->tp, regs, ucb->buf, dsize); in uretprobe_dispatcher()
1277 if (tu->tp.flags & TP_FLAG_TRACE) in uretprobe_dispatcher()
1281 if (tu->tp.flags & TP_FLAG_PROFILE) in uretprobe_dispatcher()
1294 struct trace_event_call *call = &tu->tp.call; in register_uprobe_event()
1302 if (set_print_fmt(&tu->tp, is_ret_probe(tu)) < 0) in register_uprobe_event()
1331 ret = trace_remove_event_call(&tu->tp.call); in unregister_uprobe_event()
1334 kfree(tu->tp.call.print_fmt); in unregister_uprobe_event()
1335 tu->tp.call.print_fmt = NULL; in unregister_uprobe_event()