Ryan Houdek
474f2dc267
FEX: Name remaining allocations as "Misc"
...
This captures the remaining FEX allocations that /aren't/ coming from
JEMalloc, allowing us to separate our mapped regions versus just
jemalloc allocations.
With some additional naming in jemalloc (which I'm not adding here) this
gets us interesting results:
```
Misc resident: 54 MiB
JEMalloc resident: 208 MiB
```
So 208MB of active jemalloc allocations in this particular case. These will be able to be tracked in heaptrack-like applications if careful.
This should let us target down whatever live allocations we're keeping
large amounts of data around if possible.
2025-10-10 17:34:03 -07:00
Lioncache
3e741df77b
SyscallHandler: Avoid self-referencing global
...
We don't need to indirect through the handler global inside of the class
itself for instance member functions.
2025-10-10 15:29:29 -04:00
Lioncache
987fc925ee
FileManagement: Use emplace instead of insert for set
...
These are cases where the string can be directly constructed internally
instead of being copied/moved.
2025-10-09 22:02:06 -04:00
Lioncache
b6cbb23781
FileManagement: Make use of std::string_view in LoadThunkDatabase()
...
Same behavior, but avoids allocating except for the case where its
necessary.
2025-10-09 22:02:03 -04:00
Lioncache
17d110575c
BPFEmitter: Remove unused SeccopEmulator include
2025-10-09 00:57:49 -04:00
Lioncache
a967976420
BPFEmitter: Simplify iterator declarations
...
Makes the jump labels a little quicker to read.
2025-10-09 00:57:49 -04:00
Lioncache
7e1e1ccccc
BPFEmitter: Move private API into implementation
...
Keeps some internals fully private (and also avoids dumping
some defines into other headers).
2025-10-09 00:57:49 -04:00
Lioncache
8513c02ec1
ELFParser: Avoid unnecessary copies
...
Gets rid of a few 56 byte copies.
2025-10-08 21:20:46 -04:00
Ryan Houdek
673e826e46
FEX: Remove InlineSyscall and related flags
...
FEXCore no longer optimizes syscalls to be inline.
NFC, just avoids passing around a bunch of data structures for no
reason.
2025-10-08 19:33:58 -07:00
Ryan Houdek
3b88947cbe
Merge pull request #4950 from lioncash/syscall
...
SyscallHandler: Shrink definition struct from 24 to 16 bytes
2025-10-08 14:03:57 -07:00
Lioncache
10c3b2fb5d
SyscallHandler: Shrink definition struct from 24 to 16 bytes
...
Just a minor space saving, given how many syscall definitions we'll
have.
2025-10-08 16:40:20 -04:00
Lioncache
a2445904e7
ThreadManager: Make StatAlloc instance private
...
This doesn't need to be public.
2025-10-08 16:13:23 -04:00
Lioncache
d94b9fae94
SourceCodeResolver: Pass string_view by value for GenerateMap()
...
Generally this should be passed as a value type unless there's a good
reason not to.
2025-10-07 01:27:15 -04:00
Lioncache
05fcaaa758
Syscalls: Remove unimplemented prototypes
2025-10-07 01:27:11 -04:00
Ryan Houdek
2cab87fbd0
ThreadManager: Fix mmap usage to not take guest space
...
SHM stats and CallRet stack was accidentally using system mmap which
means it would take VA space from the guest. Ensure it uses the
Allocator helpers so that doesn't happen.
Gives 32-bit guests 8-ish megabyte of VA space back.
2025-10-06 11:20:00 -07:00
Lioncache
137aa59254
PrctlUtils: Move to include folder
...
We can group more prctl value handling in here.
2025-10-06 02:12:29 -04:00
Ryan Houdek
b08e5f9821
Linux: Implement support for extended volatile metadata
...
Allows applications running entirely under Linux to use the same
extended volatile metadata as Windows.
For example `FEX_EXTENDEDVOLATILEMETADATA=iw4sp.exe\;0xe9da0-0xe9ec7`
this configuration works for both wow64 and Linux to disable the TSO
emulation on the memcpy routine in that game that consumes around 80% of
CPU time in TSO emulation.
Works with Linux native games as well of course.
2025-09-29 14:36:51 -07:00
Billy Laws
73962402df
TestHarnessRunner: Don't attempt to build on MinGW
2025-09-24 20:28:33 +01:00
Paulo Matos
e7a47a647c
Fix quiet and signalling nan propagation
...
This adds a new mode X87StrictReducedPrecision.
The strict reduced precision is like the reduced precision but adds extra checks,
like the currently implemented nan and snan propagations.
Fix for __builtin_issignaling() test of SPEC2017 classify test.
2025-09-23 13:48:45 +02:00
Ryan Houdek
dd4f508b77
FEX: Fixes SIGILL reporting
...
Two bug fixes here.
- We weren't reporting a correctl ErrorRegister. Needs to contain
PF_INSTR at least.
- We weren't setting siginfo->si_addr in the case of `FaultToTopAndGeneratedException`
Fixes Mafia 2 (Classic)
2025-09-18 11:26:15 -07:00
Tony Wasserka
3058a825b7
Merge pull request #4889 from Sonicadvance1/fix_x87_state_saverestore
...
SignalDelegator: Correctly save and restore x87 state.
2025-09-17 11:53:42 +02:00
LC
8f47b46219
Merge pull request #4887 from Sonicadvance1/finish_v4l2
...
IoctlEmulation: Finish v4l2 implementation
2025-09-16 10:00:56 +02:00
Ryan Houdek
de6d907e27
SignalDelegator: Correctly save and restore x87 state.
...
We need to read the current x87 TOP location and rotate the values when
saving and restoring the context state on Linux. Wasn't visible in the
ASM tests since we read the FEX's CPU state directly there.
2025-09-15 13:20:43 -07:00
Ryan Houdek
85e67f92c5
FEX: Rebrand FEXInterpreter as FEX
...
Still creates a copy of FEXInterpreter from FEX for downstream projects
to have some time to get off the old name. Creating a symlink is kind of
a pain in cmake so just doing an install copy is easy.
2025-09-15 13:06:48 -07:00
Ryan Houdek
6ced309c5c
IoctlEmulation: Finish v4l2 implementation
2025-09-12 19:59:56 -07:00
Ryan Houdek
7273041314
FEXInterpreter: Remove FEXLoader
...
Doesn't /quite/ remove the ArgumentLoader because it is intertwined with
LinuxEmulation in an annoying way that will take another step to remove.
2025-09-12 10:24:58 -07:00
LC
226233ddce
Merge pull request #4874 from Sonicadvance1/testharnessrunner_args
...
TestHarnessRunner: Removes ArgumentLoader
2025-09-12 11:22:11 -04:00
Lioncache
216a37348b
VDSO_Emulation: Remove duplicate span include
...
Just an include that slipped through.
2025-09-12 03:43:12 -04:00
Tony Wasserka
964165eabe
Merge pull request #4871 from Sonicadvance1/move_fexloader
...
FEXLoader: Move to FEXInterpreter
2025-09-12 08:27:14 +02:00
Ryan Houdek
4ae04c2a9a
TestHarnessRunner: Removes ArgumentLoader
...
Only use environment variables for setting arguments here.
2025-09-11 13:45:09 -07:00
LC
7bd0789402
Merge pull request #4870 from Sonicadvance1/remove_argloader_fexbash
...
FEXBash: Remove ArgLoader usage
2025-09-11 16:17:34 -04:00
LC
eb9fb9e834
Merge pull request #4872 from Sonicadvance1/fexserver_remove_argloader
...
FEXServer: Remove usage of ArgLoader
2025-09-11 16:12:49 -04:00
LC
c0ef0a7503
Merge pull request #4873 from Sonicadvance1/fexrootfsfetch_remove_argloader
...
FEXRootFSFetcher: Removes argloader usage
2025-09-11 16:12:33 -04:00
Ryan Houdek
61719115e5
Merge pull request #4817 from neobrain/refactor_code_cache_new_interfaces
...
CodeCache: Introduce new interfaces
2025-09-11 12:59:33 -07:00
Ryan Houdek
4a8cbe2ab8
FEXBash: Remove ArgLoader usage
...
ArgLoader is going to get removed. So delete this menial usage of it.
2025-09-11 12:21:35 -07:00
Ryan Houdek
c966f44189
FEXRootFSFetcher: Removes argloader usage
...
Another case that ArgLoader was misused.
2025-09-11 12:20:28 -07:00
Ryan Houdek
193ef8b232
FEXServer: Remove usage of ArgLoader
...
This is entirely unused as FEXServer only ever reads the environment and
other configs.
There was /technically/ a weird conflict with FEXServer arguments but
that was an accident if it ever happened.
2025-09-11 12:16:47 -07:00
Ryan Houdek
ad70a60d05
FEXLoader: Move to FEXInterpreter
...
NFC
FEXInterpreter is the supported path, rename things to reflect that.
2025-09-11 12:09:23 -07:00
Ryan Houdek
8c1e9eda12
Merge pull request #4867 from neobrain/refactor_cmake_tests
...
CMake: Merge BUILD_TESTS into BUILD_TESTING
2025-09-11 10:14:26 -07:00
Ryan Houdek
0eedd55dfd
Merge pull request #4866 from neobrain/refactor_reformat
...
Update code formatting
2025-09-11 10:13:42 -07:00
Tony Wasserka
70a1d92d9f
CodeCache: Drop ComputeCodeMapId member function
2025-09-11 17:03:50 +02:00
Tony Wasserka
0749477eb9
CodeCache: Introduce revamped interfaces
2025-09-11 17:03:50 +02:00
Tony Wasserka
fb54341a1f
CMake: Merge BUILD_TESTS into BUILD_TESTING
...
BUILD_TESTING is provided by CMake, so the separate toggle is just redundant.
2025-09-11 14:08:47 +02:00
Tony Wasserka
bf1b76dcd2
LinuxSyscalls: Clean up MappedResource insertion
...
None of the call sites needed this to be a template, and the previous function
produced unreadable error messages.
2025-09-11 10:49:07 +02:00
Tony Wasserka
48787ab460
Context: Drop unneeded header includes
2025-09-11 10:49:07 +02:00
Tony Wasserka
9fdd96af61
Update code formatting
2025-09-11 10:40:29 +02:00
Tony Wasserka
0c0a1d8f12
CMake: Use consistent component naming
2025-09-11 10:31:06 +02:00
Tony Wasserka
fee9e91c4f
Core: Drop support for TSO auto migration
2025-09-10 15:36:23 +02:00
Tony Wasserka
1dc560d45a
InstCountCI: Explicitly disable TSO by default
2025-09-10 15:36:23 +02:00
Ryan Houdek
317f92f4c8
Merge pull request #4851 from lioncash/ir
...
IR: Remove unnecessary forward declarations/headers
2025-09-08 19:47:51 -07:00