Commit Graph

336 Commits

Author SHA1 Message Date
martin ridgers
9744de072e OnData() returns Continue if there's more work to do.
If there is more data available but none of the OnData() steps have indicated the they require more data, then OnData() can return Continue. This will allow the outer machine to make more progress, and ensure that smaller traces (where a single read can contain all sync points) makes progress.

#rb jb
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 18101546 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)

[CL 18101559 by martin ridgers in ue5-release-engine-test branch]
2021-11-09 03:54:34 -05:00
martin ridgers
3a591fcde7 EStatus::Eof -> EStatus::EndOfStream
#rb jb
#rnx
#preflight 6166d6c2729ae3000106b493

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17799163 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17799167 by martin ridgers in ue5-release-engine-test branch]
2021-10-13 09:11:24 -04:00
martin ridgers
7b701d8fdf Analyze new-event events before anything else.
Previously new-event and important events were collected in a pass together. However, because the new-events hadn't been processed yet, the important event stream was unintelligable until the next update. This would accellerate normal events past important ones that they might depend upon.

#rb jb
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17798823 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17798876 by martin ridgers in ue5-release-engine-test branch]
2021-10-13 08:38:47 -04:00
martin ridgers
22550c15e7 Use sync points embedded in the transport to reliably detect gaps in trace event serial numbers that can occur when late connecting.
#rb jb
#rnx
#jira ue-127376
#preflight 615c577872597e0001cbd336

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17732457 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17732466 by martin ridgers in ue5-release-engine-test branch]
2021-10-06 02:21:13 -04:00
martin ridgers
b03efab038 Add sync points into the trace stream.
These will help analysis know where the world was sampled at runtime in relation to the stream of data it is receiving. With these discrete points in time it is then possible to reason about gaps in events' serial numbers that can occur when late-connecting.

#rb jb
#jira ue-127376
#rnx
#preflight 615aedb7fe00590001c1440f

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17720409 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17720457 by martin ridgers in ue5-release-engine-test branch]
2021-10-05 09:32:12 -04:00
martin ridgers
c7d0af43ed Use 'Mask' instead of 'Range - 1'
#rb trivial
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706958 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706963 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 09:04:54 -04:00
martin ridgers
48b835041d Moved the heap update out of the loop and into a lambda.
The update is also done after dispatching events to analyzers now instead of before so the Stream object is valid for the entire scope

#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706914 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706932 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 09:00:20 -04:00
martin ridgers
a866e49af3 Always process both classes of trace events each update
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706844 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706852 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:49:53 -04:00
martin ridgers
050783fa29 Split OnNormalEvents() into two methods
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706824 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706834 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:47:20 -04:00
martin ridgers
8901b7c559 Use a less-than operator instead of a lambda for the event-desc heap
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706783 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706790 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:40:06 -04:00
martin ridgers
86f89167d0 Changed scope of a struct function to class.
#rb trivial
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706751 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706774 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:38:35 -04:00
martin ridgers
3237af65d0 int -> int32
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706741 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706752 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:37:29 -04:00
martin ridgers
d240032e62 Renamed Index member to something a little more descriptive
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706729 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706746 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:37:14 -04:00
martin ridgers
8f0349f8d7 Always expect events to be contiguous.
Previously it was assumed that the earliest known event was a good starting point, but in reality analysis never has a complete view of the world to be able to make any decisions about the data it is receiving. New data could easily arrive that invalidates any assumptions. Now nothing is assumed. Proceed only when one particular event is encountered. Note that is not quite complete - it doesn't cover holes that can occur early in the data stream.

#rb jb
#jira ue-127376
#rnx
#preflight 615aec4ce3b24d0001496bb3

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706661 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17706666 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 08:26:55 -04:00
martin ridgers
9b25096e7f Keep track of whether an event had a one or two byte event UID
#rb jb
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706443 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v878-17703426)

[CL 17706463 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 07:53:39 -04:00
martin ridgers
adc5b6a1a9 Tolerance against situations where there was no trace event in between and enter/leave scope pair
#rb trivial
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17706428 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v878-17703426)

