Commit Graph

363 Commits

Author SHA1 Message Date
evgenii babinets
8704998a31 Added a few implementations of the ANSI overload of FExternalProfiler::StartScopedEvent. These both support ANSI natively and so we don't need to go through an expensive TCHAR conversion if that is what the build is configured to. This should make it viable to use the ANSI external profiler on all platforms.
#rb jordan.cristiano

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18717386 via CL 18717574 via CL 18717635 via CL 18718411 via CL 18718440
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18718451 by evgenii babinets in ue5-main branch]
2022-01-24 20:26:37 -05:00
johan berg
4e9859fe11 [Insights] Clear thread buffer for Cpu scopes
In order to avoid scopes ending up after thread end (rare) clear the thread buffer pointer. In that case a new thread buffer will created, specifically for that scope.

#rb ionut.matasaru
#preflight 61eaaff35f04f4cdf1bae9bd

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18688576 in //UE5/Release-5.0/... via CL 18688580 via CL 18688590
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18688595 by johan berg in ue5-main branch]
2022-01-21 08:32:31 -05:00
ionut matasaru
a6866d78e1 [Insights]
- Updated help for trace console commands.
  - Fixed comments and code style issues in TraceAuxiliary.

#rb Johan.Berg
#preflight 61ea7ced445cebac10bcd2da

#ROBOMERGE-OWNER: ionut.matasaru
#ROBOMERGE-AUTHOR: ionut.matasaru
#ROBOMERGE-SOURCE: CL 18687495 in //UE5/Release-5.0/... via CL 18687855 via CL 18687859
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18687864 by ionut matasaru in ue5-main branch]
2022-01-21 06:40:36 -05:00
johan berg
a329d56129 [Insights] Always start Trace worker thread, even if SupportsMultithreading is false.
Trace normally runs with a worker thread to write data regularly, however when `FPlatformProcess:SupportsMultithreading` was false we did not start the worker thread, instead we relied on EndFrame delegate to manually pump Trace. When tracing is very intense (e.g. memory tracing) could lead to data building up internally, up to 1 GB of data by the time the first frame callback came. We have recently added a special sync type packet in the stream to deal with edge cases related to late-connect, so analysis stalled until those came trough. However since the backlog of data has to be transmitted first, those sync packet ended up after the initial data. Analysis had to (very inefficiently) get trough that 1Gb of data before the first sync packet came through and events starts to appear.

With this change trace always start the worker thread (if we're intending to fork) regardless of the SupportsMultithreading setting.

#rb ionut.matasaru, ben.woodhouse

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18675264 via CL 18675395 via CL 18675411 via CL 18675736 via CL 18675867 via CL 18675943
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)

[CL 18679793 by johan berg in ue5-main branch]
2022-01-20 15:27:07 -05:00
johan berg
50b2ee38ab [Insights] When tracing to file all relative paths should go to Profliling dir
When starting a trace to a file, all relative paths should go to the Profiling directory, on Windows even paths that starts with '/'. Also cleaned up includes.

#rb ionut.matasaru
#jira UE-138824
#preflight 61e963e7817064a62d47ddc1

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18673744 in //UE5/Release-5.0/... via CL 18673759 via CL 18673763
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)

[CL 18673770 by johan berg in ue5-main branch]
2022-01-20 08:45:52 -05:00
johan berg
a56558e662 [Insights] Fix copy paste and build error
* An extra '&' token was removed on the type alias in the no logging case.
 * In the case where trace is enabled, but logging is disabled, made a identical solution in TraceAuxImpl.

#rb ionut.matasaru
#jira UE-139439, UE-139433, UE-139444
#preflight 61e80742843acf1b2429961b

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18657057 in //UE5/Release-5.0/... via CL 18657068 via CL 18657070
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18657072 by johan berg in ue5-main branch]
2022-01-19 07:58:49 -05:00
johan berg
8faf5c82d8 [Insights] Fix for no logging situations
#rb ionut.matasaru
#preflight 61e586b0873f2ea48f2fdd62

