projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
trace-chunk: Introduce chunk "path", relayd session "ongoing_rotation", sessiond...
[lttng-tools.git]
/
src
/
common
/
consumer
/
consumer.c
diff --git
a/src/common/consumer/consumer.c
b/src/common/consumer/consumer.c
index a1c669894bec5e9472e072c9410817a58399ec41..0263489ddd8a908bacd2096ec14e68cfafbb1bd7 100644
(file)
--- a/
src/common/consumer/consumer.c
+++ b/
src/common/consumer/consumer.c
@@
-4084,7
+4084,13
@@
int lttng_consumer_rotate_channel(struct lttng_consumer_channel *channel,
*/
produced_pos = ALIGN_FLOOR(produced_pos, stream->max_sb_size);
if (consumed_pos == produced_pos) {
*/
produced_pos = ALIGN_FLOOR(produced_pos, stream->max_sb_size);
if (consumed_pos == produced_pos) {
+ DBG("Set rotate ready for stream %" PRIu64 " produced = %lu consumed = %lu",
+ stream->key, produced_pos, consumed_pos);
stream->rotate_ready = true;
stream->rotate_ready = true;
+ } else {
+ DBG("Different consumed and produced positions "
+ "for stream %" PRIu64 " produced = %lu consumed = %lu",
+ stream->key, produced_pos, consumed_pos);
}
/*
* The rotation position is based on the packet_seq_num of the
}
/*
* The rotation position is based on the packet_seq_num of the
@@
-4109,6
+4115,8
@@
int lttng_consumer_rotate_channel(struct lttng_consumer_channel *channel,
}
stream->rotate_position = stream->last_sequence_number + 1 +
((produced_pos - consumed_pos) / stream->max_sb_size);
}
stream->rotate_position = stream->last_sequence_number + 1 +
((produced_pos - consumed_pos) / stream->max_sb_size);
+ DBG("Set rotation position for stream %" PRIu64 " at position %" PRIu64,
+ stream->key, stream->rotate_position);
if (!is_local_trace) {
/*
if (!is_local_trace) {
/*
@@
-4290,6
+4298,11
@@
error:
*/
int lttng_consumer_stream_is_rotate_ready(struct lttng_consumer_stream *stream)
{
*/
int lttng_consumer_stream_is_rotate_ready(struct lttng_consumer_stream *stream)
{
+ DBG("Check is rotate ready for stream %" PRIu64
+ " ready %u rotate_position %" PRIu64
+ " last_sequence_number %" PRIu64,
+ stream->key, stream->rotate_ready,
+ stream->rotate_position, stream->last_sequence_number);
if (stream->rotate_ready) {
return 1;
}
if (stream->rotate_ready) {
return 1;
}
@@
-4318,6
+4331,12
@@
int lttng_consumer_stream_is_rotate_ready(struct lttng_consumer_stream *stream)
* but consumerd considers rotation ready when reaching the last
* packet of the current chunk, hence the "rotate_position - 1".
*/
* but consumerd considers rotation ready when reaching the last
* packet of the current chunk, hence the "rotate_position - 1".
*/
+
+ DBG("Check is rotate ready for stream %" PRIu64
+ " last_sequence_number %" PRIu64
+ " rotate_position %" PRIu64,
+ stream->key, stream->last_sequence_number,
+ stream->rotate_position);
if (stream->last_sequence_number >= stream->rotate_position - 1) {
return 1;
}
if (stream->last_sequence_number >= stream->rotate_position - 1) {
return 1;
}
@@
-4330,6
+4349,8
@@
int lttng_consumer_stream_is_rotate_ready(struct lttng_consumer_stream *stream)
*/
void lttng_consumer_reset_stream_rotate_state(struct lttng_consumer_stream *stream)
{
*/
void lttng_consumer_reset_stream_rotate_state(struct lttng_consumer_stream *stream)
{
+ DBG("lttng_consumer_reset_stream_rotate_state for stream %" PRIu64,
+ stream->key);
stream->rotate_position = -1ULL;
stream->rotate_ready = false;
}
stream->rotate_position = -1ULL;
stream->rotate_ready = false;
}
@@
-4582,7
+4603,7
@@
enum lttcomm_return_code lttng_consumer_create_trace_chunk(
* and LTTNG_CONSUMER_DESTROY_TRACE_CHUNK commands.
*/
created_chunk = lttng_trace_chunk_create(chunk_id,
* and LTTNG_CONSUMER_DESTROY_TRACE_CHUNK commands.
*/
created_chunk = lttng_trace_chunk_create(chunk_id,
- chunk_creation_timestamp);
+ chunk_creation_timestamp
, NULL
);
if (!created_chunk) {
ERR("Failed to create trace chunk");
ret_code = LTTCOMM_CONSUMERD_CREATE_TRACE_CHUNK_FAILED;
if (!created_chunk) {
ERR("Failed to create trace chunk");
ret_code = LTTCOMM_CONSUMERD_CREATE_TRACE_CHUNK_FAILED;
This page took
0.027566 seconds
and
4
git commands to generate.