Commit Graph

126 Commits

Author SHA1 Message Date
jared cotton
33f6bf1377 FORT-550853
Update to make IsSymlink() return an enum which allows callers to identify whether or not it is implemented for the calling PlatformFile. Also, added appropriate implementation for FPakPlatformFile which was the cause of ensure's on previous submission which was backed-out.

(see review https://p4-swarm.epicgames.net/reviews/23757906 for usage in SolarisEditorModule.cpp)

#rnx
#rb yiliang.siew
#rb brandon.schaefer
#rb calvin.zheng
#rb zack.neyland
#preflight 63d186e0ef20a5272dba95ae

[CL 23863390 by jared cotton in ue5-main branch]
2023-01-25 20:42:04 -05:00
josh adams
1610c3bee3 UnrealArch/UnrealArchitectures changes
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
 - UnrealArch is a single architecture, expandable enum-like struct
 - There is no more concept of "no/default architecture", there is always a valid active architecture when building
 - Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
 - UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
 - UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
 - TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
 - Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)

#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471

[CL 23829977 by josh adams in ue5-main branch]
2023-01-24 09:30:28 -05:00
jared cotton
dce1d049ca FORT-550853
Addition of 'IsSymlink' to Windows/Unix/Apple platforms. For use case of checking whether installed VSCode Verse-extension is a symlink which is a 'developer' installed version.

(These changes are split out from review 23666969 for review)

#rnx
#rb yiliang.siew
#rb calvin.zheng
#rb brandon.schaefer
#preflight 63c6dcca2e714f64ad4133f8

[CL 23747953 by jared cotton in ue5-main branch]
2023-01-17 18:38:17 -05:00
henrik karlsson
4af68fa79b [Core]
* UnixCriticalSection - Removed UnrealString include to match windows critical section. Since IWYU is using linux path we don't want unix files to include more than windows files

#preflight 63c1b087b065224750c93fff
#rb Chris.Waters

[CL 23688209 by henrik karlsson in ue5-main branch]
2023-01-13 17:24:44 -05:00
johan torp
273c575954 Add prefetch support for mobile platforms and fuse all platforms into a single implementation
Switch Unix from runtime to compile time cache line constant to avoid loading a value for every PrefetchBlock and allow the compiler to unroll the loop.

#rb josh.adams,arciel.rekman,dmytro.vovk,steve.robb
#preflight 63bed66a577437afe6c44c91

[CL 23660061 by johan torp in ue5-main branch]
2023-01-12 04:26:04 -05:00
Dan Thompson
0d3889b2e0 UE5 CPU minspec updated to SSE 4.2
#preflight 63b859fc68068a8bd62e9d32
#rb jeff.roberts
#rb fabian.giesen
#rb halfdan.ingvarsson

Tried to run automation tests but it's basically a red board right now. I ran two, one with these changes and one without, and they seem to be basically the same errors, however there are so many and I can't really cross compare easily.

base automation tests: 63b8a5dcaf3ebedd990b7dfe
preflight automation tests: 63b87801221aab21e08d5973
#preflight 63bc93e9577437afe6fbe45a

[CL 23621334 by Dan Thompson in ue5-main branch]
2023-01-09 17:42:09 -05:00
Brandon Schaefer
250adee03a Clean up Unix strlen to align with other implementations
#jira UE-172888
#rb Steve.Robb
#preflight 63bc418a763c6c1064285d25

[CL 23617034 by Brandon Schaefer in ue5-main branch]
2023-01-09 13:41:07 -05:00
henrik karlsson
ce587eb612 Added markups for headers that can't be compiled standalone.. this is needed for both Header units and IWYU
#preflight 63789b0c170bc34a93a869e5
#rb none

[CL 23552160 by henrik karlsson in ue5-main branch]
2022-12-21 02:46:50 -05:00
brandon schaefer
68c446a297 Add support for an Allow Syscall filter file to be passed into the Engine (supports x64 and arm64)
This will cause any syscall *not* in the allow list to cause SIGSYS and then we will exit from our signal handler (unless our signal handler uses a syscall that is not supported in which case we will crash, though a core dump will need to be checked)