#ROBOMERGE-OWNER: johan.berg
#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18633108 in //UE5/Release-5.0/... via CL 18633166 via CL 18633182
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637368 by johan berg in ue5-main branch]
2022-01-18 04:30:03 -05:00
johan berg
61dc9c192e [Insights] Allow log output in TraceAux to be routed to arbitrary category.
In order to be able to output detailed error and status messages to both core log or console feedback log depending on situation, add argument to set the target category. Also removed now redundant logs in console commands, since more detailed information is now emitted on the console feedback.
#preflight 61e56f34873f2ea48f23d007

#ROBOMERGE-OWNER: johan.berg
#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18632544 in //UE5/Release-5.0/... via CL 18633016 via CL 18633031
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)
#ROBOMERGE-CONFLICT from-shelf

[CL 18637343 by johan berg in ue5-main branch]
2022-01-18 04:24:47 -05:00
johan berg
bfd98e9be4 [Insights] Append default file name for paths that end in directories.
Append the default file name when the trace target path ends with a slash, for examplethe path "foo/bar/". The target trace file will then be "foo/bar/defaultname.utrace". Note that "foo/bar" will still target "foo/bar.utrace".

#jira UE-138824
#rb ionut.matasaru
#preflight 61e53ecd0c34e9a5ae5f838e

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18631469 in //UE5/Release-5.0/... via CL 18631663 via CL 18631684
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18636673 by johan berg in ue5-main branch]
2022-01-17 23:59:28 -05:00
johan berg
0f8c7422fa [Insights] Reset commandline channels at every start.
* Whenever starting a trace command (from the api or console command), reset the current command line list of channels.
* Don't assume default channels should be enabled if none are given. For command line arguments this will still be the case, but not console commands or the API.
* Emit log message when auto connecting.
#preflight 61e189669010dadd257b0e38

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18617306 in //UE5/Release-5.0/... via CL 18617329 via CL 18617340
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18617352 by johan berg in ue5-main branch]
2022-01-14 09:46:50 -05:00
chris constantinescu
2ba0ad45bd LLT compilation errors
#rb Mark.Lintott
#fyi Johan.Berg
#preflight 61e07705250b9537f77b63e2

[CL 18602976 by chris constantinescu in ue5-main branch]
2022-01-13 15:11:41 -05:00
johan berg
80431861dc [Insights] Additional memory tracing for many platforms
Implement additional memory tracing for many platforms to bring up parity with LLMs tracking.

#rb ionut.matasaru
#preflight 61e02b04341d372424d19559

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18596048 in //UE5/Release-5.0/... via CL 18596070 via CL 18596080
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18596949 by johan berg in ue5-main branch]
2022-01-13 10:23:22 -05:00
johan berg
c20950e20d [Insights] Only do memory allocation for callstack tracing when used.
Move code that reserved memory for callstack hashes used in callstack tracing to execute when used. Additionally add configuration options to allow platform specific values and behaviour.

#jira UE-137199
#rb ionut.matasaru
#preflight 61e02047341d372424d0ef7a

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18595791 in //UE5/Release-5.0/... via CL 18595800 via CL 18595801
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18596759 by johan berg in ue5-main branch]
2022-01-13 10:13:34 -05:00
Johan Berg
3f145e5a7a [Insights] Fix compile issue and bug where commandline trace channels would be lost.
#rb none
#preflight 61d835ec6511bc498e5c16ce

[CL 18541788 by Johan Berg in ue5-main branch]
2022-01-07 08:01:05 -05:00
johan berg
822346c9d1 [Insights] Trace console commands improvments.
* Added 'Trace.Enable' and 'Trace.Disable' console commands to control channels.
* 'Trace.Start' is marked as deprecated in favor of Trace.File.
* For 'Trace.File' both arguments are now optional, and heuristic for detecting a file argument implemented.
* 'Trace.Stop' no longer disables channels.
* 'Trace.Pause/Resume' now keeps a list of the current active channels which will be restored. Logic for enabling channels has been separated from EnableChannels which is used in initialization sequence.
* Changed FChannel toggling to directly write the state. This change was done to reduce confusion around enabling/disabling channels and preset that overlaps.
* Refactored some methods internal to FTraceAuxilliaryImpl

#jira UE-136002
#preflight 61d80f13430de36baa590e55

#ROBOMERGE-OWNER: johan.berg
#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18540924 in //UE5/Release-5.0/... via CL 18540956
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18540960 by johan berg in ue5-release-engine-test branch]
2022-01-07 05:19:00 -05:00
Marc Audy
f512a6d461 Eliminate whitespace only differences between Release-Engine-Staging and Release-Engine-Test
#fyi Aurel.Cordonnier

