Commit Graph

678 Commits

Author SHA1 Message Date
geordiemhall
1c5bfd52de Implement OutStdErr in FUnixPlatformProcess::ExecProcess
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]
2021-08-24 14:16:10 -04:00
bob tellez
ce5ac8f627 #UE Add ALLOW_NON_INTERNAL_UNATTENDED_CRASH_REPORTS to allow targets to allow unattended crash reports even if they are not internal builds
#jira nojira
[FYI] Patrick.Laflamme

#ROBOMERGE-SOURCE: CL 17281496 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17281537 by bob tellez in ue5-release-engine-test branch]
2021-08-24 01:57:54 -04:00
martins mozeiko
7343e55d12 Enable Windows ETW (context switches and stack sampling) and memory tracing on XSX.
Use Perf trace for context switches and stack sampling on PS4 and PS5.

#rb Ionut.Matasaru

#ROBOMERGE-SOURCE: CL 17277312 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17277323 by martins mozeiko in ue5-release-engine-test branch]
2021-08-23 17:40:14 -04:00
bob tellez
9f8b0c119d #UE If CrashReportClient failed to start, emit the log information about it, even when running with -unattended.
#jira nojira

#ROBOMERGE-SOURCE: CL 17274814 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17274824 by bob tellez in ue5-release-engine-test branch]
2021-08-23 15:37:43 -04:00
johan torp
d6867ae8da Mark all FPlatformProcess::SleepInfinite implementations as [[noreturn]]
#rb steve.robb

#ROBOMERGE-SOURCE: CL 17211654 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17211664 by johan torp in ue5-release-engine-test branch]
2021-08-18 02:46:55 -04:00
andriy tylychko
6bf3101dcd deprecated FTicker and family and replaced by thread-safe FTSTicker
#jira UE-120090
#rb francis.hurteau


#ROBOMERGE-SOURCE: CL 17176325 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17176374 by andriy tylychko in ue5-release-engine-test branch]
2021-08-16 11:09:22 -04:00
charles bloom
b220cc5e80 add -doublefreefinder command line option on windows
#rb none

#ROBOMERGE-SOURCE: CL 17135939 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17135945 by charles bloom in ue5-release-engine-test branch]
2021-08-11 11:01:34 -04:00
dan phillips
c901607c18 Add the ability to tweak the priorities of theads at runtime
Fix the affinity setting at runtime

#jira UE-121211

#ROBOMERGE-SOURCE: CL 17090825 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)
#ROBOMERGE[bot1]: dev-enginemerge-test

[CL 17090844 by dan phillips in ue5-release-engine-test branch]
2021-08-06 19:34:46 -04:00
stefan boberg
86d86d6248 Added FWindowsPlatformProcess::CreateElevatedProcess
#rb devin.doucette, matt.peters

#ROBOMERGE-SOURCE: CL 17017266 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17017271 by stefan boberg in ue5-release-engine-test branch]
2021-08-02 12:30:12 -04:00
danny couture
bb6e7c3db4 Add Insight tracing around file buffer shrinking which is often slow
#rnx
#rb trivial

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

[CL 16969359 by danny couture in ue5-release-engine-test branch]
2021-07-27 12:30:33 -04:00
chris varnsverry
ce4dd6767c - Fix some unnecessary string copies when calling FPaths::FileExists
#jira FORT-392314
[at]Michael.Kirzinger [at]Marc.Audy [at]Rob.Cannaday [at]Sam.Zamani

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

[CL 16924003 by chris varnsverry in ue5-release-engine-test branch]
2021-07-22 11:11:51 -04:00
david harvey
f8b7342f19 move MinimalWindowsApi header/source from Windows folder to Microsoft folder, allowing it to be used on all Microsoft platforms.
#jira UE-118341, UE-111460
#rnx
#rb eric.mcdaniel

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

[CL 16835516 by david harvey in ue5-release-engine-test branch]
2021-07-13 06:04:55 -04:00
danny couture
80a0593017 Exclude mimalloc.c from static analysis
Fix typo where double slash were used

#rnx
#rb trivial
#preflight 60d1fe1fbe81e80001837c38

#ROBOMERGE-SOURCE: CL 16744965 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16744987 by danny couture in ue5-release-engine-test branch]
2021-06-22 12:49:10 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
stefan boberg
4a101fdf6a Speculative fix/workaround for issue where metadata queries sometimes fail on a newly opened file handle
When this happens the file handle becomes invalid and cannot be used. This change ensures a null handle is returned instead of an invalid handle

It's not clear why a GetFileSizeEx operation would fail on a recently created file handle but it sometimes does for files on file shares (such as for derived data cache files)

#rb devin.doucette

#ROBOMERGE-SOURCE: CL 16704714 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16704734 by stefan boberg in ue5-release-engine-test branch]
2021-06-17 10:50:51 -04:00
zousar shaker
c27625b056 Integrating //UE5/Dev-Cooker [at] 16678003 to //UE5/Main (Zousar.Shaker-YEG-0943-Quaternary)
Non-DevIteration_ShooterGame


#ROBOMERGE-SOURCE: CL 16678907 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16678928 by zousar shaker in ue5-release-engine-test branch]
2021-06-15 16:38:03 -04:00
alexander suvorov
663b65ad80 Properly handle Windows paths of MAX_PATH length.
#rb Matt.Peters

#ROBOMERGE-SOURCE: CL 16632849 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v831-16623017)

[CL 16632861 by alexander suvorov in ue5-release-engine-test branch]
2021-06-10 19:20:05 -04:00
patrick laflamme
e70f110f7b Fixed Editor taking several second to resolve and log the ensure callstack.
- Reenabled the optimization that load the symbols on demand only rather than loading all the symbols.
  - Detected when a module loaded in the debug engine (dbghelp) misses the debug symbols, likely because it was implicitly loaded with an incomplete symbol search path and unloaded the module to reload it with the proper symbol search path set so that debug symbols could be found.
  - For Editor, 'debug ensure' is significantly faste. The time to stack walk and dump went from ~20s to ~1s.

#jira UE-117236 - Ensure can freeze the Editor for 30+ seconds
#rb Johan.Berg
[FYI] Francis.Hurteau

#ROBOMERGE-SOURCE: CL 16603545 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16603547 by patrick laflamme in ue5-release-engine-test branch]
2021-06-09 08:12:31 -04:00
aurel cordonnier
25a11deeac Merge from Release-Engine-Staging @ 16579919
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16581170 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-07 20:09:45 -04:00
David Harvey
3cde6e12da hooks to allow crash handling to be extended by platform extensions.
#jira UE-115086
#rnx
#rb Rolando.Caloca

[CL 16571107 by David Harvey in ue5-main branch]
2021-06-07 11:19:59 -04:00
Patrick Laflamme
06b4a4db0b Copying the error message can overflow the allocated buffer when reporting an ensure.
Replaced usage of misleading FCString::Strcpy() with FCString::Strncpy()

#rb Johan.Berg
#jira UE-116998
#lockdown simon.tourangeau

#ROBOMERGE-OWNER: patrick.laflamme
#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 16536333 in //UE4/Release-4.27/... via CL 16536380
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

#ushell-cherrypick of 16536698 by patrick.laflamme

[CL 16538702 by Patrick Laflamme in ue5-main branch]
2021-06-02 16:15:52 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
Patrick Laflamme
9925c861ae Prevent the engine from providing all threads to CRC on stall and ensure. Only transmit the responsible thread, so that CRC doesn't need to walk all threads before resuming the engine.
- Analytics shows that CRC may takes up to 400 seconds to walk all the threads and create a minidump before responding back to the engine on the pipe to resume the crashing thread.

#rb Johan.Berg
#fyi Geoff.Evans

[CL 16483781 by Patrick Laflamme in ue5-main branch]
2021-05-27 10:10:12 -04:00
Steve Robb
ba5a9cb362 Some explicit casts to UTF8CHAR, for upcoming changes to that type.
#rb none
#jira none

[CL 16478979 by Steve Robb in ue5-main branch]
2021-05-26 20:27:50 -04:00
Patrick Laflamme
2e5316e1ca Generalized the Editor analytics summary session system to be usable/extendable by other apps.
Engine/Editor changes:

- Split the Editor summary session in two, one summary for the Engine properties and one for the Editor specific properties. Made it easy to extend the Engine summary to create other summaries.
- Made the summary sender as agnostics as possible of the keys it sends.
- Fixed the system wide lock contention between the process when persisting a session. (On problem caused by the lock is UE-114315).
- Fixed concurrent issue when saving the summary sessions on Linux/Mac
- Fixed performance issue when saving the summary session on Linux/Mac. This enable saving at higher frequency.
- Fixed cases where the same session summary is sent more than once.
- Fixed Windows registry key overflow that could happens if we accumulated too many sessions (in theory, this can happen)
- Made adding new properties to the summary easy and private to the implementation.
- Brought the Linux/Mac implementation closer to Windows implementation.
- Reduced memory allocation, especially when the session records a crash.
- Improved chances to send the summary non-delayed by allowing the Editor to send the reports if CRC died unexpectedly.
- Generalized the support to collect and aggregate analytics from helper processes. For example, CRC already collects analytics that is merged with the Editor summary as information supplement
- Reserved the disk space required to store the summary ahead of time to prevent failing later.
- Increased frequency at which the summary is persisted because saving the summary is more efficient. (About every 10 seconds rather than every minutes).
- Added unit tests

CrashReportClient changes:

- Created a 'session summary' from the CRC point of view to merge with the Editor summary.
- Moved analytics collection in a separated class to make the crash reporting code leaner and less noisy with all the analytics
- Merged the CRC diagnostic logger in the class collecting CRC analytics summary and make the diagnostic log a property in the summary.
- Collected analytics (on behalf of Editor) in a background thread because CRC main thread can be blocked collecting a crash, so it doesn't pay attention to other things
- Added MonitorBatteryLevel and MonitorOnACPower summary properties on Windows. Collected on CRC background thread (never blocked, so we reduce changes to miss the battery running out)
- Added MonitorSessionDuration summary property to track now long CRC ran.
- Added MonitorQuitSignalRecv summary property to detect when CRC is soft killed like: taskkill /PID 1234
- Added MonitorIsReportingCrash summary property to track when CRC dies reporting a crash.
- Added MonitorIsCollectingCrash summary property to track when CRC dies collecting a crash artifacts.
- Added IsProcessingCrash summary property to track when CRC dies processing a crash.
- Added MonitorCrashed summary property to track when CRC exception handler was triggered.
- Added MonitorWasShutdown summary property to track when CRC summary was shutdown
- Added MonitorLoggingOut summary property to track when CRC died because the user was logging out (or as result of shutting down or restarting the computer).
- More accurate value for DeathTimestamp summary property because this is now captured in CRC background thread (which cannot be busy handling a crash)
- Added crash processing timing to CRC diagnostic logs (how long it takes to collect/process a crash).

#rb Jamie.Dale, Wes.Hunt, Johan.Berg
#jira UETOOL-3500
#jira UE-114315

[CL 16324612 by Patrick Laflamme in ue5-main branch]
2021-05-13 21:58:20 -04:00