Commit Graph

257 Commits

Author SHA1 Message Date
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
Martin Ridgers
be972be826 Moved the Trace namespace into the UE namespace.
#rb jb
#rnx

[CL 14762673 by Martin Ridgers in ue5-main branch]
2020-11-17 06:54:28 -04:00
Martin Ridgers
1d420c9d7b Expose active trace sessions' control port via the Trace Store.
#rb jb
#rnx

[CL 14750314 by Martin Ridgers in ue5-main branch]
2020-11-16 04:31:03 -04:00
Martin Ridgers
71f829c710 Simple provision for prefixing metadata at the start of a trace stream
#rb jb
#rnx

[CL 14750258 by Martin Ridgers in ue5-main branch]
2020-11-16 04:06:18 -04:00
Martin Ridgers
71cc29d19a Fixed MSVC static analysis warnings from a Windows SDK header.
#rb trivial
#rnx

[CL 14744174 by Martin Ridgers in ue5-main branch]
2020-11-13 10:09:34 -04:00
Martin Ridgers
8a6a773e17 Trace data is a stream and communication is one way. It is implemented this way to share code between sending trace data over the wire and writing it to a file. Because there's no ping/pong we can end up with a half-open TCP connection if the other end doesn't close its socket. So we'll enable keep-alive on the socket and set a short timeout (default is 2hrs).
[CL 14733648 by Martin Ridgers in ue5-main branch]
2020-11-12 10:07:23 -04:00
Martin Ridgers
5bd4631489 Tweaked growth size of buffers that hold trace data during analysis.
#rb jb
#rnx

[CL 14732282 by Martin Ridgers in ue5-main branch]
2020-11-12 04:23:44 -04:00
Martin Ridgers
889b2d647c Implementation of Trace's important events. Some events are only traced once. CPU scope names or log format strings for example. Those trace-once events get lost if a user then connects to trace late (or reconnects a second time). To combat that important events are traced to a separate stream internally so that they can be identified, cached off to one side, and resent when a connection is first established.
#rb johan.berg
#rnx

[CL 14572080 by Martin Ridgers in ue5-main branch]
2020-10-26 03:29:23 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
martin ridgers
3b724a0c2f Made the sockets that the trace store client creates uninheritable
#rb none
#jira ue-91015

#ushell-cherrypick of 12106008 by Martin.Ridgers

#ROBOMERGE-SOURCE: CL 12386981 in //UE4/Release-4.25/... via CL 12386982
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v671-12333473)

[CL 12386984 by martin ridgers in Main branch]
2020-03-24 06:20:59 -04:00
Martin Ridgers
bcda0febbe Cancel the timeout tick when accepting a connection to read trace data from a relay. Otherwise the timeout fires causing an extra read, the loss of a page of trace data, and eventually a segfault or assert.
#rb jb
#rnx
#jira ue-88376
#ushell-cherrypick of 11302806 by Martin.Ridgers

[CL 11303311 by Martin Ridgers in Main branch]
2020-02-10 08:55:35 -05:00
Martin Ridgers
cfd65a404f Always attempt to cancel a timer regardless of the owning FAsioTickable's state. Without this it isn't possible to cancel one-shot ticks.
#rb jb
#rnx
#jira ue-88376

#ushell-cherrypick of 11302796 by Martin.Ridgers

[CL 11303303 by Martin Ridgers in Main branch]
2020-02-10 08:53:23 -05:00
Martin Ridgers
034e882cad Moved ASIO defines to the correct .Build.cs script.
#jira ue-88191
#rb trivial
#rnx


#ushell-cherrypick of 11290354 by Martin.Ridgers

[CL 11290836 by Martin Ridgers in Main branch]
2020-02-07 08:41:38 -05:00
Stefan Boberg
55a8b15f1f Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb none

[CL 11258477 by Stefan Boberg in Main branch]
2020-02-05 14:26:36 -05:00
Martin Ridgers
f82864c80a Explicitly end analysis on exit from the inner loop. Doing it implicitly in the destructor opens up the analysis framework for order of destruction problems.
#rb trivial
#rnx

[CL 11154133 by Martin Ridgers in Dev-Core branch]
2020-01-29 08:18:18 -05:00
Martin Ridgers
0c0596093d Allow TraceAnalysis' Processor objects to be move-assigned as well as move-contructed.
#rb trivial
#rnx

[CL 11154045 by Martin Ridgers in Dev-Core branch]
2020-01-29 08:16:27 -05:00
Martin Ridgers
09038e6c3b Removed hack to make live tracing update correctly. No longer relevant as we are using a different store-recorder backend.
#rb trivial
#rnx

[CL 11153442 by Martin Ridgers in Dev-Core branch]
2020-01-29 07:14:09 -05:00