+ struct lttng_kernel_context kctx;
+
+ /* Setup kernel context structure */
+ kctx.ctx = ctx->ctx;
+ kctx.u.perf_counter.type = ctx->u.perf_counter.type;
+ kctx.u.perf_counter.config = ctx->u.perf_counter.config;
+ strncpy(kctx.u.perf_counter.name, ctx->u.perf_counter.name,
+ LTTNG_SYMBOL_NAME_LEN);
+ kctx.u.perf_counter.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';