Skip to content

Commit

Permalink
Store trace events that mark the start of the trace
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Oct 26, 2024
1 parent e71efa5 commit 1ab3b01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/extension/TraceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ namespace extension {
}
write_trace_packet(data);

// 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));

// Bind new handles
event_handle = on<Trigger<ReactionEvent>, Pool<TracePool>>().then([this](const ReactionEvent& e) { //
encode_event(e);
Expand Down

0 comments on commit 1ab3b01

Please sign in to comment.