Commit Graph

58 Commits

Author SHA1 Message Date
evgenii babinets
5a5b8230e5 Deprecated ResolveIdToName in order to favour the raw-pointer variant.
#rb trivial

[CL 27304651 by evgenii babinets in ue5-main branch]
2023-08-23 10:04:39 -04:00
evgenii babinets
f4f968c996 Added a DataRegistryResolver interface that allows us to specify temporary local objects instead of having to allocate a shared pointer for every single one. Deprecated the resolve function that returns the resolver as TSharedPtr since it may be the temporary one now.
#rb aidan.mcdu

[CL 27294018 by evgenii babinets in ue5-main branch]
2023-08-22 20:04:01 -04:00
robert manuszewski
37762f5320 Incremental Reachability Analysis fixes:
- FastReferenceCollector will now flush struct references before suspending to avoid storing pointers to struct owned UObject references between reachability iterations
- Persistent frame weak reference clearing will no longer attempt to clear the stored reference pointer when running incremental reachability and instead will re-run its owner's AddReferencedObjects with a special collector to clear any references to unreachable objects
- Objects marked by GC barrier will now be processed immediately in the next reachability iteration instead of after reachability analsysis was complete

#rb Kirill.Zorin
[FYI] Johan.Torp

[CL 26801914 by robert manuszewski in ue5-main branch]
2023-08-03 05:36:44 -04:00
james keeling
85e5f52ccf Add support for objects referenced by a struct when collecting references from a data table or data registry. FInstancedStruct depends on this to prevent GC of any objects it references.
#jira UE-187877
#rb mikko.mononen

[CL 25934765 by james keeling in ue5-main branch]
2023-06-12 15:23:02 -04:00
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
Steve Robb
5ced097362 Fixed mismatched copy constructor/assignment operator in FDataRegistryRequestId.
#rb none
#jira none
#preflight none

[CL 25372395 by Steve Robb in ue5-main branch]
2023-05-08 12:46:32 -04:00
Steve Robb
772963d85b Fixed mismatched copy constructor/assignment operator for FDataRegistryType and FDataRegistryId.
#rb none
#jira none
#preflight none

[CL 25197271 by Steve Robb in ue5-main branch]
2023-04-26 10:01:24 -04:00
kirill zorin
a469aafd78 Update callsites to prepare for upcoming TArray/TArrayView<TObjectPtr<...>> restrictions
#rb zousar.shaker
#rb devin.doucette
#rb steve.robb
#rb robert.manuszewski
#rb saam.barati
#preflight 643f4c09a35280ed4f53ccb3

[CL 25100071 by kirill zorin in ue5-main branch]
2023-04-18 22:39:29 -04:00
ben zeigler
eb29b12887 Fix data registry sources to never try to precache table refrences during PostLoad as this is not safe in UE5. This would only happen in cases where the asset is missing
#jira UE-179537
#preflight 64090563a92b27de3c50f30f
#rb josselin.francois

[CL 24677140 by ben zeigler in ue5-main branch]
2023-03-16 15:35:14 -04:00
Matt Peters
7bbd3c4bf0 Cooker,AssetRegistry,AssetManager: Remove deprecation handling for fields deprecated in 5.1 and earlier.
Make AssetManager required; engine startup gives a fatal error if AssetManager is not present.
#rn Minor, Cooking
#rb Zousar.Shaker
#preflight 63ffd322df66ed5fc11d963e

[CL 24493164 by Matt Peters in ue5-main branch]
2023-03-02 19:37:50 -05:00
nick darnell
e27b5d61ed Removing a reference the DataRegistry doesn't need.
[CL 24110663 by nick darnell in ue5-main branch]
2023-02-09 19:36:50 -05:00
henrik karlsson
3c9aacb1ad [Engine/Plugins]
* Updated public headers for ~170 engine plugins using iwyu to remove includes not needed. Removed includes are still available behind UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2

#preflight 63c08f4a2a6acaf1622bcc73
#rb none

[CL 23674775 by henrik karlsson in ue5-main branch]
2023-01-13 01:54:01 -05:00
henrik karlsson
d0b484d55c Fixed a bunch of non unity errors
#preflight 63bfbb2d577437afe61a7d48
#rb none
#jira none

[CL 23659781 by henrik karlsson in ue5-main branch]
2023-01-12 02:59:45 -05:00
henrik karlsson
2f78497e67 [Engine/Plugins]
* Updated private files with IWYU for all plugins which had 3 or less changes made in ue5 main since last integration to fn

#preflight 63bf8d8b577437afe607dc72
#rb none

[CL 23659643 by henrik karlsson in ue5-main branch]
2023-01-12 01:48:34 -05:00
johan torp
146b21d3d4 GC reachability optimizations. ~1.5x speedup and ~2.5MB memory saved for an internal title.
List of optimizations and changes:
* Token stream structure
    * Split token stream into strong-only and a mixed (weak+strong) stream
    * Split token stream into a builder and a tighter view class which reduces sizeof(UClass)
    * Implemented ref-counted token stream view sharing
    * Removed Class and Outer from token stream
    * Allow empty token streams (enabled by removing Class/Outer) to avoid touching token stream data
    * Placed ARO (AddReferencedObjects) last to reduce per object cache thrashing, improve control flow predicability and avoid reading the last EndOfPointer and EndOfStream tokens
    * FPrefetchingObjectIterator that bring in Class/Outer, class' tokenstream view and the first token data ahead of time
    * Decode token bitfield once and ahead of time
* Reference queues and batch processing
    * Introduced bounded queues: ref arrays -> unvalidated refs -> validated (non-null / non-permanent) refs
    * Split all these queues for killable vs immutable references
    * Stack-living references still handled synchronously. With removal of Class/Outer (prefetched ahead of time) few instances remain outside of ARO calls.
    * Outer queues hold 32 items and get flushed when full.
* AddReferencedObjects (ARO) optimizations
    * Misc optimizations in many ARO implementations
    * New FReferenceCollector API to queue up ARO references (AddStableReference), old sync API (HandleObjectReference) still available
    * New AddPropertyReferences traversal that replaces SerializeBin and PropertyValueIterator
        * 4.5x faster than PropertyValueIterator
        * Uses CLASSCAST dispatch instead of virtual SerializeItem dispatch.
        * Step towards new unified token stream replacement shared by class token processing, structs and ARO
    * Replaced StructUtil::AddReferencedObjects with AddPropertyReferences traversal, ~8x speedup and collects more references for CitySample
* Parallelism
    * Single long-running task per worker
    * Improved work-stealing / load-balancing, workers can steal full blocks, ARO calls and initial references
    * Queue up slow ARO calls to improve load balancing and avoid late stragglers. Motivated by certain ARO calls taking over 2ms for a few specific objects.
    * Kick tasks manually to avoid ParallelFor end synchronization
* FGCObject
    * Initial reference collector runs in parallel with mark phase
    * New FGCObject constructor API (AddStableNativeReferencesOnly) to opt-in to initial reference collection, used by StreamableManager
    * Same constructor API allows FGCObjects to defer registration until they become active (RegisterLater), reduces number of active GCObjects
* Reduced memory usage
    * Allocate reached objects in scratch pages (FWorkBlock) and reuse processed blocks, instead of swapping two big TArray<UObject*> per worker
    * Reduced sizeof(UClass)
    * Shareable token streams
* Misc optimizations
    * New API to test if an object is in the permanent object pool. Old API read two global pointers for every visited reference.
    * Fixed signed integer usage in GUObjectArray lookup that led to bad codegen
    * FPropertyIterator optimizations
    * SerializeBin optimizations
* Other changes
    * Moved many helpers into UE::GC namespace
    * Replaced TFastReferenceCollector API with simplified CollectReferences call. Needed to break this API  any way.
    * Introduced FGCInternals to avoid forward-declaring TFastReferenceCollector and depend on the options enum in common headers
    * Moved and outlined code from GarbageCollection.h / FastReferenceCollector.h to GarbageCollection.cpp
    * Moved GC History and Garbage Reference Tracking into a synchronous TDebugReachabilityProcessor
    * Removed PersistentGarbage flag since it wasn't used in practice
    * Improved const correctness