[CL 18448630 by Marc Audy in ue5-release-engine-test branch]
2021-12-13 15:59:48 -05:00
ben woodhouse
133deadd0c Fix parsing of the -csvmetadata arg, so it doesn't stop on separators
Refactor csvExecCmds to move the initialization logic into the CSV profiler itself. The execution still needs to happen in the engine, but this is now done during normal frame processing.
Fix a bug when processing csv execcmds with colons, e.g file paths

#ROBOMERGE-OWNER: ben.woodhouse
#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 18442929 via CL 18442943 via CL 18442951 via CL 18445402 via CL 18445577
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18445604 by ben woodhouse in ue5-release-engine-test branch]
2021-12-13 13:48:53 -05:00
johan berg
0d74ea37ae [Insights] Memory units IEC compatible, use ToString to log stringbuilder.
#rb ionut.matasaru

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18430091 in //UE5/Release-5.0/... via CL 18435285
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18435510 by johan berg in ue5-release-engine-test branch]
2021-12-10 17:45:22 -05:00
johan berg
a0801850e1 [Insights] Added Trace.status console command
Added console command to print status of trace to in game console. In order to list the available channels a enumeration method was added.

#rb martin.ridgers
#jira UE-136018
#preflight 61b32d0dc01c89f906dc3dbd

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18429738 in //UE5/Release-5.0/... via CL 18429749
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18429751 by johan berg in ue5-release-engine-test branch]
2021-12-10 05:52:36 -05:00
johan berg
745283887e Fix unity issue.
#rb none

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18429680 in //UE5/Release-5.0/... via CL 18429694
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18429696 by johan berg in ue5-release-engine-test branch]
2021-12-10 05:31:26 -05:00
johan berg
504310ad02 [Insights] TraceMalloc should not use it's own root heap
* TraceMalloc should not use it's own root heap. Instead it will use a regular heap in system memory and make fake heaps (since we can't track virtual allocations for trace's own allocations).
 * The first named was miscategorized as a root heap.

#rb ionut.matasaru

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18417001 in //UE5/Release-5.0/... via CL 18417015
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18417028 by johan berg in ue5-release-engine-test branch]
2021-12-09 04:07:17 -05:00
johan berg
f0f428cd8f [Insights] Add special tag for Trace.
* Adds special value reserved to Trace allocations
 * Adds checks to avoid collisions between FName indices and ELLMTags.
#preflight 61af41ca353890ce23edcf36

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 18393722 in //UE5/Release-5.0/... via CL 18393732
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18393738 by johan berg in ue5-release-engine-test branch]
2021-12-07 06:54:54 -05:00
andrew firth
cf447a1923 [CsvProfiler] - enable continuous writes
#rb Ben.Woodhouse
#preflight 6155e22d9ed4ad000136d556

#ROBOMERGE-AUTHOR: andrew.firth
#ROBOMERGE-SOURCE: CL 17680019 via CL 17966846 via CL 18365976 via CL 18366088
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366185 by andrew firth in ue5-release-engine-test branch]
2021-12-03 01:32:26 -05:00
andrew firth
98a85f7fdd [CSV] - adding SystemMaxMB to CSV reports to represent console retail memory limit on the produced graphs.
[at]Brandon.Dawson
#preflight 613a73890c19af0001d3358e

#ROBOMERGE-AUTHOR: andrew.firth
#ROBOMERGE-SOURCE: CL 17477492 via CL 17926806 via CL 18361979 via CL 18362053
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18362119 by andrew firth in ue5-release-engine-test branch]
2021-12-02 18:58:00 -05:00
jon nabozny
4b2669cd2b [CSVProfiler] - move initialization of ExtraDevMemory to an explicit call POST initialization of platform memory subsystems to avoid initialization order problems with the first call to the CSVProfiler singleton.
[at]Ben.Woodhouse
#rb Ben.Woodhouse
#preflight 6138c4f99c40ec0001271e5d

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: andrew.firth
#ROBOMERGE-SOURCE: CL 17458711 via CL 17911290 via CL 18360722 via CL 18361121
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18361361 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 18:21:43 -05:00