From: Mathieu Desnoyers Date: Mon, 1 Nov 2021 20:39:22 +0000 (-0400) Subject: Cleanup: tracepoint probe register/unregister: use parent field X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=14a15badd515c2f691512ac7461935127a30bb9d;p=lttng-modules.git Cleanup: tracepoint probe register/unregister: use parent field Use the parent field to match the type expected in the probe callback. This works so far only because parent is the first field of the children structures. Signed-off-by: Mathieu Desnoyers Change-Id: I05fb3cdc75c1c04abb352cdebdaa90f780d0c789 --- diff --git a/src/lttng-events.c b/src/lttng-events.c index dd8b55e0..ebeda986 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -1452,7 +1452,7 @@ void register_event_recorder(struct lttng_kernel_event_recorder *event_recorder) case LTTNG_KERNEL_ABI_TRACEPOINT: ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname, desc->tp_class->probe_callback, - event_recorder); + &event_recorder->parent); break; case LTTNG_KERNEL_ABI_SYSCALL: @@ -1495,7 +1495,7 @@ int _lttng_event_recorder_unregister(struct lttng_kernel_event_recorder *event_r case LTTNG_KERNEL_ABI_TRACEPOINT: ret = lttng_wrapper_tracepoint_probe_unregister(event_priv->desc->event_kname, event_priv->desc->tp_class->probe_callback, - event_recorder); + &event_recorder->parent); break; case LTTNG_KERNEL_ABI_KPROBE: @@ -1546,7 +1546,7 @@ void register_event_notifier(struct lttng_kernel_event_notifier *event_notifier) case LTTNG_KERNEL_ABI_TRACEPOINT: ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname, desc->tp_class->probe_callback, - event_notifier); + &event_notifier->parent); break; case LTTNG_KERNEL_ABI_SYSCALL: @@ -1587,7 +1587,7 @@ int _lttng_event_notifier_unregister( case LTTNG_KERNEL_ABI_TRACEPOINT: ret = lttng_wrapper_tracepoint_probe_unregister(event_notifier->priv->parent.desc->event_kname, event_notifier->priv->parent.desc->tp_class->probe_callback, - event_notifier); + &event_notifier->parent); break; case LTTNG_KERNEL_ABI_KPROBE: