Update perf counter ABI
[lttng-modules.git] / ltt-debugfs-abi.c
index 730826674cda7a82ccce3da3d9a4779eb078f6d2..1314c663e77e321fc32bc638d0183bacc74f727a 100644 (file)
@@ -20,6 +20,8 @@
  *     - Takes an instrumentation source as parameter
  *       - e.g. tracepoints, dynamic_probes...
  *     - Takes instrumentation source specific arguments.
+ *
+ * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include <linux/module.h>
@@ -152,8 +154,18 @@ long lttng_abi_add_context(struct file *file,
        switch (context_param.ctx) {
        case LTTNG_KERNEL_CONTEXT_PID:
                return lttng_add_pid_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_PRIO:
+               return lttng_add_prio_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_NICE:
+               return lttng_add_nice_to_ctx(ctx);
        case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
-               return -ENOSYS;
+               context_param.u.perf_counter.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+               return lttng_add_perf_counter_to_ctx(context_param.u.perf_counter.type,
+                               context_param.u.perf_counter.config,
+                               context_param.u.perf_counter.name,
+                               ctx);
+       case LTTNG_KERNEL_CONTEXT_COMM:
+               return lttng_add_comm_to_ctx(ctx);
        default:
                return -EINVAL;
        }
This page took 0.022336 seconds and 4 git commands to generate.