Commit Graph

256 Commits

Author SHA1 Message Date
anton dunchev
09c0b7c71d Prevent log spam in FUnixPlatformProcess::SetThreadNiceValue.
#rb brandon.schaefer
#tests - Compile and run

[CL 22143016 by anton dunchev in ue5-main branch]
2022-09-22 15:31:34 -04:00
dmytro vovk
a02c1fc739 Fixed IMappedFileHandle::MapRegion to map files\regions smaller than a page size
#jira none
#rb Brandon.Schaefer
#preflight 6320c80447741a7dbd233398

[CL 22092571 by dmytro vovk in ue5-main branch]
2022-09-20 10:34:38 -04:00
anton dunchev
e825604e90 Process control:
- Implemented priority control on Unix platform
- Refactored RunnableThreadUnix implementation
- Bump resource limits for process scheduling priority (nice) if possible

#rb LouisPhilippe.Seguin, Brandon.Schaefer
[FYI] anrew.ladenberger

[CL 22087348 by anton dunchev in ue5-main branch]
2022-09-19 22:28:24 -04:00
Brandon Schaefer
8c481a0e46 Fix using FPaths::DirectoryExists in crash handling code as it depends on a global which may be dead at time of crash/assert
Also move to less allocations, and a static buffer. We still use TCHAR_TO_UTF8 allocations but will look at fixing up later

#jira UE-163043
#rb James.Singer, Zack.Neyland
#fyi Chris.Constantinescu
#preflight 631a0ee8d31788ea3a46f4cc

[CL 21898347 by Brandon Schaefer in ue5-main branch]
2022-09-08 14:11:11 -04:00
Brandon Schaefer
34535ff008 Disable the altstack for the thread before freeing it. If not can leave the kernel with a dangling pointer to a memory region that is no longer valid
Also add protection pages to the left and right of our altstack to catch buffer over/under flows

#jira none
#rb Robert.Seiver, James.Singer
#preflight none

[CL 21747800 by Brandon Schaefer in ue5-main branch]
2022-09-01 16:58:23 -04:00
rex hill
593988be39 Deprecate GIsFirstInstance for FPlatformProcess::IsFirstInstance() and make it work in shipping editor
#rb josh.adams
#preflight 62f3ccd1bc175ec68c439d8e

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21319766 via CL 21323340 via CL 21323407 via CL 21323452
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21325866 by rex hill in ue5-main branch]
2022-08-10 17:01:37 -04:00
rex hill
0f01e554a4 [Backout] - CL21299688
[FYI] Rex.Hill
Original CL Desc
-----------------------------------------------------------------
Allow GIsFirstInstance in shipping editor
#preflight 62f2bc6523003b62a3039e8d
#rb josh.adams

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21310168 via CL 21312295 via CL 21312341 via CL 21312351
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21314406 by rex hill in ue5-main branch]
2022-08-10 02:17:06 -04:00
rex hill
7ec0f0d3fb Allow GIsFirstInstance in shipping editor
#preflight 62f2bc6523003b62a3039e8d
#rb josh.adams

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21299688 via CL 21304677 via CL 21304703 via CL 21304719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21308838 by rex hill in ue5-main branch]
2022-08-09 22:04:01 -04:00
bryan sefcik
b1e7f6fc29 Fixed compile issues found by compiling editor with -NoPCH -DisableUnity.
#jira

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21121764 via CL 21121765 via CL 21121766
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21143035 by bryan sefcik in ue5-main branch]
2022-07-17 23:54:03 -04:00
Devin Doucette
2961cd5dca Logging: Restored and deprecated a deleted function and tweaked the affected names
#preflight 62c84b80b3789302b1ebd675
#rb Zousar.Shaker
#rnx
#fyi Jack.Porter

[CL 21009006 by Devin Doucette in ue5-main branch]
2022-07-08 12:23:44 -04:00
Jack Porter
e5cba9bf11 Replace uses of master in OutputDeviceRedirector
#jira UE-158659
#rb Florin.Pascu
#preflight 62c7e8666003a9b045822d62

[CL 21004289 by Jack Porter in ue5-main branch]
2022-07-08 04:33:35 -04:00
bryan sefcik
a9cc65bca4 Updated Core code to not use CoreMinimal.h when possible.
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c73594756222ced4e48707

[CL 20991367 by bryan sefcik in ue5-main branch]
2022-07-07 16:02:19 -04:00
bryan sefcik
9905eb52bb Pass 2 on running IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948

