projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always choose large event header for UST channels
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-app.c
diff --git
a/src/bin/lttng-sessiond/ust-app.c
b/src/bin/lttng-sessiond/ust-app.c
index 98f45e05561ea53fbeaf7918ac85aa9cbd402f8e..e6b4250c11a255aaa600b353fb766e1b5ef54c35 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-92,6
+92,7
@@
static void copy_channel_attr_to_ustctl(
attr->switch_timer_interval = uattr->switch_timer_interval;
attr->read_timer_interval = uattr->read_timer_interval;
attr->output = uattr->output;
attr->switch_timer_interval = uattr->switch_timer_interval;
attr->read_timer_interval = uattr->read_timer_interval;
attr->output = uattr->output;
+ attr->blocking_timeout = uattr->u.s.blocking_timeout;
}
/*
}
/*
@@
-1040,6
+1041,7
@@
struct ust_app_channel *alloc_ust_app_channel(char *name,
ua_chan->attr.switch_timer_interval = attr->switch_timer_interval;
ua_chan->attr.read_timer_interval = attr->read_timer_interval;
ua_chan->attr.output = attr->output;
ua_chan->attr.switch_timer_interval = attr->switch_timer_interval;
ua_chan->attr.read_timer_interval = attr->read_timer_interval;
ua_chan->attr.output = attr->output;
+ ua_chan->attr.blocking_timeout = attr->u.s.blocking_timeout;
}
/* By default, the channel is a per cpu channel. */
ua_chan->attr.type = LTTNG_UST_CHAN_PER_CPU;
}
/* By default, the channel is a per cpu channel. */
ua_chan->attr.type = LTTNG_UST_CHAN_PER_CPU;
@@
-1803,6
+1805,8
@@
static void shadow_copy_channel(struct ust_app_channel *ua_chan,
ua_chan->attr.read_timer_interval = uchan->attr.read_timer_interval;
ua_chan->monitor_timer_interval = uchan->monitor_timer_interval;
ua_chan->attr.output = uchan->attr.output;
ua_chan->attr.read_timer_interval = uchan->attr.read_timer_interval;
ua_chan->monitor_timer_interval = uchan->monitor_timer_interval;
ua_chan->attr.output = uchan->attr.output;
+ ua_chan->attr.blocking_timeout = uchan->attr.u.s.blocking_timeout;
+
/*
* Note that the attribute channel type is not set since the channel on the
* tracing registry side does not have this information.
/*
* Note that the attribute channel type is not set since the channel on the
* tracing registry side does not have this information.
@@
-2913,15
+2917,6
@@
static int create_channel_per_uid(struct ust_app *app,
created = true;
}
created = true;
}
- /* Send buffers to the application. */
- ret = send_channel_uid_to_ust(reg_chan, app, ua_sess, ua_chan);
- if (ret < 0) {
- if (ret != -ENOTCONN) {
- ERR("Error sending channel to application");
- }
- goto error;
- }
-
if (created) {
enum lttng_error_code cmd_ret;
struct ltt_session *session;
if (created) {
enum lttng_error_code cmd_ret;
struct ltt_session *session;
@@
-2957,6
+2952,15
@@
static int create_channel_per_uid(struct ust_app *app,
}
}
}
}
+ /* Send buffers to the application. */
+ ret = send_channel_uid_to_ust(reg_chan, app, ua_sess, ua_chan);
+ if (ret < 0) {
+ if (ret != -ENOTCONN) {
+ ERR("Error sending channel to application");
+ }
+ goto error;
+ }
+
error:
return ret;
}
error:
return ret;
}
@@
-5390,7
+5394,7
@@
static int reply_ust_register_channel(int sock, int sobjd, int cobjd,
size_t nr_fields, struct ustctl_field *fields)
{
int ret, ret_code = 0;
size_t nr_fields, struct ustctl_field *fields)
{
int ret, ret_code = 0;
- uint32_t chan_id
, reg_count
;
+ uint32_t chan_id;
uint64_t chan_reg_key;
enum ustctl_channel_header type;
struct ust_app *app;
uint64_t chan_reg_key;
enum ustctl_channel_header type;
struct ust_app *app;
@@
-5442,13
+5446,12
@@
static int reply_ust_register_channel(int sock, int sobjd, int cobjd,
assert(chan_reg);
if (!chan_reg->register_done) {
assert(chan_reg);
if (!chan_reg->register_done) {
- reg_count = ust_registry_get_event_count(chan_reg);
- if (reg_count < 31) {
- type = USTCTL_CHANNEL_HEADER_COMPACT;
- } else {
- type = USTCTL_CHANNEL_HEADER_LARGE;
- }
-
+ /*
+ * TODO: eventually use the registry event count for
+ * this channel to better guess header type for per-pid
+ * buffers.
+ */
+ type = USTCTL_CHANNEL_HEADER_LARGE;
chan_reg->nr_ctx_fields = nr_fields;
chan_reg->ctx_fields = fields;
fields = NULL;
chan_reg->nr_ctx_fields = nr_fields;
chan_reg->ctx_fields = fields;
fields = NULL;
@@
-5928,6
+5931,11
@@
int ust_app_snapshot_record(struct ltt_ust_session *usess,
struct buffer_reg_channel *reg_chan;
struct consumer_socket *socket;
struct buffer_reg_channel *reg_chan;
struct consumer_socket *socket;
+ if (!reg->registry->reg.ust->metadata_key) {
+ /* Skip since no metadata is present */
+ continue;
+ }
+
/* Get consumer socket to use to push the metadata.*/
socket = consumer_find_socket_by_bitness(reg->bits_per_long,
usess->consumer);
/* Get consumer socket to use to push the metadata.*/
socket = consumer_find_socket_by_bitness(reg->bits_per_long,
usess->consumer);
This page took
0.026708 seconds
and
4
git commands to generate.