X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=aaad99acf1bf5a87b68a50bd7508c08cb5ca6cf9;hb=a9ff648cc;hp=854d8ae391d25c43a2179193c99dc398a9ee7ef4;hpb=e1919a410049bf776e29f4da4d48e514476db455;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 854d8ae3..aaad99ac 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -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. */