Fix handling of sessiond respawn after a SIGKILL
[lttng-tools.git] / ltt-sessiond / trace.c
index 1509edacdf048e92fef749cad90ac8c30e09af7a..c090f21063d60d8e38c3aecf6150e17195c8d45f 100644 (file)
@@ -138,6 +138,7 @@ struct ltt_kernel_channel *trace_create_kernel_channel(struct lttng_channel *cha
 
        lkc->fd = 0;
        lkc->stream_count = 0;
+       lkc->event_count = 0;
        lkc->enabled = 1;
        lkc->ctx = NULL;
        /* Init linked list */
@@ -184,6 +185,14 @@ struct ltt_kernel_event *trace_create_kernel_event(struct lttng_event *ev)
                                ev->attr.probe.symbol_name, LTTNG_SYM_NAME_LEN);
                break;
        case LTTNG_EVENT_FUNCTION:
+               attr->instrumentation = LTTNG_KERNEL_KRETPROBE;
+               attr->u.kretprobe.addr = ev->attr.probe.addr;
+               attr->u.kretprobe.offset = ev->attr.probe.offset;
+               attr->u.kretprobe.offset = ev->attr.probe.offset;
+               strncpy(attr->u.kretprobe.symbol_name,
+                               ev->attr.probe.symbol_name, LTTNG_SYM_NAME_LEN);
+               break;
+       case LTTNG_EVENT_FUNCTION_ENTRY:
                attr->instrumentation = LTTNG_KERNEL_FUNCTION;
                strncpy(attr->u.ftrace.symbol_name,
                                ev->attr.ftrace.symbol_name, LTTNG_SYM_NAME_LEN);
This page took 0.022797 seconds and 4 git commands to generate.