Update perf counter ABI
[lttng-modules.git] / ltt-debugfs-abi.c
index aee5bf5da37c6bc912ec694e9d265300d2ff60c3..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>
@@ -154,8 +156,14 @@ long lttng_abi_add_context(struct file *file,
                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:
This page took 0.023664 seconds and 4 git commands to generate.