projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract the lost packets and discarded events counters
[lttng-tools.git]
/
src
/
common
/
consumer
/
consumer.c
diff --git
a/src/common/consumer/consumer.c
b/src/common/consumer/consumer.c
index 2897fb855dde0844be2984df3278818be910eb56..7911a5b4e8d4d0701d40e88d3ebdd6841c4061af 100644
(file)
--- a/
src/common/consumer/consumer.c
+++ b/
src/common/consumer/consumer.c
@@
-571,6
+571,7
@@
struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key,
stream->monitor = monitor;
stream->endpoint_status = CONSUMER_ENDPOINT_ACTIVE;
stream->index_fd = -1;
stream->monitor = monitor;
stream->endpoint_status = CONSUMER_ENDPOINT_ACTIVE;
stream->index_fd = -1;
+ stream->last_sequence_number = -1ULL;
pthread_mutex_init(&stream->lock, NULL);
pthread_mutex_init(&stream->metadata_timer_lock, NULL);
pthread_mutex_init(&stream->lock, NULL);
pthread_mutex_init(&stream->metadata_timer_lock, NULL);
@@
-1596,6
+1597,12
@@
ssize_t lttng_consumer_on_read_subbuffer_mmap(
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
+ ret = close(stream->index_fd);
+ if (ret < 0) {
+ PERROR("Closing index");
+ goto end;
+ }
+ stream->index_fd = -1;
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
@@
-1779,6
+1786,12
@@
ssize_t lttng_consumer_on_read_subbuffer_splice(
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
+ ret = close(stream->index_fd);
+ if (ret < 0) {
+ PERROR("Closing index");
+ goto end;
+ }
+ stream->index_fd = -1;
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
This page took
0.030936 seconds
and
5
git commands to generate.