Commit Graph

54 Commits

Author SHA1 Message Date
joe kirchoff
e0254d98e8 UnrealBuildTool: Fix Action properties that weren't being serialized
#rnx

[CL 24878293 by joe kirchoff in ue5-main branch]
2023-03-31 16:51:20 -04:00
henrik karlsson
3f6b2896a8 [UnrealBuildTool]
* Added experimental executor "Box"

#preflight 6414e9a4ca2afe3ee6c35c9a
#rb partly joe.kirchoff (not the Box code part)

[CL 24702059 by henrik karlsson in ue5-main branch]
2023-03-18 01:42:55 -04:00
bryan sefcik
f3f15a7aa5 Fixed an issue where -allcores would not be used if ProcessorCountMultiplier was set.
Fixed an issue where it was possible to do more parallel actions than cores available.

#rb joe.kirchoff
#preflight 640bc8aa363e9b40abeac263

[CL 24600925 by bryan sefcik in ue5-main branch]
2023-03-10 19:27:40 -05:00
Ben Marsh
7e26c34d2b EpicGames.Core: Deprecate legacy log methods to prefer structured logging interface.
#preflight 640a23d928026468d9de7cbd

[CL 24580590 by Ben Marsh in ue5-main branch]
2023-03-09 14:51:40 -05:00
bryan sefcik
1ad98523c4 Added support to give actions in UBT "weight". "Weight" is an average measurement of how many cores and memory an action uses. Using one core with a normal amount of memory for an action would be a value of 1.
Why do this:
Currently when compiling a cpp file with MSVC, it compiles across multiple cores while clang does not. This means that while we support limiting the number of cores(using ProcessorCountMultiplier), MSVC will use more cores than we specify. It also means that MSVC will always be faster when compiling because clang does not support compiling a cpp over multiple cores. To get similiar results when compiling with clang, we set the weight of MSVC to 1.5 and the weight of clang to 1.0. We then set the ProcessorCountMultiplier to 1.5. This results in MSVC and clang taking roughly the same amount of CPU utilization and clang compiles to be much faster.

	                     Old Timing(secs)	Old CPU Utilization	New Timing	New CPU Utilization(secs)
PlatformA AncientGame	590.94	51	                               431.47	73
MSVC AncientGameEditor	1016.96	94	                             1026.08	95
Clang AncientGameEditor	1543.72	63	                               1270.4	84
PlatformB AncientGame	494	52	                               396.95	74

Old = without weight path
New = with weight path

#jira
#rb christopher.waters, joe.kirchoff
#preflight 6409026c8832f48a4dc72025

[CL 24567859 by bryan sefcik in ue5-main branch]
2023-03-08 17:08:22 -05:00
henrik karlsson
1c80dec3c0 [UBT]
* Changed so ParallelExecutor is creating build tasks as resources becomes available instead of building up a big task graph up front. The way the previous parallel executor was implemented could cause poor utilization of resources.

With this change plus 23915597  FortniteEditor wall time went down from ~15m to 13m  (tested three times with and without changes)

#preflight 63d5d8eb5c69f453c19e5385
#rb Joe.Kirchoff

[CL 23923458 by henrik karlsson in ue5-main branch]
2023-01-31 01:16:30 -05:00
Joe Kirchoff
042c3ca548 UnrealBuildTool: Use Normal priority for ParallelExecutor for asymmetric processors as BelowNormal can cause scheduling issues
#rnx
#rb trivial
#jira UE-168380
#preflight 63b8b7ce577437afe614728f

[CL 23605849 by Joe Kirchoff in ue5-main branch]
2023-01-06 19:29:19 -05:00
joe kirchoff
8046ba0c0d UnrealBuildTool: Ensure Action list is ordered before running any executor. Pass in IEnumerable instead of List
#rnx
#rb trivial
#preflight 635b20e0015611ae3a0d8f30

[CL 22831783 by joe kirchoff in ue5-main branch]
2022-10-28 13:27:22 -04:00
joe kirchoff
5c30a5e753 AutomationTool: Support running ParallelExecutor with all cores
#rnx
#rb trivial
#preflight 63361e532f447ea8dc2fce20

[CL 22271227 by joe kirchoff in ue5-main branch]
2022-09-30 11:12:48 -04:00
joe kirchoff
9d5e715748 UnrealBuildTool: Option to consider logical cores when running local builds
#jira UE-163438
#rnx
#rb none
#preflight 631baf2a304480f8f8bceac6

[CL 21930861 by joe kirchoff in ue5-main branch]
2022-09-09 19:16:18 -04:00
Ben Marsh
22feecaa2c UBT: Fix missing event markup when executing directly inside UBT. Event parsers are only currently run when using old logging methods.
#preflight none

[CL 20440822 by Ben Marsh in ue5-main branch]
2022-05-31 15:44:53 -04:00
Ben Marsh
cbb950c578 UBT: Use ILogger throughout UBT, rather than legacy EpicGames.Core.Log methods. All output going forwards should use structured logging rather than String.Format style logging.
#preflight 628e9dc6e746de4961f60032

