Nekotekina
2212a131ef
Fix some -Weffc++ warnings (part 1)
2021-03-31 11:27:09 +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
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
Eladash
0652870204
New RSX Debugger
2021-01-28 17:40:26 +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
e9f7c100a0
CPU: update suspend interface (dummy)
2020-11-18 19:15:56 +03:00
Nekotekina
bc61835d97
CPU: use unsigned (u8) priority in suspend_all
2020-11-09 22:57:36 +03:00
Nekotekina
86fc842c89
TSX: new fallback method (time-based)
...
Basically, using timestamp counter.
Rewritten vm::reservation_op with the same principle.
Rewritten another transaction helper.
Add two new settings for configuring fallbacks.
Two limits are specified in nanoseconds (first and second).
Fix PUTLLC reload logic (prevent reusing garbage).
2020-10-31 15:34:14 +03:00
Nekotekina
150e18539c
Allow cpu_thread& arg passed to the syscalls
...
Minor cleanup. cpu_mem(), cpu_unmem() removed.
2020-10-30 17:03:32 +03:00
Nekotekina
0da24f21d6
CPU: improve cpu_thread::suspend_all for cache efficiency (TSX)
...
Add prefetch hint list parameter.
Workloads may be executed by another thread on another CPU core.
It means they may benefit from directly prefetching the data as hinted.
Also implement mov_rdata_nt, for "streaming" data from such workloads.
2020-10-30 05:22:09 +03:00
Nekotekina
130a0ef20e
Implement cpu_flag::temp flag
...
Accompanies wait flag, indicating that it was set in limited conditions.
Such condition don't allow thread to terminate after its removal.
2020-10-25 21:48:20 +03:00
Nekotekina
adf50b7c4b
Implement cpu_thread::if_suspended
...
Use it for opportunistic guaranteed GETLLAR execution (TSX-FA).
2020-10-18 20:10:48 +03:00
Nekotekina
f5c575961f
Implement priorities for cpu_thread::suspend_all tasks
...
Give PUTLLUC increased priority.
2020-10-18 20:10:48 +03:00
Nekotekina
40558e7ac1
Use std::invoke in cpu_thread::suspend_all
2020-10-14 02:53:58 +03:00
Nekotekina
f2d2a6b605
JIT cleanup for PPU LLVM
...
Remove MemoryManager3 as unnecessary.
Rewrite MemoryManager1 to use its own 512M reservations.
Disabled unwind info registration on all platforms.
Use 64-bit executable pointers under vm::g_exec_addr area.
Stop relying on deploying PPU LLVM objects in first 2G of address space.
Implement jit_module_manager, protect its data with mutex.
2020-10-11 17:22:28 +03:00
Nekotekina
050c3e1d6b
Rewrite cpu_thread::suspend_all
...
Now it's a function of higher order.
Make only one thread do the hard work of thread pausing.
2020-10-10 13:58:48 +03:00
Nekotekina
6d83c9cc0e
PPU: remove ppu_stcx_tx
...
Very small transaction, benefit questionable.
2020-10-10 13:58:48 +03:00
Nekotekina
346a1d4433
vm: rewrite reservation bits
...
Implement classic unique/shared locking concept.
Implement vm::reservation_light_op.
2020-10-10 13:58:48 +03:00
Eladash
82068cf802
SPU: Fix spu_thread::cpu_stop() missed executions ( #8656 )
2020-07-30 10:07:18 +01:00
Eladash
dc25a3fa2a
PPU debugger: Show stack address of each function
2020-07-06 18:58:16 +02:00
Nick Renieris
1231274e0f
CPUThread: Split dump() info to separate methods
2020-04-03 01:36:35 +01:00
Nekotekina
65eeee0f4c
Remove cancerous lf_value<>
...
Replace thread names (generic, PPU, SPU) with new shared pointers.
Devirtualize cpu_thread::get_name (used in single case).
2020-02-28 18:54:46 +03:00
Nekotekina
b59bb16fad
Threads: removed outdated on_abort detection deemed unnecessary
...
May cause regressions.
2020-02-25 15:48:25 +03:00
Nekotekina
9ac6ef6494
SPU: cleanup former OOM handling
...
Remove cpu_flag::jit_return.
It's obsolete now, and worked only in SPU ASMJIT anyway.
2019-10-26 21:24:12 +03:00
Nekotekina
c69fe0f664
SPU Profiler preview
...
Add option "SPU Profiler" (disabled by default).
Works only with SPU recompilers.
Results are flushed on pausing.
2019-10-15 17:42:57 +03:00
Nekotekina
c7c12941bc
Fix wrong comments in CPUThread.h
...
It's not an upcast.
2019-09-28 15:39:50 +03:00
Nekotekina
223319dd2e
Abort named_thread in cpu_thread::stop_all
2019-09-13 15:53:38 +03:00
Nekotekina
2882220cbd
Implement cpu_thread::stop_all()
2019-08-22 02:13:39 +03:00
Nekotekina
090c71aa7c
TSX: Improve cpu_thread::suspend_all implementation
...
Implement low_lock and vip_lock (for shared_mutex).
Try to simplify suspend_all implementation with updated shared_mutex.
2019-07-24 17:25:52 +03:00
Eladash
537d3f2548
Log last function on debug pause or exception, dump cpu_thread state on access violation
2019-07-10 17:35:39 +03:00
Nekotekina
5d45a3e47d
Implement cpu_thread::suspend_all
...
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
Nekotekina
3794f65bb6
Add cpu_flag::jit_return
2019-03-23 02:43:41 +03:00
Nekotekina
1b37e775be
Migration to named_thread<>
...
Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
2018-10-19 22:22:35 +03:00
Nekotekina
306f95a9ae
New named_thread template (preview)
...
Old class named_thread renamed to old_thread
It's too hard to move in a single commit
2018-09-27 14:04:16 +03:00
Nekotekina
8abe6489ed
Mega-cleanup for atomic_t<> and named bit-sets bs_t<>
...
Remove "atomic operator" classes
Remove test, test_and_set, test_and_reset, test_and_complement global functions
Simplify atomic_t<> with constexpr if, remove some garbage
Redesign bs_t<> to use class, mark its methods constexpr
Implement atomic_bs_t<> for optimizations
Remove unused __bitwise_ops concept (should be in other header anyway)
Bitsets can now be tested via safe bool conversion
2018-09-03 21:40:36 +03:00
Nekotekina
d392379c7a
Use vm::passive_lock for SPU threads
2018-04-06 15:47:00 +03:00
Nekotekina
6561ddae41
PPU LLVM: multithread compilation
2017-06-24 19:12:19 +03:00
kd-11
df7b466656
spu: Speed hacks - Do not starve PPU threads
...
optionally hint to the OS scheduler to give less attention to SPUs
ui: Add speed 'hacks' as configurable options
2017-05-10 21:50:14 +03:00
Nekotekina
4739eb3601
Reservation fix
2017-03-11 15:48:43 +03:00
Nekotekina
9000407a77
cpu_thread::test_state added
...
lv2_obj::sleep adjustment
synchronization fixes
2017-02-22 13:23:21 +03:00
Nekotekina
598c90f376
PPU thread scheduler
2017-02-13 22:26:11 +03:00
Nekotekina
257b9a2015
Debugger fix
...
Crash fixes
GUI fixes
Debug enhancements
2017-02-10 16:33:22 +03:00
Nekotekina
591a6c8671
IdManager improved
2017-01-25 23:29:36 +03:00
Nekotekina
05fb57baff
VERIFY macro removed
2016-08-15 03:13:31 +03:00
Nekotekina
5e0489dcc0
cpu_init removed
2016-08-14 18:07:34 +03:00
Nekotekina
bdeccd889f
cpu_type removed, system_type added
...
cpu_state -> cpu_flag
vm::stack_allocator template improved
ppu_cmd type changed to enum, cmd64 type added
2016-08-09 17:14:41 +03:00
Nekotekina
46735d6b3d
New bitsets (experimental)
2016-08-08 16:29:37 +03:00