projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: grab more than one packet for snapshots
[lttng-tools.git]
/
src
/
common
/
ust-consumer
/
ust-consumer.c
diff --git
a/src/common/ust-consumer/ust-consumer.c
b/src/common/ust-consumer/ust-consumer.c
index 52b6979bf72b985e70164e283f5d4a4855a050ce..bf0208f1d67adb0dd92e840b03a0c43910771b5d 100644
(file)
--- a/
src/common/ust-consumer/ust-consumer.c
+++ b/
src/common/ust-consumer/ust-consumer.c
@@
-434,7
+434,7
@@
static int send_sessiond_channel(int sock,
if (relayd_error) {
*relayd_error = 1;
}
if (relayd_error) {
*relayd_error = 1;
}
- ret_code = LTT
NG_ERR_RELAYD_CONNECT
_FAIL;
+ ret_code = LTT
COMM_CONSUMERD_RELAYD
_FAIL;
}
if (net_seq_idx == -1ULL) {
net_seq_idx = stream->net_seq_idx;
}
if (net_seq_idx == -1ULL) {
net_seq_idx = stream->net_seq_idx;
@@
-860,7
+860,7
@@
error:
* Returns 0 on success, < 0 on error
*/
static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
* Returns 0 on success, < 0 on error
*/
static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
- uint64_t
max_stream_size
, struct lttng_consumer_local_data *ctx)
+ uint64_t
nb_packets_per_stream
, struct lttng_consumer_local_data *ctx)
{
int ret;
unsigned use_relayd = 0;
{
int ret;
unsigned use_relayd = 0;
@@
-942,12
+942,13
@@
static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
/*
* The original value is sent back if max stream size is larger than
/*
* The original value is sent back if max stream size is larger than
- * the possible size of the snapshot. Also, we asume that the session
+ * the possible size of the snapshot. Also, we as
s
ume that the session
* daemon should never send a maximum stream size that is lower than
* subbuffer size.
*/
* daemon should never send a maximum stream size that is lower than
* subbuffer size.
*/
- consumed_pos = consumer_get_consumed_maxsize(consumed_pos,
- produced_pos, max_stream_size);
+ consumed_pos = consumer_get_consume_start_pos(consumed_pos,
+ produced_pos, nb_packets_per_stream,
+ stream->max_sb_size);
while (consumed_pos < produced_pos) {
ssize_t read_len;
while (consumed_pos < produced_pos) {
ssize_t read_len;
@@
-1490,7
+1491,7
@@
int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
ret = snapshot_channel(msg.u.snapshot_channel.key,
msg.u.snapshot_channel.pathname,
msg.u.snapshot_channel.relayd_id,
ret = snapshot_channel(msg.u.snapshot_channel.key,
msg.u.snapshot_channel.pathname,
msg.u.snapshot_channel.relayd_id,
- msg.u.snapshot_channel.
max_stream_size
,
+ msg.u.snapshot_channel.
nb_packets_per_stream
,
ctx);
if (ret < 0) {
ERR("Snapshot channel failed");
ctx);
if (ret < 0) {
ERR("Snapshot channel failed");
@@
-1882,7
+1883,7
@@
static int notify_if_more_data(struct lttng_consumer_stream *stream,
goto end;
}
goto end;
}
- ret = ustctl_put_
next_
subbuf(ustream);
+ ret = ustctl_put_subbuf(ustream);
assert(!ret);
/* This stream still has data. Flag it and wake up the data thread. */
assert(!ret);
/* This stream still has data. Flag it and wake up the data thread. */
This page took
0.025386 seconds
and
4
git commands to generate.