Fix: add ustctl_has_perf_counters
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index e07ec926adb51b843c66b0e55207f01e5432b628..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);
@@ -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.024819 seconds and 4 git commands to generate.