Commit Graph

111 Commits

Author SHA1 Message Date
robert millar
5811293e2a Add TargetRules.bFNameOutlineNumber as an option to reduce the size of FName by 4 bytes by storing the number in the name table.
Adds a define UE_FNAME_OUTLINE_NUMBER.
Removes of FName, FMinimalName from memory image support. Adds of FMemoryImageName.
Removal of FMinimalName operator<<, all fields made private, size made variable.
All fields of FScriptName made private.
Added console commands for dumping numbered/unnumbered names and stats.

#rb johan.torp

#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19058026 via CL 19058611 via CL 19058656 via CL 19061727 via CL 19061740 via CL 19064047
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066701 by robert millar in ue5-main branch]
2022-02-21 02:35:48 -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
geoff evans
08dc557886 Some warning fixes for when running Commandlets with -NoEnginePlugins
* Silence module load warnings unless doing LoadModuleChecked or specified
* Silence class load warnings when loading types from plugins inside APawn::APawn

#jira none
#rb francis.hurteau
#preflight 60904c8c7d9bf9000187b48b

[CL 16186734 by geoff evans in ue5-main branch]
2021-05-03 16:41:17 -04:00
Steve Robb
beb4a4bf54 Ensure that ::operator new always allocates at least one byte, even if Malloc doesn't.
Replacement operator/delete overloads for C++17 which are alignment-aware.

#rb robert.manuszewski
#jira none
#fyi martin.sevigny

[CL 16033699 by Steve Robb in ue5-main branch]
2021-04-16 10:27:57 -04:00
Tim Smith
a2237e050d LiveCoding Re-instancing
LIMITATIONS:

1) Re-instancing will only update UClass instance data.
2) Adding and removing properties should only be done towards the end of a class or structure and can not be followed by complex data types.
3) Adding and removing properties from a base class should not be done if a derived class contains complex data types.

KNOWN ISSUES:

1) Changes to enumerations and structures will not be reflected in existing blueprints.  However, adding new nodes to the blueprint will show the updated enumeration or structure.
2) If a class contains an enumeration or structure as a member, the class will not be re-instanced if enumeration or structure is changed.

CHANGES:

1) LiveCodingServer
1a) Modified to always execute certain static instances during load.
1b) Modified to exclude the _Statics static structures to avoid patching to old copies.

2) Added support for LiveCoding reinstancing
2a) Refactored deferred registration system for UClass, UEnum, and UScriptStruct to use a common system that works for normal game, hot reload and live coding.
2b) Type specific version check data is possible (i.e. enum doesn't have a size)
2c) Single registration static for UClass
2d) Single registration class for all types that is just a blind forward to API.
2e) Static and dynamic registrations use different API entry points to avoid having overloaded argument lists that just apply to one or the other.
2f) Shims for older API

3) New common "Reload" system to avoid using HotReload code.
3a) Support common delegates regardless of who is reloading/reinstancing.
3b) Re-instancing code moved from HotReload to Kismet2 (where the bulk of the re-instance code already existed).
3c) Modified PyWrapper to use new helper class instead of depending on HotRelaod
3d) Added WITH_RELOAD which is defined if HotReload or LiveCoding is enabled.
3e) Modifed existing code to use new #define and delegates.

Robert did the review on the changes covered by Part 2.  Remaining changes are all straightforward.

#rb robert.manuszewski
#jira UE-74493

[CL 15736777 by Tim Smith in ue5-main branch]
2021-03-18 08:13:59 -04:00
Marc Audy
bf80889353 UE5/Release-Engine-Staging to UE5/Main
This represents UE4/Main up to CL# 14958402

[CL 15028197 by Marc Audy in ue5-main branch]
2021-01-08 19:56:07 -04:00
Zousar Shaker
77d13185b7 Copying //UE5/Dev-Cooker@14539516 to Main (//UE5/Main)
[CL 14539954 by Zousar Shaker in ue5-main branch]
2020-10-21 17:56:05 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
ben marsh
6e9ae6e6fe Fix needing to manually enable building when launching projects from installed engine builds. Rather than relying solely on the engine promoted flag to determine whether a target should be built, we now check for the presence of a matching target receipt with the correct version information. If it's present, we don't trigger the build.
#rb none
#jira UE-89722, UE-90936

#ROBOMERGE-SOURCE: CL 12492552 in //UE4/Release-4.25/... via CL 12492554 via CL 12492556
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12492558 by ben marsh in Main branch]
2020-03-30 21:37:35 -04:00
Arciel Rekman
337e706273 Optimize shader compilation through XGE (bringing CL 11084076)
- Avoid directory scanning for .ini files by restoring already initialized config cache state on the workers
  - Avoid directory scanning for modules by restoring already initialized modulemanager state on the workers
  - Avoid directory scanning for external profilers DLLs by disabling the option in the build config
  - 20s -> 319ms of FEngineLoop::PreInit which was caused by directory scan through XGE remote filesystem
  - 5% -> 96% efficiency when computing the effective work against process total time for remotely built shaders
  - 5m36 ->1m26s to run "recompileshaders all" console command including waiting on async built shaders

#rb Danny.Couture (authored), Luke.Thatcher, Steve.Robb, Josh.Adams
[FYI] Bob.Tellez, Danny.Couture


#ROBOMERGE-OWNER: Arciel.Rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 11106212 via CL 11106216
#ROBOMERGE-BOT: (v640-11091645)

[CL 11106241 by Arciel Rekman in Main branch]
2020-01-24 12:16:02 -05:00
graeme thornton
5059d3cb48 Make UAT use a config setting to decide which editor target is the default for use within automation scripts
Have UBT set the source target name as a define during compilation. For unique environments, embed that macro globally, but in shared environments just embed it into game modules.
Have the primary game module bind that define to a core delegate so engine systems can query it
Make LiveCodingModule pass the UBT target name to the UBT so that it doesn't have to guess which target to build
For agnostic executables (UE4Game, UE4Editor)  running content only projects, the delegate won't be bound, so revert back to type based recompile requests in live coding
Handle DTE string for VS2019 in the source code accessor module

#rb ben.marsh


#ROBOMERGE-SOURCE: CL 11103653 via CL 11103654 via CL 11103656
#ROBOMERGE-BOT: (v640-11091645)

[CL 11103658 by graeme thornton in Main branch]
2020-01-24 03:22:33 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
graeme thornton
4f9900cc76 Move module manager extra search path configuration out of FModuleManager::Get() and into a seperate function which is called from the launch engine loop AFTER platform files are created. Ensures that editor builds that use pak files have the paks mounted before we start scanning for data driven platform ini files
josh.adams, luke.thatcher, jeff.newquist
#rb none

#ROBOMERGE-OWNER: graeme.thornton
#ROBOMERGE-AUTHOR: graeme.thornton
#ROBOMERGE-SOURCE: CL 10380309 via CL 10380320
#ROBOMERGE-BOT: (v594-10333955)

[CL 10382192 by graeme thornton in Main branch]
2019-11-22 18:07:57 -05:00
JeanMichel Dignard
d4f0f4d3f2 Copying //UE4/Dev-Enterprise @ cl 9420543 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 9420574 by JeanMichel Dignard in Main branch]
2019-10-04 13:11:45 -04:00
steve robb
14cab21e0c Deprecating ARRAY_COUNT and changing it to UE_ARRAY_COUNT.
Replicated from CL# 7924370.

#rb none


#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 9279060 via CL 9279063
#ROBOMERGE-BOT: (v443-9013191)

[CL 9279836 by steve robb in Main branch]
2019-09-28 08:19:35 -04:00
Josh Markiewicz
d79515867d Copying //UE4/Dev-Online to Dev-Main (//UE4/Dev-Main)
- Up to CL8320930 from DevOnline and 8311605 Merge Down from Main
- skipped some Fortnite content/plugins/code where it tried to reintegrate files that had been moved pending investigation
#rb none

[CL 8321295 by Josh Markiewicz in Main branch]
2019-08-26 18:35:22 -04:00
jamie dale
f322c99de8 Updated MU engine versioning to use the current build version
We've seen the compiled-in engine versions get out-of-sync when dealing with pre-built binaries vs binaries built locally by a programmer, so we've changed the validation to use the current engine version, and to override the changelist with the Build.version data (if available). The changelist in the Build.version data will always be the latest CL# synced in UGS, regardless of whether you're using a pre-built or locally compiled editor.

This change makes the older BaseRevision setting redundant, but we've kept it around for now (set to zero) so that we can hopefully change it to store the real content base revision in the future (in a way that works for projects not using UGS, eg) using pre-built editors from the public launcher).

Since the base revision is now always zero, it's been removed from the UI, and the UI has been updated to show you the engine version of a session instead.

#jira UE-77465
#rb Francis.Hurteau
#rnx

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 7429459 in //UE4/Release-4.23/... via CL 7429461
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v372-7473910)

[CL 7488884 by jamie dale in Dev-Build branch]
2019-07-22 20:47:14 -04:00
jamie dale
469410d055 Updated MU engine versioning to use the current build version
We've seen the compiled-in engine versions get out-of-sync when dealing with pre-built binaries vs binaries built locally by a programmer, so we've changed the validation to use the current engine version, and to override the changelist with the Build.version data (if available). The changelist in the Build.version data will always be the latest CL# synced in UGS, regardless of whether you're using a pre-built or locally compiled editor.

This change makes the older BaseRevision setting redundant, but we've kept it around for now (set to zero) so that we can hopefully change it to store the real content base revision in the future (in a way that works for projects not using UGS, eg) using pre-built editors from the public launcher).

Since the base revision is now always zero, it's been removed from the UI, and the UI has been updated to show you the engine version of a session instead.

#jira UE-77465
#rb Francis.Hurteau
#rnx

#ROBOMERGE-SOURCE: CL 7429459 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v371-7306989)