Requires explicitly calling this function where you want to actually *setup* the filters:
FPlatformMisc::SetupSyscallFilters();

To use:
-allowsyscallfilterfile=<path/to/allow_filter_file.txt>

Example of file:
read
write
open
mprotect 2 4 0 1

There are only two supported rules for the file:
<syscall_name>
<syscall_name> <syscall_arg_number_zero_based_index> <value> <allow> <check bit only>

#jira UE-169652
#rb Josh.Adams, Robert.Seiver, Calvin.Zheng
#preflight 636d44e81c14fe450503f5cf

[CL 23091532 by brandon schaefer in ue5-main branch]
2022-11-10 20:45:09 -05:00
sarah noonan
1a993b9ada *Remove per-frame caching of stats from FPlaformMemory::GetStats and move caching into helper function.
*Update common callers of FPlaformMemory::GetStats to use the helper.
[REVIEW] [at]matt.peters

[CL 22596606 by sarah noonan in ue5-main branch]
2022-10-18 07:22:43 -04:00
evgenii babinets
528585a552 Merging with resolved conflicts on behalf of sarah.noonan. Original CL description:
*Make FPlatformMemory::GetStats cache memory stats per frame to prevent multiple costly platform calls per frame ( by default, has option to request non-cached values ).
*Update some calls to FPlatformMemory::GetStats to specifically request non-cached values.
[REVIEW] [at]evgenii.babinets [at]andrew.ladenberger


#preflight 634a04c0907f4749392d75d0

[CL 22545788 by evgenii babinets in ue5-main branch]
2022-10-14 21:13:08 -04:00
robert seiver
b4db2e582f Temporary workaround for creating processes that use two unique pipes
#fyi Brandon.Schaefer, James.Singer, Ryan.Neyland
#preflight 633ef28fb7327403d9a2c42b

[CL 22459137 by robert seiver in ue5-main branch]
2022-10-11 11:51:54 -04:00
bryan sefcik
72be98c810 Moved IN and OUT defines to HAL/Platform.h
#jira
#preflight 63371394466fb436691a350a

[CL 22279776 by bryan sefcik in ue5-main branch]
2022-09-30 16:18:41 -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
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira

#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 21181076 by Bryan sefcik in ue5-main branch]
2022-07-20 11:31:36 -04:00
bryan sefcik
b509beb314 Added a few IWYU pragma comments.
#preflight 62ce5231b90bf53969409839

[CL 21067982 by bryan sefcik in ue5-main branch]
2022-07-13 01:25:24 -04:00
bryan sefcik
5774b4842a Added more IWYU pragmas.
#preflight 62c860d0b04c766648963c4f

[CL 21009868 by bryan sefcik in ue5-main branch]
2022-07-08 13:11:06 -04:00
bryan sefcik
1d773c7d68 Added a few IWYU pragmas.
#preflight 62c8389f7e606620fd5bb338

[CL 21006651 by bryan sefcik in ue5-main branch]
2022-07-08 10:16:40 -04:00
bryan sefcik
746b7df074 Same as CL 20991367:
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 62c74ed0324817d81488b7ee

[CL 20993420 by bryan sefcik in ue5-main branch]
2022-07-07 17:41:31 -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
0f06d550e6 Fixed some issues found when running includetool.
#preflight 62c72fe82823f28cf2273112

[CL 20990373 by bryan sefcik in ue5-main branch]
2022-07-07 15:29:27 -04:00
bryan sefcik
67b8a4e636 Fixed compile issue.
#preflight 62c72b04702597cc87625d1a

[CL 20989797 by bryan sefcik in ue5-main branch]
2022-07-07 15:09:55 -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
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
robert seiver
98e1b3a69e Implement OpenMapped for Linux inside of UnixPlatformFile
#jira UE-147332
#rb Brandon.Schaefer
#fyi @James.Singer, @Johan.Torp
#preflight 62587d63946114248dc178b2

[CL 19762042 by robert seiver in ue5-main branch]
2022-04-14 16:03:05 -04:00