Commit Graph

147 Commits

Author SHA1 Message Date
Martin Ridgers
732332d367 Added some Vim fold markers to help navigate this file more easily.
#rnx

[CL 16638910 by Martin Ridgers in ue5-main branch]
2021-06-11 06:27:46 -04:00
Martin Ridgers
26a110cf1e Packets that are partial but not compressed where being incorrectly categorised as compressed. Analysis would fallover when nonsense data was sent to LZ4.
#rb simple
#rnx

[CL 16298406 by Martin Ridgers in ue5-main branch]
2021-05-12 09:23:09 -04:00
Martin Ridgers
a50347235f If a partial packet arrives and we know about the thread, we're expecting more data and can just append the partial packet we received. If we do not know about the thread the packet is fore, then we've late-joined and the packet we've just received is dependant on previous data that was discarded prior to connect. In that case we'll discard the packet.
#rnx

[CL 16247692 by Martin Ridgers in ue5-main branch]
2021-05-10 09:17:16 -04:00
Martin Ridgers
b5c9a2a157 The transport layer can now choose to discard packets for a particular thread. Currently none are discarded but the functionality will be used in late-connect scenarios where the first packet for a thread is partial (e.g. it starts in the middle of auxilary trace data). There is no mechanism in place to recover reading events in this case. It is however a rare occurence thus cheaper, easier, and safer to discard the packet than support recovery.
#rb jb
#rnx

[CL 16237278 by Martin Ridgers in ue5-main branch]
2021-05-07 05:25:31 -04:00
Martin Ridgers
03b7ef154c Replaced some magic constants with a something more semantic.
#rb jb
#rnx

[CL 16218739 by Martin Ridgers in ue5-main branch]
2021-05-06 03:31:12 -04:00
Martin Ridgers
5f92f30cdd Use Trace's packet structs on the analysis side instead of duplicating them.
#rb jb
#rnx

[CL 16218643 by Martin Ridgers in ue5-main branch]
2021-05-06 02:55:35 -04:00
Martin Ridgers
60c59e13e2 Extend lifetime of thread info objects. Previously there was a slim chance that they would get moved while someone else was holding on to a pointer to them.
#rb jb
#rnx

[CL 16192808 by Martin Ridgers in ue5-main branch]
2021-05-04 09:01:07 -04:00
Martin Ridgers
b8523e1c46 Guard against reading too much of an event's header from the trace data stream
#rb im
#rnx

[CL 16156223 by Martin Ridgers in ue5-main branch]
2021-04-29 08:18:34 -04:00
Martin Ridgers
e92804c644 Fixed typo in a comment
#rb im
#rnx

[CL 16156203 by Martin Ridgers in ue5-main branch]
2021-04-29 08:16:23 -04:00
Martin Ridgers
1d840cfe34 Use uint32 to store the UID instead of uint16. If anything the code generation is a little better as there are no prefixes.
#rb im
#rnx

[CL 16156198 by Martin Ridgers in ue5-main branch]
2021-04-29 08:15:47 -04:00
Martin Ridgers
75898aaf65 Guard against some legacy paths taken when analyzing old traces as they set the auxilary data collector object to null.
#rb im
#rnx

[CL 16156193 by Martin Ridgers in ue5-main branch]
2021-04-29 08:14:42 -04:00
Martin Ridgers
7107dca2f6 EventData.GetString() was incorrectly returning false if the requested field did exist but was empty.
#rb im
#rnx

[CL 16156188 by Martin Ridgers in ue5-main branch]
2021-04-29 08:12:58 -04:00
Martin Ridgers
8c25a5e19c Added a EventData.GetSize() method to report the size in bytes of a traced event to the curious.
#rb trivial
#rnx

[CL 16112307 by Martin Ridgers in ue5-main branch]
2021-04-26 03:35:01 -04:00
Martin Ridgers
ef3e0711d7 Added an EventTypeInfo.GetSize() to get the unadorned size of an trace event.
#rb trivial
#rnx

