Commit Graph

413 Commits

Author SHA1 Message Date
Johan Berg
fa13b92ab0 Changes to how definition provider works
#rb ionut.matasaru
#robomerge EngineMerge
#preflight 62a9ef0b634e82e5d1e8eddf

[CL 20670393 by Johan Berg in ue5-main branch]
2022-06-15 11:17:41 -04:00
Johan Berg
8050d3114a Expose raw event data in handler.
#preflight 6290ce8a1f0041249bee008d

[CL 20392383 by Johan Berg in ue5-main branch]
2022-05-27 09:29:46 -04:00
Johan Berg
af08ac6622 [TraceLog] Add signed/unsigned integer distinction
#rb martin.ridgers
#preflight 62874171df5ff06fef540af5

[CL 20291967 by Johan Berg in ue5-main branch]
2022-05-20 03:37:02 -04:00
ionut matasaru
f319b6cd6e Fixed CIS error (-NoPCH -DisableUnity).
#rb trivial
#jira UE-152669
#preflight skip

[CL 20246426 by ionut matasaru in ue5-main branch]
2022-05-17 13:24:57 -04:00
ionut matasaru
1c905ca529 [Insights] Added "TraceAnalysis" and "Trace/CpuProfile" LLM_SCOPEs (in an effort to reduce the Untagged allocations):
- "TraceAnalysis" -- captures all mem allocated by the FAnalysisProcessor.
  - "Trace/CpuProfile" -- captures allocation of per-thread buffers used by the cpu profiler trace.

#jira UE-147172 (partially)
#rb Johan.Berg
#preflight 6281fc9fd819c085e0ad0fe5

[CL 20222034 by ionut matasaru in ue5-main branch]
2022-05-16 07:37:42 -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
Johan Berg
7a928530a2 Fix CIS errors on Mac
#rb none
#preflight 624c4d54683a7dd323b02e7d

[CL 19625055 by Johan Berg in ue5-main branch]
2022-04-05 10:37:43 -04:00
Martin Ridgers
6121cb7442 Fixed mismatched malloc/delete[] pairing.
#rb trivial
#rnx
#jira UE-144608
#preflight 6220d8df6a33f9b416a8cf4f

[CL 19244232 by Martin Ridgers in ue5-main branch]
2022-03-03 10:39:53 -05:00
Catalin Dragoiu
04455f4b88 Fix Mac compile error.
#rb trivial
#preflight 6218b02b8849a7424f7f7740

[CL 19143970 by Catalin Dragoiu in ue5-main branch]
2022-02-25 05:35:44 -05:00
Catalin Dragoiu
828042a563 [Insights] Fix trace list not refreshing MAC
#jira UE-137793
#preflight 62178f9f1a114ad504399e8d
#rb Ionut.Matasaru Johan Berg

[CL 19143744 by Catalin Dragoiu in ue5-main branch]
2022-02-25 04:53:37 -05:00
Catalin Dragoiu
2e1ff374d1 [Insights] Fix trace list not refresing when adding or deleting trace files on Linux.
#jira UE-137793
#rb Ionut.Matasaru Johan.Berg
#preflight 6214ba2f9e2201e21403e22c

[CL 19070550 by Catalin Dragoiu in ue5-main branch]
2022-02-22 05:54:56 -05:00
Martin Ridgers
c3874dabf2 Backed out 18978509
#rb jb
#rnx
#preflight 620d159a6202a22eedecf839

[CL 19014593 by Martin Ridgers in ue5-main branch]
2022-02-16 10:23:17 -05:00
Martin Ridgers
77907355f6 Reset active rota item count returning to do another pass over it.
Some rota items cannot make progress because their next event type is not known yet. They get moved to the end of the rota and the active count is decremented. There are two cases where the rota might be reprocessed from the beginning again; when an initial serial is set, and when the rota shows it has the next event. It is possible that on a subsequent pass through the rota, items that could not make progress previously might be able to this time. However, because the active count was left over from before they were excluded and OnData() would not do all the work it could possibly do.

All this only applies to old P2 traces.

#rb jb
#rnx
#preflight 620cd9a36202a22eeddb71ff

[CL 19014434 by Martin Ridgers in ue5-main branch]
2022-02-16 10:14:39 -05:00
Martin Ridgers
0e00b638ae Call OnData() one last time after reaching the end of the input trace stream.
Newer protocol traces consume as much data as they can before returning from OnData(). Older protocol support however can return will data still to process that will be continued on the next OnData() call. However, if the end of input stream has already been met the subsequent OnData() call is not made. The bug's always been present but hidden by a small input buffer.