[CL 20373777 by Ben Marsh in ue5-main branch]
2022-05-25 19:55:37 -04:00
Joe Kirchoff
930b065eba UnrealBuildTool: Expose ParallelExecutor.ProcessPriority to xml config
#rb none
#rnx
#preflight 628530752a7df8ed9fa70e54

[CL 20264894 by Joe Kirchoff in ue5-main branch]
2022-05-18 14:04:04 -04:00
Joe Kirchoff
c2ecac79bb UnrealBuildTool: Don't build a prereq action if it's not in the list of all actions to build
#jira UE-150951
#rb trivial
#rnx
#preflight 6272bbe02f6d177be3ccd558

[CL 20044734 by Joe Kirchoff in ue5-main branch]
2022-05-04 14:01:57 -04:00
jonathan adamczewski
11d542c545 UnrealBuildTool: add -CompactOutput command line option, supported by ParallelExecutor
Also can be set via BuildConfiguration.xml with:

<BuildConfiguration><bCompactOutput>true</bCompactOutput></BuildConfiguration>

#jira none
#preflight 626ae00e2c7b46848542a57f

[CL 19982217 by jonathan adamczewski in ue5-main branch]
2022-04-29 13:52:17 -04:00
Joe Kirchoff
a5d640b8b8 UnrealBuildTool: Retry failed HordeExecute remote tasks. Additional logging
#rnx
#rb none
#preflight 62606573dd47b4ad218101d5

[CL 19837598 by Joe Kirchoff in ue5-main branch]
2022-04-20 16:32:18 -04:00
Joe Kirchoff
58d330a938 UnrealBuildTool: Clean up ParallelExecutor to not require waiting manually on prereq actions by building a continuation tree of async tasks
Split logic into multiple static functions and make protected so it can be shared with an inherited class

#rnx
#rb Jonathan.Adamczewski
#preflight 62473274637925b5d3e0f1f3

[CL 19596364 by Joe Kirchoff in ue5-main branch]
2022-04-01 17:49:28 -04:00
Joe Kirchoff
9f494a0864 UnrealBuildTool: Log PVS-Studio failure as an error
#rnx
#rb trivial
#preflight 620d58683609e19371479143

[CL 19020701 by Joe Kirchoff in ue5-main branch]
2022-02-16 15:16:28 -05:00
Joe Kirchoff
da53ed939e UnrealBuildTool: Replace ParallelExecutor with (no longer experimental) TaskExecutor
#rnx
#rb none
#preflight 61e71d2bb56c33b8ecf48659

[CL 18646501 by Joe Kirchoff in ue5-main branch]
2022-01-18 15:19:06 -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
jonathan adamczewski
fc9c27c855 UnrealBuildTool: add option bShowPerActionCompilationTimes to Parallel & Task executors
Disabled by default.

When enabled, adds wall time and CPU time numbers for each action e.g.
  [543/665] (Wall: 6.33s CPU: 8.19s) Compile AssetBundleData.cpp
  [544/665] (Wall: 3.77s CPU: 4.03s) Compile SavePackage2.cpp
  [545/665] (Wall: 3.91s CPU: 4.56s) Compile WeakObjectPtr.cpp

#jira none
#rb joe.kirchoff

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 17636393 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17636432 by jonathan adamczewski in ue5-release-engine-test branch]
2021-09-27 16:48:30 -04:00
jonathan adamczewski
2f91a18571 UnrealBuildTool: allow MemoryPerAction to be set per-target
Can be used to reduce the number of build actions that will be run in parallel by ParallelExecutor or TaskExecutor.

Example use, in MyProject.Target.cs:

public class MyProjectTarget : TargetRules
{
	public MyProjectTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		DefaultBuildSettings = BuildSettingsVersion.V2;

		ExtraModuleNames.AddRange( new string[] { "MyProject" } );

		MemoryPerActionGB = 4;
	}
}

#jira none

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 17546182 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17546186 by jonathan adamczewski in ue5-release-engine-test branch]
2021-09-16 19:35:07 -04:00
ryan durand
1388a78f8c Backing out CL 16857053 to see if this fixes the hangs we've been seeing during Mac and Linux compiles.
#rnx
#rb none
#jira none

#ROBOMERGE-SOURCE: CL 16987118 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16987161 by ryan durand in ue5-release-engine-test branch]
2021-07-28 16:45:31 -04:00
joe kirchoff
ce96ff9682 UnrealBuildTool: Use process directly to get wall clock execution time
Process.StartTime raises an exception on non-windows platforms if the process has already exited, so cache it immediately after starting the FrameworkProcess
Process.TotalProcessorTime raises an exception on non-windows if the process has also exited, so don't do that

#rb none
#rnx

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

[CL 16863635 by joe kirchoff in ue5-release-engine-test branch]
2021-07-15 12:25:51 -04:00
joe kirchoff
8b0febe436 [Backout] - CL16863209
[FYI] joe.kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealBuildTool: Use process directly to get wall clock execution time

Process.StartTime raises an exception on non-windows platforms if the process has already exited, so cache it immediately after starting the FrameworkProcess

#rb none
#rnx

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

[CL 16863374 by joe kirchoff in ue5-release-engine-test branch]
2021-07-15 12:06:17 -04:00