[CL 16112306 by Martin Ridgers in ue5-main branch]
2021-04-26 03:33:22 -04:00
Martin Ridgers
e71e6f635c Identify which packets of events are important and which are internal to Trace's operation. They can still be the same internal "thread" as that level of separation isn't needed, but it is helpful from a maintenance perspective to semantically separate them. It is plural "Importants" to placate Clang.
#rb jb
#rnx

[CL 16071425 by Martin Ridgers in ue5-main branch]
2021-04-21 07:49:01 -04:00
Martin Ridgers
b78da1ecce Send event descriptions out before important events. Events and important events are maintained in two separate data structures. The visibility of one with respect to the other is arbitrary from the perspective of Trace's worker thread. This could result in event descriptions being after one of their events - unrecoverable when both are in the same packet.
#rb jb
#rnx

[CL 16071395 by Martin Ridgers in ue5-main branch]
2021-04-21 07:46:59 -04:00
Martin Ridgers
9d3fc6903e Add the internal thread into the transport handler's list straight away and always keep it there. Saves the round trip of always popping it in and out to ensure it gets processed first.
#rb jb
#rnx

[CL 16059882 by Martin Ridgers in ue5-main branch]
2021-04-20 08:26:18 -04:00
Martin Ridgers
47783d686d Moved trace's transport enums into their own include file.
#rb jb
#rnx

[CL 15929693 by Martin Ridgers in ue5-main branch]
2021-04-06 09:35:47 -04:00
Martin Ridgers
5f768247a4 Fixed PVS-Studio analysis warning.
#jira UE-106046
#rb trivial
#rnx

[CL 15047378 by Martin Ridgers in ue5-main branch]
2021-01-12 04:25:33 -04:00
Martin Ridgers
33b3b9d0db Indicate when it is okay for analysis to derive the starting log serial. This mitigates against cases where the data sent in one update of the run time has fragmented delivery when analysed (e.g. due to TCP overhead or read buffer sizes). Fragmentation results in analysis making decisions based on a partial view of the world.
#rb none
#rnx

[CL 15035044 by Martin Ridgers in ue5-main branch]
2021-01-11 04:15:10 -04:00
Martin Ridgers
4c8225b424 An alternative API for reading fields' values. A opaque handle can be retrieved when an event is first described instead of hashing a string and traversing a table for each GetValue() call. Bast-case can be an instruction or two instead of much work.
#rb none
#rnx

[CL 15034179 by Martin Ridgers in ue5-main branch]
2021-01-10 16:26:31 -04:00
Martin Ridgers
2cf9a89ea2 Moved event data pointer to the start of an internal struct so it is a little bit easier to find from the outside.
#rb none
#rnx

[CL 15034159 by Martin Ridgers in ue5-main branch]
2021-01-10 16:18:43 -04:00
Martin Ridgers
5a6316dbf8 Fixed pointer invalidation when new thread events were received.
Events marked as important are associated internally to a pseudo thread with id 0 [A]. New-thread events are considered important and thus appear as if they were traced on thread 0. They will add thread N which will modify the Infos array. If someone was holding a A& = Infos[0] when Infos[N] was added then A can become stale. To combat this edge-case we'll thread 0 as a special case so it doesn't invalidate itself with its own events.

#rb arciel.rekman (indirectly)
#rnx

[CL 14989274 by Martin Ridgers in ue5-main branch]
2021-01-05 05:37:24 -04:00
Martin Ridgers
e5c40b10b8 Trace's analysis' FThreads::GetInfo() was always returning thread 0 (the important "thread"). Since they were marked as important, thread-info events have no longer been sent on the thread the present but instead carry the thread ID in a field.
#rb none
#rnx

[CL 14968643 by Martin Ridgers in ue5-main branch]
2020-12-30 06:06:38 -04:00
Martin Ridgers
67d7dcba9b Homogenised return type of Thread::GetInfo() across all its overloads.
#rb none
#rnx

[CL 14968631 by Martin Ridgers in ue5-main branch]
2020-12-30 05:35:41 -04:00