[CL 7429461 by jamie dale in Main branch]
2019-07-17 15:38:26 -04:00
stefan boberg
285a908f86 Copying //UE4/Dev-Core to Dev-Main (//UE4/Dev-Main)
#rb none

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: stefan.boberg
#ROBOMERGE-SOURCE: CL 6815521 in //UE4/Main/...
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v365-6733468)

[CL 6821265 by stefan boberg in Dev-Build branch]
2019-06-03 19:09:16 -04:00
Stefan Boberg
8607ecb30d Copying //UE4/Dev-Core to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 6815521 by Stefan Boberg in Main branch]
2019-06-03 15:32:00 -04:00
Ben Marsh
30e4bcde00 Remove unused function for enumerating hot reload DLLs.
#rb none
#rnx

[CL 6631526 by Ben Marsh in Dev-Build branch]
2019-05-24 11:56:50 -04:00
Ben Marsh
0cc6e3dca6 Copying //UE4/Dev-Build to Dev-Main (//UE4/Dev-Main)
#rb none
#rnx

[CL 6631504 by Ben Marsh in Main branch]
2019-05-24 11:51:54 -04:00
Ben Marsh
7170e4ccc1 Live Coding: Fix several issues related to using launch on / packaged builds with Live Coding.
* The original .uproject file is now compiled into monolithic executables when Live Coding is enabled. This allows invoking UBT with the original project file when the executable is staged to a different directory. This parameter can be overriden via the LiveCoding.SourceProject cvar.
* The original engine directory is also compiled into the executable. This allows finding the console executable path without having to enter it manually via the LiveCoding.ConsolePath cvar.
* If an exact match for a binary filename is not found, try to find a match by name only. Also required to support staged builds for 'Launch On', etc...
* Add a LiveCoding.Compile command to trigger a compile from the console.

#rb none
#jira UE-72677
#jira UE-72678
#jira UE-72683

[CL 6625676 by Ben Marsh in Dev-Build branch]
2019-05-23 20:41:59 -04:00
Johan Torp
effcc1475e FName debug visualization fixes
* Fixed static configs that used the wrong stride
* Also exposed some constants in NameTypes.h to improve robustness and reduce duplication of constants across UE4.natvis, PS4UE4.natvis and LLDB UE4DataFormatters.py.
* Reverted back to using DisplayIndex instead of ComparisonIndex for DisplayString
* Reverted back to using quotes around the string part, e.g. '"MyName"_123' instead of 'MyName_123'
* Speculative LLDB data formatter fix
* Fixed FStatMessage natvis special case where Cycles contained and extra FMinimalName
* Updated Natvis README.txt

#rb pj.kack, steve.robb

[CL 6251647 by Johan Torp in Dev-Core branch]
2019-05-02 07:44:57 -04:00
Johan Torp
ccd9c2597d FName optimizations and improvements
Encoding improvements
* New hash table implementation
--- Move away from 16-bit hashes since we need more than 64k buckets to hold 2M entries efficiently
--- Change to CityHash64, which is faster and stronger
--- Remove hardcoded max limit
* NAME_INDEX changed from contigouos int to monotonically increasing int
--- Opens up for future deduplication schemes that are better than number suffix dedup.
--- Saves some memory since we don't need to maintain a contiguous array
--- Typed up to cause compile errors when used as integer directly
* Avoid touching data repeatedly, normal path only does single hash of data
* New constructor that allows supplying string length up front
* Avoid dynamic allocations in string conversions >= 128 characters
* Avoid extra copying when splitting numbers
* More efficient IsPureAnsi check
* Only do one global lazy initialization call instead of multiple
* Switch to faster RW locks
* Switch from single lock to sharded hash map with separate locks
* Memory optimizations that reduces per entry overhead: 4 bytes slots, 2 byte headers and don't store null terminator

Improved API & documentation
* Document that IsValid() rarely makes sense
* Hide global state such as GetNames()
* Reduce amount of implementation details visible in header
* NameTypes.h size down by ~1/3 while adding documentation, stronger type safety and new APIs

Future possibilities
* Memory savings: Removing public NAME_INDEX and global FName array allows using the 32-bit FNameEntryId for arbitrary deduplication schemes. This can save both actual stored strings memory by deduplication and half the size of FName instances from 8B to 4B in shipping / test configs by removing the number part.
* Implementation can be tweaked further, for instance could persist 32-bit slot index hash inside slot to increase encoding performance in development / debug at the cost of memory.

Perf & mem results for internal project:
* Editor startup wall time: 12% speedup, 22.0s -> 19.5s
--- Warm disk and asset registry cache
--- Some gains from nametable serialization improvements
--- Some of these gains might be from orthogonal asset discovery optimizations
* Win64 Test Client memory usage with ~400k names: 30.3Mb -> 22.2Mb

#rb steve.robb, pj.kack
#jira UE-59973

[CL 5774657 by Johan Torp in Dev-Core branch]
2019-04-08 11:29:35 -04:00