Hello everyone.
Here are some changes I’ve made in October to present day.
I’ve finally implemented asynchronous compilation for SPU LLVM. It still needs a bit of polishing, but it's already useful so I decided to push it into the master.
Completed "fxm removal". It's one of the object managers in RPCS3 designed to replace global variables. Its main disadvantage was the use of global mutex and also forced use of refcounted pointers. Another disadvantage was its complex and misleading API. The purpose of such object managers was to reset its global state automatically after emulation restart in a manner which is hard to misuse for the programmer. The replacement, which I designed recently (it resides under g_fxo name) is much simpler and provides an object that "just exists" without any synchronization overhead.
Enabled some optimizations in endianness handling library (it's called se_t template in the code, or be_t for "big endian"). Compilers are dumb and don't always generate optimal code in some cases. PS3 uses big endian byte order, when x86 machines use little endian Whenever integers are read from or written to PS3 memory, emulator should swap bytes. In some cases, swapping can be omitted, like zeroes are remain zeroes after swapping.
Minor SPU recompiler optimization: Split ubertrampoline by first instruction bits. Although it didn't do much for performance, it worked as an alternative workaround for older out of memory errors. When I implemented SPU PIC at first, I made it generate one giant binary searcher function (which I call an ubertrampoline) to determine which SPU program we must execute. This naïve approach led to out of memory issues (reaching artificial 1 GiB limit) because of exponential memory usage in these "ubertrampolines" due to regeneration after every new module. New split approach makes this situation much harder to reach.
Restored GDB support code and add Unix socket support for it. GDB server used to be disabled by default under WITH_GDB switch, and it led to its code being unsupported.
Fixed few old bugs on TSX path. https://github.com/RPCS3/rpcs3/pull/6745https://github.com/RPCS3/rpcs3/pull/6759
Long path support on Windows. On PS3, max path length is about 1023 characters, when native WinAPI functions usually expect it no more than 260. They do, however, support longer paths via a weird \\?\ prefix. It wasn't a completely flawless transition, since it introduced regressions at first, but now it looks like it's in better shape.
Implemented internal SPU profiler. It shows which SPU modules occupy the most CPU time, and also profiles ubertrampolines and verification subroutines, which are used to determine running programs.
In SPU LLVM, used Linux target triple on all platforms to fix old SPU PIC performance regression. It's a weird thing that could be worth a separate post on its own.
Improved collision handling logic in waitable atomics. It used to be horrible in pessimistic case, now it's better. However, it won't affect performance in most cases.
Workaround for vcruntime140_1.dll not found bug. There were too many people being unable to update their runtime or downloading weird .dlls from the internet, so I decided to fix this dependency by using vcruntime140.dll.
Updated LLVM (rebased on newest version). I also used azure pipelines to build LLVM libraries instead of Travis/Appveyor, because it needs more than 1 hour, and azure pipelines allow 6 hours.
Pushed "atomic2", internal API with special "fat" atomics which support some sort of software transaction memory, allowing to update 2 or more atomics at the same time, and also use TSX to accelerate it when available. Currently this functionality is not used anywhere.
cellSysCache virtualization. Allows multiple games to keep their caches simultaneously (not visibly for each other), possibly reducing their startup times at the cost of some space. That's effectively restoring the old behavior, which was removed at first for the sake of accuracy.
Thank you for the support.