[CL 17706440 by martin ridgers in ue5-release-engine-test branch]
2021-10-04 07:52:19 -04:00
martin ridgers
2df1076c8d Keep track of which reader in the transport a stream came from.
#rb none
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17629516 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629532 by martin ridgers in ue5-release-engine-test branch]
2021-09-27 08:49:36 -04:00
martin ridgers
a48ced4fb5 Set serial to "ignored" for aux data and terminal events.
#rb jb
#rnx
#preflight 6151a7ff59c66a000102f381

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17629172 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629174 by martin ridgers in ue5-release-engine-test branch]
2021-09-27 08:02:18 -04:00
martin ridgers
96027838ef Added an alignment to hint to the compiler to do the right thing.
#rb jb
#rnx
#preflight 6151a7ff59c66a000102f381

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17629153 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629162 by martin ridgers in ue5-release-engine-test branch]
2021-09-27 08:00:26 -04:00
martin ridgers
657f070eac Consume unsynchronised events before sorting so it is only ever serial numbers that define the heap.
#rb jb
#jira ue-127376
#rnx
#preflight 6151a7ff59c66a000102f381

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17629136 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629141 by martin ridgers in ue5-release-engine-test branch]
2021-09-27 07:59:27 -04:00
martin ridgers
e96f55b209 Added a backtrack call to be able to restore a reader to an earlier point in its buffer. Like marks, only for the times when one wasn't able to take a mark.
#rb none
#rnx
#preflight 6151a7b659c66a000102f21b

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17629130 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629139 by martin ridgers in ue5-release-engine-test branch]
2021-09-27 07:59:18 -04:00
ionut matasaru
dfa47a98d8 [Insights] Fixed the processing of scoped timing events with 0 duration.
Description of the problem: Very short scopes for cpu timing events with metadata can have a duration of 0. In this case the enter/leave events are incorrectly processed. The "enter" scope event is processed as it has a relative timestamp > 0, but the "leave" event is ignored in analysis as it will have a timestamp == 0, some as scoped events without time. It results in a broken hierarchy of cpu timing events!

The fix ensures the scoped events with 0 duration will still have a valid timestamp (in this case the "leave" event will have same timestamp as "enter" event, as expected), so those "leave scope" events are not ignored anymore by the cpu profiler analyzer (which still needs to ignore scoped events without time).

#rb Martin.Ridgers
[FYI] Catalin.Dragoiu

#ROBOMERGE-AUTHOR: ionut.matasaru
#ROBOMERGE-SOURCE: CL 17627582 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17627584 by ionut matasaru in ue5-release-engine-test branch]
2021-09-27 02:06:19 -04:00
ionut matasaru
0b79759b8d Fixed dispatch of events with auxiliary data for the new protocol version (5).
Added bounds checking when reading (skipping) the metadata in front of trace file.

#rb Martin.Ridgers
#preflight 6139be0c48e4950001410cad

#ROBOMERGE-AUTHOR: ionut.matasaru
#ROBOMERGE-SOURCE: CL 17469346 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17469379 by ionut matasaru in ue5-release-engine-test branch]
2021-09-09 05:03:58 -04:00
martin ridgers
bb5ac95928 Restrict trace store client to only resolve IPv4 addresses. Previously the resolve would look up IPv6 addresses for the given host leading to stalls.
#rb jb
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17443422 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17443426 by martin ridgers in ue5-release-engine-test branch]
2021-09-07 08:32:26 -04:00
martin ridgers
7efe89bacc Explicitly terminate runs of aux data blocks with a well-known "aux data terminal" event. Previously a null byte was used. Each aux data block would write the null. Subsequent blocks would overwrite the prior block's null, effectively pushing the null to the end of a run aux data. However, if a different event was traced in the middle of the run it too would overwrite the null and corrupt the stream. With an explicit terminal event, structure can be recovered regardless of any multiplexing.
Serial numbers are no longer perscriptive (i.e. there can be gaps).

Normal trace events' headers are 50% smaller.

#jira ue-114532
#rb johan.berg
#preflight 6131df894f2c7c00016bf83c

#ROBOMERGE-SOURCE: CL 17419538 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17419569 by martin ridgers in ue5-release-engine-test branch]
2021-09-03 08:34:16 -04:00