lttng_trace_chunk_put(stream->trace_chunk);
stream->trace_chunk = stream->ongoing_rotation.value.next_trace_chunk;
stream->ongoing_rotation = (typeof(stream->ongoing_rotation)) {};
+ stream->completed_rotation_count++;
}
static int stream_create_data_output_file_from_trace_chunk(
* trace chunk.
*/
acquired_reference = lttng_trace_chunk_get(stream->trace_chunk);
- assert(acquired_reference);
+ LTTNG_ASSERT(acquired_reference);
previous_chunk = stream->trace_chunk;
/*
* the orinal stream_fd will be used to copy the "extra" data
* to the new file.
*/
- assert(stream->file);
+ LTTNG_ASSERT(stream->file);
previous_stream_file = stream->file;
stream->file = NULL;
- assert(!stream->is_metadata);
- assert(stream->tracefile_size_current >
+ LTTNG_ASSERT(!stream->is_metadata);
+ LTTNG_ASSERT(stream->tracefile_size_current >
stream->pos_after_last_complete_data_index);
misplaced_data_size = stream->tracefile_size_current -
stream->pos_after_last_complete_data_index;
goto end;
}
- assert(stream->file);
+ LTTNG_ASSERT(stream->file);
/*
* Seek the current tracefile to the position at which the rotation
* should have occurred.
* In overwrite mode, the packet seq num may jump over the
* rotation position.
*/
- assert(LTTNG_OPTIONAL_GET(stream->received_packet_seq_num) + 1 >=
+ LTTNG_ASSERT(LTTNG_OPTIONAL_GET(stream->received_packet_seq_num) + 1 >=
stream->ongoing_rotation.value.packet_seq_num);
DBG("Rotating stream %" PRIu64 " index file",
stream->stream_handle);
lttng_trace_chunk_put(stream->trace_chunk);
acquired_reference = lttng_trace_chunk_get(chunk);
- assert(acquired_reference);
+ LTTNG_ASSERT(acquired_reference);
stream->trace_chunk = chunk;
if (stream->file) {
iter.iter.node = &stream->node.node;
ret = lttng_ht_del(relay_streams_ht, &iter);
- assert(!ret);
+ LTTNG_ASSERT(!ret);
stream->in_stream_ht = false;
}
if (stream->published) {
void stream_put(struct relay_stream *stream)
{
rcu_read_lock();
- assert(stream->ref.refcount != 0);
+ LTTNG_ASSERT(stream->ref.refcount != 0);
/*
* Wait until we have processed all the stream packets before
* actually putting our last stream reference.
const bool reference_acquired =
lttng_trace_chunk_get(next_trace_chunk);
- assert(reference_acquired);
+ LTTNG_ASSERT(reference_acquired);
}
LTTNG_OPTIONAL_SET(&stream->ongoing_rotation, rotation);
uint64_t data_offset;
struct relay_index *index;
- assert(stream->trace_chunk);
+ LTTNG_ASSERT(stream->trace_chunk);
ASSERT_LOCKED(stream->lock);
/* Get data offset because we are about to update the index. */
data_offset = htobe64(stream->tracefile_size_current);