Commit Graph

324 Commits

Author SHA1 Message Date
paul chipchase
dfbfb26cc6 Replace private FScopedReadTracker with a generic version FFileHandleRegistryReadTracker that was recently added to PlatformFileCommon.h
#rb Justin.Marcus
#jira UE-217741
#rnx

[CL 34367746 by paul chipchase in ue5-main branch]
2024-06-14 07:32:28 -04:00
louisphilippe seguin
869c8fae69 Fork
* Added cvar fork.ParentSleepDurationInSec to give ability to configure the time parent process sleeps when it has no signals to execute
* Added cvar fork.LogMemoryStatsWhenForking to control the memory stats log before every fork (enabled by default)
* Added LogFork category used by fork related logs (previously LogHal)
* Fixed signal timestamp in logs

#jira UE-215592
#rb Brandon.Schaefer

[CL 34073292 by louisphilippe seguin in ue5-main branch]
2024-06-03 15:01:10 -04:00
robert millar
df1e10047d Add new AUTORTFM macros which can be followed by braced blocks to make them work better with the debugger
e.g. UE_AUTORTFM_OPEN2{ ... code ... };

#rb neil.henning

[CL 33869184 by robert millar in ue5-main branch]
2024-05-23 14:22:32 -04:00
henrik karlsson
8cfff1360b [Core]
* Added so code identifying module as UE module on unix tests the old path too.. in case there are modules out there that are not using our macros (highly unlikely because they need our operator new/delete etc)

[CL 33735124 by henrik karlsson in ue5-main branch]
2024-05-17 16:00:03 -04:00
henrik karlsson
b250c11229 Changed so operator new/delete overloads are pulled in through a special include compiled in a generated cpp file that goes in its own translation unit. This will make it possible to support merging of modules and only include one of the .obj files for these overloads
If a module depends on Core and does not want the overloads it needs to add the private define SUPPRESS_PER_MODULE_INLINE_FILE or set PER_MODULE_INLINE_FILE to point to a different file

[CL 33709297 by henrik karlsson in ue5-main branch]
2024-05-16 22:34:40 -04:00
dmytro vovk
455e9d40f6 Added bool FPlatform::CanOverallocateVirtualMemory() function to check if we can allocate more virtual memory than physical + swap
#rb adam.kinge, Brandon.Schaefer

[CL 33265003 by dmytro vovk in ue5-main branch]
2024-04-26 11:09:19 -04:00
danny couture
75f532dd16 [TaskGraph]
- Remove old task graph backend
 - Remove old deprecations

#rb kevin.macaulayvacher

[CL 33099915 by danny couture in ue5-main branch]
2024-04-19 08:16:10 -04:00
ben woodhouse
8f0af669b5 Remove UE_ENABLE_PLATFORM_MEMORY_CSV_STATS. The implementation is not safe. We should re-write this in a less intrusive way if we need to profile the memory profiler (e.g accumulating our own timers in the allocator and simply using CSV_CUSTOM_STAT to emit to the Csv profiler once per frame)
#rb joe.bestrotheray

[CL 32407446 by ben woodhouse in ue5-main branch]
2024-03-21 14:25:55 -04:00
james singer
e6049d5f44 Fix FunixPlatformProcess::CreateProc to handle NULL being passed in for parameters argument
#jira UE-208954

[CL 32168401 by james singer in ue5-main branch]
2024-03-11 18:32:26 -04:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
johan berg
8bb0a82d64 Make Linux/Mac use editor version of crash reporter when compiled with WITH_EDITOR
In order to properly separate crashes that happens during development versus crashes that occurr in shipped titles we need to use the editor version of the crash reporter when appropriate.

#rb calvin.zheng
#jira UE-206087, UE-205533

[CL 31439621 by johan berg in ue5-main branch]
2024-02-13 14:21:43 -05:00
steve robb
104c0f2416 Fixed up more bool-taking calls to take EAllowShrinking instead.
[CL 30806200 by steve robb in ue5-main branch]
2024-01-23 11:07:28 -05:00
matt peters
bd992eb4e0 LLM: Use LLM_IF_ENABLED around all calls to OnLowLevelAlloc and OnLowLevelFree that are guarded by a macro for conditional compilation. LLM_IF_ENABLED is not strictly necessary; LLM or #if ENABLE_LOW_LEVEL_MEM_TRACKER will also both behave correctly. But LLM_IF_ENABLED is a small optimization (avoids a function call) and we want to apply it for consistency.
#jira UE-200297
#rnx
#rb Devin.Doucette

[CL 30479895 by matt peters in ue5-main branch]
2024-01-08 09:02:49 -05:00
slonopotamus
641c92c269 Refactor FGenericPlatformOutputDevices::SetupOutputDevices code just a little so that we don't have to suffer code rot in a custom linux implementation
#jira UE-166583
#PR 9643
#9643
#rb [at]Brandon.Schaefer
#presubmit 657a2209be1cfc2f95b29cb7

[CL 30375011 by slonopotamus in ue5-main branch]
2023-12-18 09:16:15 -05:00
anton dunchev
28020d425a [CIS] Fix FUnixSignalGameHitchHeartBeat added mising IsStartedSuspended().
#rnx
#tests builds

[CL 29940211 by anton dunchev in ue5-main branch]
2023-11-27 13:53:21 -05:00
joe bestrotheray
fe016abe82 Fix csv profiling recursion in windows/linux platform memory
[CL 29886607 by joe bestrotheray in ue5-main branch]
2023-11-22 08:02:10 -05:00
justin marcus
a20a35a038 Fix PS5 File handle handle registry not tracking ucas file handles opened by IOStore.
- IOStore ucas handles now get freed and reopened as needed when file handle pressure is too great.
- FRegisteredFileHandle now refcounts read requests so it can handle multiple read requests with the same handle at the same time.
- Failure to reopen files is now passed back up as file read failures
- Add some additional logging for FFileHelper errors
- Add error logging explicitly for runningout of PS5 file handles
- Make file handle casts use static_cast
- PS5 file handle now returns -1 for size if fstat fails, this matches windows behavior
- FAPRHandleCache now ignores files outside of /app0.  This prevents file churn in /download0 from bloating it.
[REVIEW]

[CL 29846643 by justin marcus in ue5-main branch]
2023-11-20 14:09:28 -05:00
dan thompson
d208c49f9b Missed some minor feedback
#rb Arciel.Rekman

[CL 29724168 by dan thompson in ue5-main branch]
2023-11-14 15:53:19 -05:00
dan thompson
5c11f227fd Adding an LLM console command to associate allocations with their underlying page allocation in Unix to classify them as shared/private/unreferenced.
This also fixes the old smaps parser to not incorrectly bail before EOF if fewer bytes were provided than asked for as that's an allowable condition.

#ushell-cherrypick of 29606161 by Dan.Thompson

#ushell-cherrypick of 29607764 by Dan.Thompson
#rb arciel.rekman

[CL 29722985 by dan thompson in ue5-main branch]
2023-11-14 15:14:44 -05:00
joe bestrotheray
34d62be948 Add csv profiling to AllocVirtual and BinnedAllocFromOS on windows/unix
#rb ben.woodhouse, kaleb.morris, matt.harris

[CL 29710719 by joe bestrotheray in ue5-main branch]
2023-11-14 08:25:29 -05:00
sebastian schoner
fa929ffe50 [Backout] - CL29591063
(not backing out the fixes to structured logging itself, only its usage)

[FYI] sebastian.schoner
Original CL Desc
-----------------------------------------------------------------
Use structured logging for OutOfMemory messages

Structured logging allows to surface information contained in log lines more easily for automated processes. Out of memory errors are a common thing we'd like to detect and the current detection code has already been broken once.

This CL also contains a change to the structured log for fatal errors. Those were erroneously noted as assertion failures due to an unintended call to Debug::AssertFailed originating via copy-paste from FMsg::LogfImpl. Removing this call ensures that the new log matches the old behavior from unstructured logging (which I have manually verified).

#rb devin.doucette

[CL 29710620 by sebastian schoner in ue5-main branch]
2023-11-14 08:17:59 -05:00
james singer
bb56829c3f [Linux] Mark large allocations made by BinnedAllocFromOS as mergeable by KSM.
Notes: Pretty low risk, one line change.  Should only have impact in memory sharing on Linux servers, no client--side effect.  This change effectively restores the mergeable tagging to these types of allocations that was inadvertently lost when Gil refactored memory allocations.  Should help Juno.

[REVIEW] [at]zack.neyland
#jira UE-199974
#rb [at]Brandon.Schaefer, [at]Arciel.Rekman, [at]Zack.Neyland
#rnx

#localization none
#tests local editor to make sure we don't crash
#preferred_allowlister jeanfrancois.stamour

[CL 29660772 by james singer in ue5-main branch]
2023-11-10 18:22:40 -05:00
sebastian schoner
123032fa5b Use structured logging for OutOfMemory messages
Structured logging allows to surface information contained in log lines more easily for automated processes. Out of memory errors are a common thing we'd like to detect and the current detection code has already been broken once.

This CL also contains a change to the structured log for fatal errors. Those were erroneously noted as assertion failures due to an unintended call to Debug::AssertFailed originating via copy-paste from FMsg::LogfImpl. Removing this call ensures that the new log matches the old behavior from unstructured logging (which I have manually verified).

#rb devin.doucette

[CL 29591079 by sebastian schoner in ue5-main branch]
2023-11-09 04:14:59 -05:00
matt peters
2d8cad97a6 PakFiles and FileManager: Add IPlatformFile::FDirectoryVisitor::ShouldVisitLeafPath for directory visitors that are ignoring some files, so that FPakFile::ValidateDirectorySearch knows that invalid-to-request files were not requested despite being present in the searched directories.
#rnx
#rb Zousar.Shaker

[CL 28012483 by matt peters in ue5-main branch]
2023-09-19 16:51:05 -04:00
josh adams
aeb5cb1347 - Restoring a backout after fixing the issue that causes the backout
[Backout] - CL27745134
[FYI] stan.hormell
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27923017 by josh adams in ue5-main branch]
2023-09-15 13:39:02 -04:00