[CL 20985655 by bryan sefcik in ue5-main branch]
2022-07-07 12:30:11 -04:00
Wojciech Krywult
208cd6c891 Modular builds: Memory: Tweaked the system initialization to make it work with modular builds on some platforms.
On some consoles we load dynamic modules very early during the process initialization and rely on the allocators being ready. It happens even before we have the opportunity to call FPlatformMemory::Init() explicitly, so need to have it called on-demand from FMemory_GCreateMalloc_ThreadUnsafe.

Updated FXXXPlatformMemory::Init on all supported platforms to handle multiple Init() calls gracefully. We do this to free our common code from having to explicitly check if the system has been initialized.

#rb jeff.newquist
#preflight 62a9ebf8634e82e5d1e849de
#rnx

[CL 20983808 by Wojciech Krywult in ue5-main branch]
2022-07-07 10:28:55 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
Mike Beach
d12c9bafe6 Fix IterateDirectory() on various platforms so it's behavior is consistent (was not breaking iteration when desired, meaning the function's return value could be wrong as well).
#rb brandon.schaefer, matt.johnson
#preflight 62bf4366ed35ee71a775a6ea

[CL 20919152 by Mike Beach in ue5-main branch]
2022-07-01 15:11:17 -04:00
Brandon Schaefer
647b8ac856 Fix CIS warning for implicit conversion
#jira UE-158220
#rb none
#fyi none
#preflight none

[CL 20914210 by Brandon Schaefer in ue5-main branch]
2022-07-01 10:33:59 -04:00
Brandon Schaefer
b59f1897e6 Fix implicit type conversion warnings for Linux
Some just kept the same (ie. lose of data/precision) while did try to fix some

#rb Joe.Kirchoff
#preflight 62bb5a4f3771c5710dc4c013
#jira none

[CL 20863786 by Brandon Schaefer in ue5-main branch]
2022-06-28 16:08:14 -04:00
steve robb
28609e6f3c Removal of TEXT used in static_asserts (redundant in ANSI/wide modes, broken in UTF-8 mode).
#rb james.hopkin
#jira UE-132142
#preflight 62a87ef40b7bda795a7dfff0

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 20647361 via CL 20647632 via CL 20647654
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20650895 by steve robb in ue5-main branch]
2022-06-14 12:11:45 -04:00
Devin Doucette
4b99be9d9e Avoid calling GLog->TearDown() from RequestExit as it may deadlock
#preflight 627ec8eebb2c29688c468c8f
#rb Tim.Smith
#rnx

[CL 20224709 by Devin Doucette in ue5-main branch]
2022-05-16 11:06:18 -04:00
Brandon Schaefer
8989ca5c8b Fix memory mapping a full file generally going past the file size when trying to grab some aligned memory
#jira none
#preflight none
#rb Robert.Seiver

[CL 20046111 by Brandon Schaefer in ue5-main branch]
2022-05-04 14:49:54 -04:00
Brandon Schaefer
3403e680f4 Re-add but fix #ifdef --> #if
#jira none
#rb none
#preflight none

[CL 19969881 by Brandon Schaefer in ue5-main branch]
2022-04-28 17:43:40 -04:00
Brandon Schaefer
dc286b75d5 Remove code that breaks *.sym file paths for Unix platform
From CL 19498448

#jira none
#rb none
#fyi Chris.Constantinescu
#preflight none

[CL 19969741 by Brandon Schaefer in ue5-main branch]
2022-04-28 17:37:04 -04:00
Devin Doucette
c8db2d77fe Logging: Added a workaround to log callstacks for failed assertions
#preflight 626ac3c5b17dd9121b406186
#rb Josh.Adams

[CL 19966435 by Devin Doucette in ue5-main branch]
2022-04-28 14:52:11 -04:00
geoff evans
1981b2f5f3 StallDetector support for Linux
### Features

This change enables the StallDetector watchdog in Editor to submit reports to crashreporter about threads violating instrumented deadlines in the source code. This feature was available prior on Windows, and this change adds Linux support.

### Notes

New APIs:
ReportStall()
CaptureThreadPortableCallStack()

Many APIs are updated from purely "Ensure" naming to more general naming. Stalls are more like Ensures than crashes, and so the appropriate renames to make the code readable and clear have been made. In some places Ensure is replaced with the clearer: Continuable Event nomenclature.

### Testing

I synthesized an ensure on Linux, and did the same for a stall. I then compared crash report XML file to make sure they contain accurate data in the callstack, portable callstack, and other fields in the report. I also noted that the stall information was showing as expected in the crash reporter.

#rb brandon.schaefer, francis.hurteau
#jira UETOOL-3336
#preflight 625e20d2804460ab0fea3277

[CL 19911608 by geoff evans in ue5-main branch]
2022-04-25 19:19:04 -04:00