#rb jb
#rnx
#preflight 620a5b00803d9066e67bf24d

[CL 18978509 by Martin Ridgers in ue5-main branch]
2022-02-14 08:55:31 -05:00
Martin Ridgers
4654c71f03 Restored early out once all analyzers have indicated they're no longer interested in further events.
#rb jb
#rnx
#preflight 620622d6b832ea70d8816819

[CL 18949967 by Martin Ridgers in ue5-main branch]
2022-02-11 04:03:07 -05:00
Martin Ridgers
42fe03350e Read much larger chunks of trace data to improve throughput and ease analysis engine's poor behaviour when it is waiting on a dependent event to arrive.
#rb jb
#rnx
#preflight 6204ce8d000261ff89f8933e

[CL 18933162 by Martin Ridgers in ue5-main branch]
2022-02-10 03:53:13 -05:00
Martin Ridgers
33432ea349 No-unity compile fix.
#rb trivial
#rnx
#jira ue-141616
#preflight none

[CL 18899943 by Martin Ridgers in ue5-main branch]
2022-02-08 02:53:01 -05:00
Martin Ridgers
6bee1a2eb6 Be explicit about the character size we're expecting.
If TCHAR happens to change to something other than a 16bit integer (e.g. because wchar_t is four bytes on a platform, or because the engine changes to UTF8), the analysis engine will no longer be able to read traces with char16_t-type strings.

#rb jb
#rnx
#preflight 61fd3091ed26b9fd9c7fcc0e

[CL 18862539 by Martin Ridgers in ue5-main branch]
2022-02-04 09:16:04 -05:00
Martin Ridgers
e50b917312 - Changed deleter of Buffer to be the class that allocated it
- Implemented move-constructor/assignment operator. Transport keeps an array threads, each of which of owns a FStreamBuffer instance. When Transport resizes this array, it copies items about. Because there are no move constructors, the compiler ends up cloning FStreamBuffers (via copy-constructing) and incorrectly deleting Buffer pointers still in use.
#rb jb
#rnx
#preflight 61fd3044e17efe76d1b6174c

[CL 18862467 by Martin Ridgers in ue5-main branch]
2022-02-04 09:07:30 -05:00
Martin Ridgers
ccba804191 Missing const on a less-than-operator
#rb trivial
#preflight trivial
#rnx

[CL 18769128 by Martin Ridgers in ue5-main branch]
2022-01-28 03:41:42 -05:00
Martin Ridgers
08a8b26425 CALLBACK can be defined elsewhere and cause compile errors in this file. Plus SHOUTY template parameters aren't conformant.
#rb jb
#rnx
#preflight 61f26eaf706ac5ea0cf520e6

[CL 18751696 by Martin Ridgers in ue5-main branch]
2022-01-27 05:21:14 -05:00
martin ridgers
e2a92fd858 Suppress false-positive warning from PVS.
#rb trivial

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 18475356 via CL 18475359 via CL 18475364 via CL 18475497 via CL 18481188 via CL 18481212
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18481249 by martin ridgers in ue5-main branch]
2021-12-16 19:11:52 -05:00
martin ridgers
f8a66e2a8f Suppress false-positive warning from PVS.
#rb trivial

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 18475356 via CL 18475359 via CL 18475364 via CL 18475497 via CL 18481188
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18481212 by martin ridgers in ue5-release-engine-test branch]
2021-12-16 19:09:46 -05:00
Johan Berg
190178593b Consider if a buffer is in demand (someone asked for more data than it can provide) as a condition of processing more trace data.
While there may be data remaining in the buffer, there might not be enough to decode another transport packet. Thus it is not correct to only consider the remaining number of bytes in the buffer as a condition of continuing to process data. Fortunately there is a demain hint that is set when someone asks for more data than a stream reader can provide. This can be used to differentiate between data remaining in the buffer, and not being able to do anything more with it.

#rb martin.ridgers, johan.berg
#rm 5.0
#ushell-cherrypick of 18267675 by Martin.Ridgers
#jira UE-134430, UE-135475
#preflight 619cf19cf70a9e92db3b69f7

[CL 18269671 by Johan Berg in ue5-main branch]
2021-11-23 09:34:58 -05:00
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