- switch (itype) {
- case INSTRUM_TRACEPOINTS:
- ret = tracepoint_probe_register(name, event_desc->probe_callback,
- event);
+ switch (event_param->instrumentation) {
+ case LTTNG_KERNEL_TRACEPOINTS:
+ event->desc = ltt_event_get(event_param->name);
+ if (!event->desc)
+ goto register_error;
+ ret = tracepoint_probe_register(event_param->name,
+ event->desc->probe_callback,
+ event);
+ if (ret)
+ goto register_error;
+ break;
+ case LTTNG_KERNEL_KPROBES:
+ ret = lttng_kprobes_register(event_param->name,
+ event_param->u.kprobe.symbol_name,
+ event_param->u.kprobe.offset,
+ event_param->u.kprobe.addr,
+ event);
+ if (ret)
+ goto register_error;
+ break;
+ case LTTNG_KERNEL_FUNCTION_TRACER:
+ ret = lttng_ftrace_register(event_param->name,
+ event_param->u.ftrace.symbol_name,
+ event);