Commit Graph

177 Commits

Author SHA1 Message Date
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
mark lintott
5a87419e09 NonUnity Fix
#jira none
#rb trivial
#preflight 61a503d9ee100b68fa9ef3eb

#ROBOMERGE-AUTHOR: mark.lintott
#ROBOMERGE-SOURCE: CL 18312439 in //UE5/Release-5.0/... via CL 18312534
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18312566 by mark lintott in ue5-release-engine-test branch]
2021-11-29 13:09:14 -05:00
mark lintott
266e8c0e8b Non-Unity compile fix
#jira none
#rb trivial
[FYI] jason.nadro
#preflight 61a4be03664cbb92c79ce284

#ROBOMERGE-AUTHOR: mark.lintott
#ROBOMERGE-SOURCE: CL 18308078 in //UE5/Release-5.0/... via CL 18308097
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18308100 by mark lintott in ue5-release-engine-test branch]
2021-11-29 07:28:42 -05:00
jason nadro
b1f38b302c Moving implementations of FResourceSize into the cpp.
#rb trivial
#jira none
#preflight 619d0a2b88439fccfe83ed5b

#ROBOMERGE-AUTHOR: jason.nadro
#ROBOMERGE-SOURCE: CL 18272635 in //UE5/Release-5.0/... via CL 18272657
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18272683 by jason nadro in ue5-release-engine-test branch]
2021-11-23 13:20:25 -05:00
jason nadro
40819376d6 [BuildFix] - Partially reverting my previous change (CL# 18259478) by putting the implementations back into the header.
#rb trivial
#jira none
#preflight 619bde671806a2425923ec2a

#ROBOMERGE-AUTHOR: jason.nadro
#ROBOMERGE-SOURCE: CL 18261575 in //UE5/Release-5.0/... via CL 18261586
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18261600 by jason nadro in ue5-release-engine-test branch]
2021-11-22 14:28:19 -05:00
jason nadro
21eb49709d Extend FResourceSizeEx to keep track of name for each memory size added. This allows for verbose reporting of resource sizes.
This results in output like the following:

                                                                                                                            Object      NumKB      MaxKB   ResExcKB  ResExcDedSysKB  ResExcDedVidKB  ResExcUnkKB
StaticMesh /Game/AncientContent/Megascans/Surfaces/Rock/SM_RockRough1.SM_RockRough1       1.31          1.33     395.50           12.75                  0.00                 382.75
						                               None                                                 12.75
							               None                                                  0.79
							               TexcoordBuffer and TangentBuffer       66.35
							               PositionVertexBuffer                            5.53
							               ColorVertexBuffer                              22.12
							               IndexBuffer                                       95.99
							               ReversedDepthOnlyIndexBuffer           95.99
							               ReversedIndexBuffer                          95.99
							               WireframeIndexBuffer                          0.00

- Adding a `-verbose` flag to `obj list` which will dump each tracked named size.
- Adding additional `AddSharedSystemMemoryBytes(const FName& Tag, const SIZE_T InMemoryBytes)` function which accepts a named tag.
- Modify FStaticMeshLODResources::GetResourceSizeEx() to use the new interface.
- Modify FSkeletalMeshLODRenderData::GetResourceSizeEx() to use the new interface.
- Remove the "Shared" version of the memory tracking functions.  These are not used at all across the engine.  This simplifies the code and makes the output of obj list more readable.
- Move FResourceSizeEx into its own cpp file so modifying the header isn't a painful full recompile.

#rb dave.jones2
#jira none
#preflight 619bb03f88439fccfe625cba

#ROBOMERGE-AUTHOR: jason.nadro
#ROBOMERGE-SOURCE: CL 18259478 in //UE5/Release-5.0/... via CL 18259492
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18259504 by jason nadro in ue5-release-engine-test branch]
2021-11-22 11:54:59 -05:00
ben woodhouse
42c2be7740 Csv profiler named event support
Add support for emitting named events from timing stats without compiling them in. This is controlled via new commandline options, which can be used in combination:
 -csvNamedEvents emits named events for exclusive stats
 -csvNamedEventsTiming emits named events for standard timing stats

Instrumentation overhead reduction
-Make it possible to disable CSVPROFILERTRACE_ENABLED, since this increases CSV profiler instrumentation overhead by about 15%
- Remove LLM scopes from stat functions and move into stat block allocation function. Reduces overhead slightly

#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 18253615 via CL 18253616 via CL 18253618 via CL 18253622 via CL 18253625 via CL 18254405 via CL 18254407
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18254408 by ben woodhouse in ue5-release-engine-test branch]
2021-11-21 07:17:10 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
martin ridgers
9eec07c695 Remove platform defintions
Mistakenly removed after resolving against 17516847.

#rb none
#rnx

#ushell-cherrypick of 17707595 by Johan.Berg

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

