Commit Graph

10 Commits

Author SHA1 Message Date
geoff evans
fe09fcac03 Trace: Fix bug where Snapshots don't contain event descriptions if no active connection exists
#rnx
#rb trivial
#preflight 627d67e613752319231354d5

#ROBOMERGE-AUTHOR: geoff.evans
#ROBOMERGE-SOURCE: CL 20172344 via CL 20172353 via CL 20172365
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20173296 by geoff evans in ue5-main branch]
2022-05-12 18:35:20 -04:00
geoff evans
0988a55b0a Trace Snapshot to File
### Features
We can now write tailing memory to a utrace file. Snapshotting while tracing to a file or socket is supported.
This change introduces a new console command: Trace.SnapshotFile. It writes the profiling data from memory into an optionally specified a utrace file.

### Testing
Run Editor with -tracefile
Run Editor with -trace, connect live with insights
Run Editor without -trace (this does generate a very small utrace since there is memory and data in the tail even though default channels are not enabled)

#rb johan.berg
#jira UE-150302,UE-150292
#preflight 6272a3213e1f2a9d3a88ee3d

#ROBOMERGE-OWNER: geoff.evans
#ROBOMERGE-AUTHOR: geoff.evans
#ROBOMERGE-SOURCE: CL 20124258 via CL 20125717 via CL 20126082
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20129506 by geoff evans in ue5-main branch]
2022-05-10 17:03:04 -04:00
Johan Berg
5d363d7245 [TraceLog] Add definition event types and reference fields.
Adds a new field type for trace events which contains a reference to a previously emitted event. In order to create a reference, the referenced event type needs to be declared with a new "definition" flag. The definition flag also defines type of id that is used for the reference, 8, 16, 32 and 64 bit values are supported.

#rb ionut.matasaru, martin.ridgers
#preflight 627393ea4e24dbee173d42c5

[CL 20055730 by Johan Berg in ue5-main branch]
2022-05-05 05:30:07 -04:00
Martin Ridgers
ac70c1cfc8 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

[CL 17419538 by Martin Ridgers in ue5-main branch]
2021-09-03 08:32:31 -04:00
Martin Ridgers
5313a089ed Use exchange instead of CAS to gain ownership of the linked list of new trace events.
#rb johan.berg
#rnx

[CL 15872372 by Martin Ridgers in ue5-main branch]
2021-03-31 04:24:02 -04:00
Martin Ridgers
55dccc9370 When a new trace connection is established known events need to be resent. A list of known events is maintained for this purpose (it predates the important event side-channel). If any new events were added to the new-events list, the on-connect logic would overwrite the list and all knowledge of the new events would be lost. Analysis would end up with events it knew nothing of and would be unable to proceed.
#jira UE-109686
#rb johan.berg
#rnx

[CL 15731505 by Martin Ridgers in ue5-main branch]
2021-03-17 18:34:01 -04:00
Martin Ridgers
45733bed92 Removed an unused variable.
#rb sbo
#rnx

[CL 15375665 by Martin Ridgers in ue5-main branch]
2021-02-10 09:10:48 -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
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
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