X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-abi.c;h=f155c76be5b3144e211aabdaf45914daede1101e;hb=83be3f4fe4bf72352850670841e6fb46f44d88f3;hp=d202b728451209526e02bc8dae0a984570521bc5;hpb=d1344afaa0bc9707015a0ded9b312e43e58ed2d9;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index d202b728..f155c76b 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -56,6 +56,7 @@ #include #include #include +#include #include /* @@ -246,6 +247,9 @@ long lttng_abi_add_context(struct file *file, return lttng_add_preemptible_to_ctx(ctx); case LTTNG_KERNEL_CONTEXT_MIGRATABLE: return lttng_add_migratable_to_ctx(ctx); + case LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL: + case LTTNG_KERNEL_CONTEXT_CALLSTACK_USER: + return lttng_add_callstack_to_ctx(ctx, context_param->ctx); default: return -EINVAL; } @@ -1771,6 +1775,12 @@ int __init lttng_abi_init(void) wrapper_vmalloc_sync_all(); lttng_clock_ref(); + + ret = lttng_tp_mempool_init(); + if (ret) { + goto error; + } + lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL, <tng_fops, NULL); @@ -1783,6 +1793,7 @@ int __init lttng_abi_init(void) return 0; error: + lttng_tp_mempool_destroy(); lttng_clock_unref(); return ret; } @@ -1790,6 +1801,7 @@ error: /* No __exit annotation because used by init error path too. */ void lttng_abi_exit(void) { + lttng_tp_mempool_destroy(); lttng_clock_unref(); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL);