Fix warning C6237: (<zero> && <expression>) is always zero. <expression> is never evaluated and might have side effects.
Fix warning C6262: Function uses '8000044' bytes of stack. Consider moving some data to heap.
[FYI] Alejandro.Arango
[CL 30091268 by marc audy in ue5-main branch]
Set to 1 if we should try to use /proc/self/smaps_rollup in FUnixPlatformMemory::GetExtendedStats().
There is a potential tradeoff in that smaps_rollup appears to be quite a bit faster in
straight testing, but it also looks like it blocks mmap() calls on other threads until it finishes.
Also move /proc/self/smaps code to use open/read/close and read + parse in 512 byte chunks instead of
fopen to avoid malloc calls in fopen/fgets.
[REVIEW] [at]Brandon.Schaefer, [at]Ilya.Loshchinin
#preflight trivial
#ROBOMERGE-OWNER: michael.sartain
#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 19001314 via CL 19004045 via CL 19004552 via CL 19005213 via CL 19008130 via CL 19008739
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
#ROBOMERGE-CONFLICT from-shelf
[CL 19009893 by michael sartain in ue5-main branch]
We still have some duplicate inotify watches, but this first pass will spew a lot more information when we hit inotify limits.
Adds a "DumpINotifyStats" command in non-release builds
Spews global inotify & UE stats, along with physical count of directories, etc.
Canonicalize directory path in FDirectoryWatcherLinux::RegisterDirectoryChangedCallback_Handle
Shootergame was adding 141 duplicate watches for Samples/Games/ShooterGame/Content w/o this. Was 1136, is now 995.
Change PathsToWatchDescriptors tmap to PathNameHashSet
Don't need to store full paths for each watch directory twice
Fix bugs in TestPAL in addition to adding DumpStats() command, which looks ~ like this:
LogDirectoryWatcher: Warning: inotify limits
LogDirectoryWatcher: Warning: max_queued_events: 16384
LogDirectoryWatcher: Warning: max_user_instances: 128
LogDirectoryWatcher: Warning: max_user_watches: 65536
LogDirectoryWatcher: Warning: inotify per-process stats
LogDirectoryWatcher: Warning: systemd (pid 2239) watches:23 instances:3
...
LogDirectoryWatcher: Warning: plugin_host-3.3 (pid 395041) watches:62 instances:1
LogDirectoryWatcher: Warning: plugin_host-3.8 (pid 395044) watches:62 instances:1
LogDirectoryWatcher: Warning: TestPAL (pid 396852) watches:2 instances:1
LogDirectoryWatcher: Warning: Total inotify Watches:392 Instances:28
LogDirectoryWatcher: Warning: Current watch requests
LogDirectoryWatcher: Warning: /var/tmp/DirectoryWatcherTest396852: 2 watches
LogDirectoryWatcher: Warning: Total count:2
The above is also dumped (once) when we fail to init or add a inotify watch.
Need to create better documentation and add a pointer to it, similar to what VSCode does: (hat tip Brandon)
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Related bugs:
; FPS BP Cooking Content - errno = 28, Out of inotify watches
https://jira.it.epicgames.com/browse/UE-125210
; inotify Warnings when Cooking Content for Linux
https://jira.it.epicgames.com/browse/UE-119696
; Time Niagara Sequencer failed to play | Error: Couldn't find file for package
https://jira.it.epicgames.com/browse/UE-89750
; inotify warnings from Linux command line builds
https://jira.it.epicgames.com/browse/UE-76562
[at]Brandon.Schaefer, [at]James.Singer
#jira UE-76562, UE-89750, UE-119696, UE-125210
#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 17498916 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17498920 by michael sartain in ue5-release-engine-test branch]
Add stderr parameter to CreateProc
Add exec-process test to TestPAL
PR #6919: Add a new FPlatformProcess::CreateProc() overload to allow separating stderr and stdout (Contributed by geordiemhall)
#rb Brandon.Schaefer, James.Singer, Robert.Seiver, Will.Damon
#jira UE-91758, UE-92964
#ROBOMERGE-SOURCE: CL 17290306 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)
[CL 17290325 by geordiemhall in ue5-release-engine-test branch]
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]
Get GIsRequestingExit now by IsEngineRequestingExit()
Set GIsRequestingExit now by RequestEngineExit(const TCHAR* Reason) or RequestEngineExit(const FString& Reason)
NOTE If Reason is 4 or less chars it will generate an ensure to force a reason to exit
The reason behind this change is right now setting GIsRequestingExit to true can cause many things to break mainly early on and with out any sort of log warning we have entered this state. We should wrap this behind a function to allow for proper handling
#rb Chris.Babcock, Michael.Trepka, Michael.Noland
#jira UE-79933
[FYI] Michael.Noland
#ROBOMERGE-SOURCE: CL 8649683 via CL 8653683
#ROBOMERGE-BOT: (v417-8656536)
[CL 8658680 by brandon schaefer in Main branch]