callstack context: use delimiter when stack is incomplete
[lttng-modules.git] / lttng-abi.c
index d202b728451209526e02bc8dae0a984570521bc5..f155c76be5b3144e211aabdaf45914daede1101e 100644 (file)
@@ -56,6 +56,7 @@
 #include <lttng-abi-old.h>
 #include <lttng-events.h>
 #include <lttng-tracer.h>
+#include <lttng-tp-mempool.h>
 #include <lib/ringbuffer/frontend_types.h>
 
 /*
@@ -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,
                                        &lttng_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);
This page took 0.023004 seconds and 4 git commands to generate.