X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=probes%2Flttng-ftrace.c;h=7637e4b54dff1b1f1effda651ee3587e335ec03c;hb=2ae4650998642ce1aa762c66cdcba6cf6af25314;hp=f583ab6ee9afd2c1d25cd23a657345f07e082137;hpb=ba1f598672d39e16402219556a911edf3a7fb7c8;p=lttng-modules.git diff --git a/probes/lttng-ftrace.c b/probes/lttng-ftrace.c index f583ab6e..7637e4b5 100644 --- a/probes/lttng-ftrace.c +++ b/probes/lttng-ftrace.c @@ -38,7 +38,7 @@ void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data return; lib_ring_buffer_ctx_init(&ctx, chan->chan, NULL, sizeof(payload), ltt_alignof(payload), -1); - ret = chan->ops->event_reserve(&ctx); + ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) return; payload.ip = ip; @@ -146,13 +146,12 @@ void lttng_ftrace_unregister(struct ltt_event *event) wrapper_unregister_ftrace_function_probe(event->u.ftrace.symbol_name, <tng_ftrace_ops, event); kfree(event->u.ftrace.symbol_name); - kfree(desc->fields); + kfree(event->desc->fields); kfree(event->desc->name); kfree(event->desc); } EXPORT_SYMBOL_GPL(lttng_ftrace_unregister); -/* This module is permanent. */ int lttng_ftrace_init(void) { wrapper_vmalloc_sync_all(); @@ -160,6 +159,15 @@ int lttng_ftrace_init(void) } module_init(lttng_ftrace_init) +/* + * Ftrace takes care of waiting for a grace period (RCU sched) at probe + * unregistration, and disables preemption around probe call. + */ +void lttng_ftrace_exit(void) +{ +} +module_exit(lttng_ftrace_exit) + MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); MODULE_DESCRIPTION("Linux Trace Toolkit Ftrace Support");