Commit graph

357 commits

Author SHA1 Message Date
elad335
c97231c3bb SPU: Evaluated Thread-blocked LR messaging 2025-05-08 19:16:50 +03:00
elad335
f17400092d Fixup SPU Interpreters 2025-05-08 11:54:16 +03:00
elad335
730249a887 Embedded SPU Image Search Fixes 2025-04-28 17:44:33 +03:00
RipleyTom
cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
Elad
a8bfa6a16c SPU: Operating system LR memory signals 2024-12-29 21:01:17 +02:00
Elad
575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
Elad Ashkenazi
42ee2463c7 Initialize some spu_thread members 2024-10-14 20:15:14 +03:00
Elad Ashkenazi
cef3ee2d80 SPU: More SPURS limiter fixes 2024-10-14 06:30:05 +03:00
Elad Ashkenazi
8fac136056 SPU: SPURS pause based average task order duration 2024-10-11 17:41:34 +03:00
Elad Ashkenazi
6995467ff6 SPU: SPURS limiter algorithm update 2024-09-24 10:31:37 +03:00
Elad Ashkenazi
11e3aa660e SPU: Remove condition from GETLLAR spin detection 2024-08-25 18:29:30 +03:00
kd-11
1200bbe7cc Address review comments 2024-08-08 13:40:07 +03:00
kd-11
140fddbba8 Initial SPU bringup 2024-08-08 13:40:07 +03:00
Elad Ashkenazi
77e8f9a8ab SPU: Utilize Operating System sleep in detected RCHCNT loop 2024-07-19 14:31:19 +03:00
Elad Ashkenazi
5b973448bf SPU: Better GETLLAR spin detection 2024-06-15 22:41:52 +03:00
Elad Ashkenazi
d5935a37bb SPU: Notify threads if data changed in RdEventStat 2024-06-15 22:41:52 +03:00
Elad Ashkenazi
5693cc9eb3 SPU: smart GETLLAR spin detection 2024-06-15 22:41:52 +03:00
Eladash
f9345c7699 SPU LLVM: PUTLLC 16 Optimization
Also, do not check LR event if already raised in PUTLLC
2024-05-21 16:37:54 +03:00
Eladash
12bfc7d56a SPU/Debugger: Use bitset for breakpoints 2024-04-12 17:13:11 +03:00
Eladash
adc8a360ad SPU LLVM: More compilation threads 2024-03-08 11:40:38 +02:00
Eladash
d699db2d19 SPU Analyser: Detect invalid relative branches 2024-03-07 18:46:51 +02:00
RipleyTom
606a60e901 Accurate frest and frsqest 2024-01-23 12:24:38 +02:00
Megamouse
59c58aa3cf fix some warnings 2023-12-30 19:07:35 +01:00
Eladash
eb407e3b5c SPU/MFC: Add block has to command history 2023-10-24 22:14:12 +03:00
Eladash
37212a632c SPU: Refactor function discovery 2023-08-30 08:45:29 +03:00
Eladash
b5faf5800b SPU LLVM Precompilation
Implement function SPU function discovery in images or random SPU code
2023-08-28 09:03:56 +03:00
Ivan Chikish
d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Eladash
c0280b43f2 PPU/Debugger: View the currently used CR field content in register panel 2023-07-12 13:22:06 +03:00
Elad Ashkenazi
e882d64d8a SPU/PPU Debugger: Add decimal mode to registers panel 2023-07-10 19:06:57 +03:00
Eladash
c21cdb8055 Implement PPU LV2 debug 2023-07-07 16:03:08 +03:00
Eladash
598fe85243 PPU LLVM/RawSPU: Implement MMIO violation elimination pass 2023-07-06 19:46:36 +03:00
Eladash
b861a9c5d0 LV2: Implement set-priority thread requeue 2023-06-02 08:54:46 +03:00
Eladash
e29b81c444 Debug Fixes 2023-05-22 20:04:49 +03:00
Eladash
514ef9a9c5 SPU Executable Code Dumping Tool 2023-05-15 14:11:13 +03:00
Margen67
5bb89328d0 Remove whitespace 2023-02-15 08:58:02 +01:00
Eladash
2759091ede Debugger: Rewind SPU captures
Very basic implementation, can be improved.
2022-09-25 14:31:39 +03:00
Eladash
07f0ba213e SPU: Allow special channel storage in channel busy waiting period
Move code to SPUThread.cpp.
2022-09-07 20:42:23 +03:00
Eladash
48382564d1 SPU: Implement "quintuple" Inbound MBOX storage 2022-09-07 20:42:23 +03:00
Eladash
7698064f5a SPU: Untangle VM lock to avoid deadlocks 2022-09-07 16:05:56 +03:00
Eladash
3f02935844 Add some debugging information 2022-08-30 08:57:33 +02:00
Eladash
ee87fdc869 Fix GETLLAR spin detection 2022-08-22 08:33:22 +03:00
Eladash
bf63a18c5f SPU Add ability to specify percentage of busy waiting 2022-08-21 15:02:01 +03:00
Eladash
28bec8e1bf SPU: Implement custom reservation condition in atomic wait 2022-08-21 15:02:01 +03:00
Eladash
82b1a2bd7a SPU: add the concept of inaccurate reservations
Implement cellSpursRequestIdleSpu
2022-08-21 15:02:01 +03:00
Eladash
6210a8491f SPU: Optimize and enable SPU GETLLAR Polling detection by default
* Make this setting guard all reservation waitings. (renamed)
* Revert atomic list usage: it's more expensive and not needed because it has a timeout and is not optimized for the rest of the waitables.
2022-08-21 15:02:01 +03:00
Eladash
011aabe9ed LV2: Make sys_mutex and sys_lwmutex lock-free, add some busy waiting in sys_mutex_lock 2022-08-07 20:23:54 +03:00
Eladash
73aaff1b29 LV2: allocation-free synchronization syscalls
* Show waiters' ID in kernel explorer.
* Remove deque dependency from sys_sync.h
2022-08-07 20:23:54 +03:00
Eladash
3e51426379 Savestates/SPU: Kill emulation when its safe to save SPU state 2022-07-15 09:30:53 +03:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Eladash
cf0fcf5a2a SPU: Implement execution wake-up delay 2022-06-28 19:54:25 +03:00