Commit graph

251 commits

Author SHA1 Message Date
Megamouse c7e5a62909 Add missing cpu_flag formatting 2021-10-05 20:16:11 +02:00
Ani df96be199b config: Remove Lower SPU Priority setting 2021-09-26 00:29:21 +01:00
Eladash ddec5d6908 CPUThread: Prevent recursive check_state calls 2021-09-17 14:02:22 +03:00
Eladash 975aae1d13 SPU MFC: Implement MFC commands execution shuffling 2021-09-17 11:38:10 +03:00
Nekotekina 286e154d05 SPU Profiler: adjust accumulation logic
Don't append trampoline time to verification time.
2021-08-01 09:59:00 +03:00
Nekotekina 2f6db5802f Fix CPU Profiler regression 2021-07-30 09:21:11 +03:00
Eladash 0aed00a758
Improve thread aborting mechanism (#10490)
Call pseudo-virtual operator=(thread_state) of thread context.
2021-06-27 11:43:48 +03:00
Eladash 76bf720adf Improve emulation stopping speed
Split phases of signalling threads and joining them.
2021-06-08 18:26:14 +03:00
Eladash 6ff9aab2ca Fix cpu_thread::check_state() cpu_flag::temp support 2021-05-28 20:25:16 +03:00
Eladash 5f47730fc0 Fix reservations handling in logs
Remove reservation cb.
2021-05-28 20:25:16 +03:00
Nekotekina 2491aad6f2 types.hpp: implement min_v<>, max_v<>, SignedInt, UnsignedInt, FPInt concepts
Restrict smax to only work with signed values for consistency.
Cleanup <climits> includes.
Cleanup <limits> includes.
2021-05-23 19:43:51 +03:00
Eladash 94e2f464e3 CPU Profiler: weak_ptr -> shared_ptr 2021-05-15 00:31:14 +03:00
Nekotekina 9d4fcbf946 bs_t<>: fix/cleanup some operators 2021-04-17 15:54:33 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina 2212a131ef Fix some -Weffc++ warnings (part 1) 2021-03-31 11:27:09 +03:00
Eladash dea1d01de2 Fix Emulator::Stop race with IDM
Newly created threads' state could have not been flagged with exit.
2021-03-30 10:21:54 +03:00
Eladash d51bb8b1cc Fix Emulator::Pause race with IDM 2021-03-30 10:21:54 +03:00
xddxd 9d895e6b15 Scheduler overhaul 2021-03-26 00:29:44 +03:00
Nekotekina 2decf1ecda Rename and move g_tls_current_cpu_thread inside cpu_thread
Don't declare extern inside get_current_cpu_thread().
Possible workaround for gcc-11.
2021-03-17 23:49:48 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina d788b12a8e fixed_typemap.hpp: reduce indirection
Backported some changes from auto_typemap.hpp
Implemented methods init(), reset(), clear()
Disabled recreation support.
2021-03-02 16:08:14 +03:00
Eladash 96400234a8 Remove cpu_thread destructor 2021-02-22 12:47:45 +03:00
Eladash eb0d006168
Fix most of "[x] thread is too sleepy" at Emu.Stop() (#9813)
* Fixes some thread sleep/wait calls
2021-02-21 16:43:02 +03:00
Eladash 20eb4352fb
debugger: Fix single stepping (#9793) 2021-02-19 14:53:09 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina 390b192f0a TSX: workaround for check_state freezes 2021-02-01 19:14:24 +03:00
Eladash 82c86ed2f7 Implement standalone OVL (overlay) loading mode
* Allow to load OVL alone.
* Add error checks in ppu_load_exec(), do not crash on error.
* Fix crash on exit from standalone PRX mode, allow kernel explorer to work with it as well for the added OVL mode.
2021-01-31 15:47:05 +03:00
Eladash a742501a4f Do not account RSX for TSX pauses 2021-01-29 10:31:15 +03:00
Eladash 0652870204 New RSX Debugger 2021-01-28 17:40:26 +03:00
Nekotekina 34274ec391 Purge unused typeid() invocations 2021-01-28 10:23:29 +03:00
Eladash dbecf0fa50 Introducing RSX debugger entry (main debugger) 2021-01-19 22:55:12 +03:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Nekotekina bd269bccaf types.hpp: remove intrinsic includes
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Nekotekina e39348ad96 Make lf_queue<> compatible with atomic_wait 2020-12-15 19:19:36 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Eladash 427cf91447 Debugger: rewrite GetPc() 2020-12-06 15:32:13 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina 32f39fec1c Make cpu_counter::remove() async
Remove both mutex and assertion from it.
2020-12-01 10:18:41 +03:00
Nekotekina 43952e18e2 Implement prefetch_write() and prefetch_exec() wrappers
Do some refactoring to prefetch_read() in util/asm.hpp as well.
Make all these function constexpr because they are no-ops.
2020-11-24 12:31:11 +03:00
Nekotekina f85c8584b0 Attempt to fix #9316 2020-11-22 12:57:50 +03:00
Nekotekina 292af1e4cd CPU: use u128 in bit counter
Apparently, u64 was not enough.
2020-11-19 16:05:08 +03:00
Nekotekina 6d37bc62a5 CPU: remove cpu_counter from g_fxo
Convert it to a namespace, simplify add/remove functions.
Don't add() threads just creates, they are trapped in check_state() anyway.
Don't add() threads which are leaving check_state() because stopped.
2020-11-19 09:46:22 +03:00
Nekotekina e9f7c100a0 CPU: update suspend interface (dummy) 2020-11-18 19:15:56 +03:00
Nekotekina 190676c982 CPU: Fix g_suspend_counter waiting logic 2020-11-18 14:38:01 +03:00
Nekotekina badb3dc2dd atomic.cpp/threads: remove old wait callback
Add new wait callback which simply collects statistics.
Shift workarounds towards actual problem detection.
2020-11-14 18:16:27 +03:00
Nekotekina 5b69eda39a Fix suspend_all bug (TSX, TSX-FA)
Could cause freezes.
2020-11-14 10:56:05 +03:00
Nekotekina ab365fe494 Fixed thread pool a bit
Use 128-bit allocator instead of queue.
When pool is full (128), threads just terminate as before.
2020-11-13 13:32:44 +03:00
Nekotekina 67785a918c Implement simple thread pool 2020-11-13 03:32:24 +03:00