+ /* Setup kernel context structure */
+ switch (ctx->ctx) {
+ case LTTNG_EVENT_CONTEXT_PID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PID;
+ break;
+ case LTTNG_EVENT_CONTEXT_PROCNAME:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PROCNAME;
+ break;
+ case LTTNG_EVENT_CONTEXT_PRIO:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PRIO;
+ break;
+ case LTTNG_EVENT_CONTEXT_NICE:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_NICE;
+ break;
+ case LTTNG_EVENT_CONTEXT_VPID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_VPID;
+ break;
+ case LTTNG_EVENT_CONTEXT_TID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_TID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VTID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_VTID;
+ break;
+ case LTTNG_EVENT_CONTEXT_PPID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PPID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VPPID:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_VPPID;
+ break;
+ case LTTNG_EVENT_CONTEXT_HOSTNAME:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_HOSTNAME;
+ break;
+ case LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER:
+ case LTTNG_EVENT_CONTEXT_PERF_COUNTER:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER;