Implement LTTng-UST perf counters support on x86
[lttng-ust.git] / liblttng-ust / lttng-events.c
index 6dc7bfcaf40d89b73fcce0c936a8e560e6b0f4f8..0cab2f49ad2d544718a3c14159ada235319a75f3 100644 (file)
@@ -797,6 +797,17 @@ int lttng_attach_context(struct lttng_ust_context *context_param,
        switch (context_param->ctx) {
        case LTTNG_UST_CONTEXT_PTHREAD_ID:
                return lttng_add_pthread_id_to_ctx(ctx);
+       case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+       {
+               struct lttng_ust_perf_counter_ctx *perf_ctx_param;
+
+               perf_ctx_param = &context_param->u.perf_counter;
+               return lttng_add_perf_counter_to_ctx(
+                       perf_ctx_param->type,
+                       perf_ctx_param->config,
+                       perf_ctx_param->name,
+                       ctx);
+       }
        case LTTNG_UST_CONTEXT_VTID:
                return lttng_add_vtid_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_VPID:
This page took 0.023438 seconds and 4 git commands to generate.