[CL 17746605 by martin ridgers in ue5-release-engine-test branch]
2021-10-07 03:10:15 -04:00
johan berg
199fd9b49e Nounity compile fix
#rb none
#rnx

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 17597139 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17597196 by johan berg in ue5-release-engine-test branch]
2021-09-22 13:00:02 -04:00
johan berg
98321a78e4 Memory tracing additional heaps
* Introduce the concept of heaps to memory tracing. A heap is defined a block of memory which can be used to host allocations. Heaps can be given descriptive names and belong to logical hierarchy. At the top of the hierarchy is one of 16 possible "root heaps". Currently the only two root heaps are system memory (virtual memory) and video memory (VRAM). If no root heap is specified for an allocation, system memory is assumed.
 * Remove the CoreAdd/CoreRemove events and replace them with Alloc + MarkAllocAsHeap events.
 * Introduce a public interface for tracing memory allocations.
 * Reduce the memory footprint of allocation events by changing the "Owner" field (hash or return address) into a "CallstackId" (running unique callstack counter). Additonally introduced a AllocSystem/AllocVideo specialized event which encodes the root heap in the message type. Total size of the event went from 21 bytes to 17 bytes/18 bytes.
 * Remove realloc scopes. These scopes comprised 50% of events during memory tracing, but the information can be reconstructed during analysis in the case of reallocations. The only other use case (in Level.cpp) was using the scope to maintain tag while copying from one array to another. For this use case we add a specific scope for pushing the tag of a specific pointer.

#rb ionut.matasaru
#preflight 614b0058a3310f000101cc42

#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 17594699 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17594714 by johan berg in ue5-release-engine-test branch]
2021-09-22 08:36:16 -04:00
martin ridgers
453671834e Moved some platform defines to their corresponding Core.Build.cs
[FYI] martins.mozeiko
#rnx
#preflight 6141a3cf9bba9a0001818033

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

[CL 17516874 by martin ridgers in ue5-release-engine-test branch]
2021-09-15 04:26:11 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
martins mozeiko
f12af98ed8 Enabled memory tracking with callstacks for PS4/5
Implementation details:
- PS4 & PS5 uses dwarf symbol format and uses Syms symbol resolver.
- To resolve symbols the path to folder where .self file is built currently must be specified in UE_INSIGHTS_SYMBOL_PATH env variable for Insights.
- Multiple paths can be separated by ; in this variable.
- Build for PS5 does not seem to have PLATFORM_PS5 define, I used defined(__PS5__).
- PS5 runtime collects and sends callstacks, but Syms resolver does not support dwarf v5 format yet, which is used on PS5 toolchain.

#rb none
#preflight 6112ead49c7bb10001bc63fc

#ROBOMERGE-SOURCE: CL 17128247 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17128270 by martins mozeiko in ue5-release-engine-test branch]
2021-08-10 20:07:09 -04:00
steve robb
ec1e7a003f TIsCharType moved to its own Traits header so that it can be included separately from others.
#rb none
#jira none

#ROBOMERGE-SOURCE: CL 17121870 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17121889 by steve robb in ue5-release-engine-test branch]
2021-08-10 15:07:13 -04:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
jeanfrancois dube
a09b3ad282 Added support for specifying a log category in UE_SCOPED_TIMER.
#rb patrick.enfedaque
#preflight 60eddff1caf05900017dc03a

#ROBOMERGE-SOURCE: CL 16841730 via CL 16841980
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16842010 by jeanfrancois dube in ue5-release-engine-test branch]
2021-07-13 16:12:20 -04:00
martin ridgers
c124df12d3 Allow counters-trace's on/off define to be defined in a Target.cs.
#rnx

#ROBOMERGE-SOURCE: CL 16772413 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16772422 by martin ridgers in ue5-release-engine-test branch]
2021-06-24 09:45:52 -04:00
martin ridgers
94f286cc28 - Removed explicit launching of the trace server in a couple of plugins. It was added temporarily to gather more information from CIS.
#rb jb
#rnx

#ROBOMERGE-SOURCE: CL 16741421 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16741432 by martin ridgers in ue5-release-engine-test branch]
2021-06-22 07:29:45 -04:00
ionut matasaru
b728114374 Fix for CIS compile error (-DisableUnity).
#rb none

#ROBOMERGE-SOURCE: CL 16674353 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16674364 by ionut matasaru in ue5-release-engine-test branch]
2021-06-15 11:46:47 -04:00
ionut matasaru
11690154ef [Insights]
- Fixed tracing of UObject names and function names (UObject::CallFunction, FScopeCycleCounterUObject) when "stat named events" toggle is enabled (-statnamedevents, "stat NamedEvents" console command).
  - Added FCpuProfilerTrace::OutputBeginDynamicEvent(const FName), in addition to existing API that receives const ANSICHAR*  or const TCHAR*. It uses a separate DynamicFNameScopeNamesMap.

#rb Johan.Berg
[FYI] Jeff.Farris

#ROBOMERGE-SOURCE: CL 16657504 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16657509 by ionut matasaru in ue5-release-engine-test branch]
2021-06-14 08:51:25 -04:00