Implement file-backed ring buffer
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index 854d8ae391d25c43a2179193c99dc398a9ee7ef4..aaad99acf1bf5a87b68a50bd7508c08cb5ca6cf9 100644 (file)
@@ -230,7 +230,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 +294,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);
@@ -995,7 +995,8 @@ struct ustctl_consumer_channel *
                        attr->subbuf_size, attr->num_subbuf,
                        attr->switch_timer_interval,
                        attr->read_timer_interval,
-                       attr->uuid, attr->chan_id);
+                       attr->uuid, attr->chan_id,
+                       attr->shm_path[0] == '\0' ? NULL : attr->shm_path);
        if (!chan->chan) {
                goto chan_error;
        }
@@ -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.02342 seconds and 4 git commands to generate.