#rb robert.millar,robert.manuszewski,pj.kack
#preflight 63945bf45624e6da5ec85f88
#jira UE-169791

[CL 23475562 by johan torp in ue5-main branch]
2022-12-11 23:21:18 -05:00
matt peters
c15ba2481f Non-unity compile fix: Add missing SubClassOf.h that was previously included by AssetManager.h.
#rb None, trivial
#rnx
#preflight None, trivial

[CL 23386512 by matt peters in ue5-main branch]
2022-12-04 13:36:45 -05:00
matt peters
3329300b14 Non-unity compile fix: Add missing include due to removal of EngineTypes.h from AssetManagerTypes.h.
#rb None, trivial
#rnx
#preflight None, trivial

[CL 23386357 by matt peters in ue5-main branch]
2022-12-04 12:46:16 -05:00
steve robb
8b340797ba Removed PPF_ExportCpp, which is a vestige of the blueprint C++ compiler.
#rb robert.manuszewski
#jira UE-129532
#preflight 637f939bcc307d6fa55e42c1

[CL 23263272 by steve robb in ue5-main branch]
2022-11-24 20:01:58 -05:00
henrik karlsson
fa90b399a4 Added includes for future change. This changelist only contains added #include and a couple of empty placeholder files
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch

#preflight 63635997876630122adeab9f
#rb none

[CL 22958990 by henrik karlsson in ue5-main branch]
2022-11-03 14:18:47 -04:00
henrik karlsson
4a36cfe8ff Moved operator== to be hidden friend instead of put directly in global namespace
Moved GetTypeHash function to be hidden friend instead of put directly in global namespace.

Note that the function/operator needs to be fully inlined in the type or placed in the cpp. If the function is added as friend but then implemented outside the type then hidden friend optimization won't work.

This should improve compile time somewhat according to msvc devs.

#rb Steve.Robb
#preflight 6360b7052b5338aceb26471b

[CL 22889837 by henrik karlsson in ue5-main branch]
2022-11-01 15:50:27 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
Robb Surridge
610c467639 Update vendor links for built-in plugins to use secure protocol.
#jira UE-166823
#rb lauren.barnes
#preflight 6352b20b7261e565c476ec3b

[CL 22690089 by Robb Surridge in ue5-main branch]
2022-10-21 11:04:07 -04:00
nick darnell
954d29b9f5 Editor - Beginning the process to no longer make loading all assets you right click in the content browser. The first step, is setting up the code to have a deprecation flag DEPRECATE_ASSET_TYPE_ACTIONS_NEEDING_LOADED_OBJECTS, this will make it illegal to implement GetActions on all AssetTypeAction implementations. Checked in disabled, enable it locally to begin trying to implement the recommended method detailed in the IAssetTypeActions header. WIP. One of the things this change does is outlaw (regardless of deprecation) the HasActions() function, this function is no longer used at all, and so we may as well remove its implementation, it also works well as a canary in finding other samples and things that need to be upgraded.
#jira UE-165574
[REVIEW] [at]Rex.Hill, [at]Lauren.Barnes
#preflight 63483c43ad0f7e2f20e44910

[CL 22534452 by nick darnell in ue5-main branch]
2022-10-14 16:59:41 -04:00
bryan sefcik
50d4fac9e0 Updated ../Engine/Plugins/... to inline gen.cpp files
Before:
3548 unity files
Total CPU Time: 47343.578125 s
Total time in Parallel executor: 494.60 seconds

After:
3445 unity files
Total CPU Time: 46044.671875 s
Total time in Parallel executor: 468.51 seconds

#jira
#preflight 63336159b20e73a098b7f24f

[CL 22218213 by bryan sefcik in ue5-main branch]
2022-09-28 01:06:15 -04:00