From 6b2e20d71426bc7cb69be53cc018dfbd23cf147c Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Sat, 26 Oct 2024 14:01:58 +1100 Subject: [PATCH] Merge conflict --- src/extension/TraceController.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/extension/TraceController.cpp b/src/extension/TraceController.cpp index 68b4cd4d..b2a40608 100644 --- a/src/extension/TraceController.cpp +++ b/src/extension/TraceController.cpp @@ -264,10 +264,16 @@ namespace extension { // Open a new file in the target location trace_file.open(e.file, std::ios::binary); - // Write the trace events that happened before the trace started - auto current_stats = threading::ReactionTask::get_current_task()->statistics; - encode_event(ReactionEvent(ReactionEvent::CREATED, current_stats)); - encode_event(ReactionEvent(ReactionEvent::STARTED, current_stats)); + // Write a reset packet so that incremental state works + std::vector data; + { + const trace::protobuf::SubMessage packet(1, data); + trace::protobuf::uint32(10, trusted_packet_sequence_id, data); // trusted_packet_sequence_id:10:uint32 + trace::protobuf::int32(87, 1, data); // first_packet_on_sequence:87:bool + trace::protobuf::int32(42, 1, data); // previous_packet_dropped:42:bool + trace::protobuf::int32(13, SEQ_INCREMENTAL_STATE_CLEARED, data); // sequence flags:13:int32 + } + write_trace_packet(data); // Write the trace events that happened before the trace started auto current_stats = threading::ReactionTask::get_current_task()->statistics;