Fix: add ustctl_has_perf_counters
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index 854d8ae391d25c43a2179193c99dc398a9ee7ef4..b44d9e34020a5cbe61d547c4b8ba7d01e723bc83 100644 (file)
@@ -200,6 +200,7 @@ int ustctl_create_event(int sock, struct lttng_ust_event *ev,
        lum.u.event.instrumentation = ev->instrumentation;
        lum.u.event.loglevel_type = ev->loglevel_type;
        lum.u.event.loglevel = ev->loglevel;
+       lum.u.event.disabled = ev->disabled;
        ret = ustcomm_send_app_cmd(sock, &lum, &lur);
        if (ret) {
                free(event_data);
@@ -230,7 +231,7 @@ int ustctl_add_context(int sock, struct lttng_ust_context *ctx,
        memset(&lum, 0, sizeof(lum));
        lum.handle = obj_data->handle;
        lum.cmd = LTTNG_UST_CONTEXT;
-       lum.u.context.ctx = ctx->ctx;
+       lum.u.context = *ctx;
        ret = ustcomm_send_app_cmd(sock, &lum, &lur);
        if (ret) {
                free(context_data);
@@ -294,7 +295,7 @@ int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion,
                return ret;
        }
 
-       /* send var len bytecode */
+       /* send var len exclusion names */
        ret = ustcomm_send_unix_sock(sock,
                        exclusion->names,
                        exclusion->count * LTTNG_UST_SYM_NAME_LEN);
@@ -1638,6 +1639,22 @@ int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
        return client_cb->current_timestamp(buf, handle, ts);
 }
 
+#if defined(__x86_64__) || defined(__i386__)
+
+int ustctl_has_perf_counters(void)
+{
+       return 1;
+}
+
+#else
+
+int ustctl_has_perf_counters(void)
+{
+       return 0;
+}
+
+#endif
+
 /*
  * Returns 0 on success, negative error value on error.
  */
This page took 0.023349 seconds and 4 git commands to generate.