Nekotekina
ccd0d2046d
SPU: increase max SPU count
...
According to max SPU TG count.
2020-11-17 15:22:04 +03:00
Nekotekina
0fec99e75b
SPU: absolutely unacceptable hack for SPU LS
...
Make normal threads inaccessible in PS3 memory.
2020-11-17 15:22:04 +03:00
Nekotekina
f8d1f070f5
sys_memory: HORRIBLE HACK for sys_memory_get_page_attributes
2020-11-17 15:22:04 +03:00
Nekotekina
3dd48a24ce
atomic.cpp: remove tiny redundancy
2020-11-17 15:22:04 +03:00
Nekotekina
984e97cbdc
Potential fix for Linux compilation
2020-11-17 15:22:04 +03:00
Eladash
50ea1a12c9
Debugger: Fix scrolling in first registers panel
2020-11-17 09:39:39 +01:00
Eladash
992a372fc7
cellGame fixes
2020-11-17 09:04:35 +01:00
Nekotekina
d789250976
Add thread_ctrl::get_thread_stack
...
Returns addr and size of current thread's stack.
2020-11-17 05:33:46 +03:00
Nekotekina
d7e1cf7dd2
vm: respect initial protection for allocation mapping
...
Unused yet.
2020-11-17 05:33:46 +03:00
Nekotekina
ea5f5aea5f
vm: memory locking rewritten
...
Added vm::lock_sudo method (wrapper for utils::memory_lock).
Put locking outside of vm::g_mutex scope.
Prelock sudo memory for RSX, vm::stack, vm::main.
Prelock sudo memory for shared memory objects.
Don't check for TSX path.
2020-11-16 12:46:15 +03:00
Nekotekina
eaf0bbc108
SPU: don't allocate SPU LS in vm::main
...
Create its own shared memory object.
Use vm::spu to allocate all SPU types.
Use vm::writer_lock for shm::map_critical.
2020-11-16 12:46:15 +03:00
Eladash
b1710bb712
SPU Debugger: Implement float registers view + General debugger fixes ( #9265 )
...
* SPU Debugger: Fix try_get_insert_mask_info
* Debugger: Always update thread state on context's data change
No longer needing to press on thread's instructions for actions to work!
2020-11-15 08:45:28 +03:00
Nekotekina
dfae7bd073
SPU: Fix some stat printing
2020-11-15 04:41:16 +03:00
Nekotekina
333fe9a561
atomic.cpp: fix notification on windows
2020-11-15 04:40:44 +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
3ac819ee70
atomic.cpp: fix waiting on multiple variables
...
Silly bugs are so silly...
2020-11-14 17:25:02 +03:00
Nekotekina
00f877e812
atomic.cpp: fix rare overload scenario
...
If slot allocation fails, increase reference counter in every slot.
This prevents search routine from "losing" some slots.
2020-11-14 13:56:23 +03:00
Nekotekina
1e269751bf
Temporarily disable memory locking if TSX is not used
...
It's a very heavy operation that could cause some problem under mutex lock.
2020-11-14 11:12:58 +03:00
Nekotekina
5b69eda39a
Fix suspend_all bug (TSX, TSX-FA)
...
Could cause freezes.
2020-11-14 10:56:05 +03:00
Nekotekina
71ca413067
Don't add lonely cpu_flag::memory on TSX path (bug)
2020-11-14 09:03:33 +03:00
Nekotekina
0c7f9458c0
Fix thread pool resource management.
...
Make sure no tail call happens (change ret address to a trampoline).
Make sure thread handles don't leak if the pool is full.
2020-11-13 17:17:45 +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
e48f160a29
atomic.cpp: continuation of fixing all-ones masks
...
Also added missing const noexcept.
2020-11-13 12:40:02 +03:00
Nekotekina
cfda4d0ade
atomic.cpp: optimize raw_notify() for unspecified pointer mode
...
Remove unnecessary optimization from cond_alloc().
Optimistic case was absolutely dominating anyway.
Although the whole function is a dirty hack.
Now scanning through all threads is faster.
2020-11-13 07:05:33 +03:00
RipleyTom
debfae06a8
Improve disconnected state handling of dns queries
2020-11-13 07:05:06 +03:00
RipleyTom
e6f2f8ad0d
Add some error checking in sceNp2.cpp
2020-11-13 05:28:00 +03:00
Nekotekina
67785a918c
Implement simple thread pool
2020-11-13 03:32:24 +03:00
Nekotekina
50d80c64fa
Add .gdbinit config file
...
Set to ignore SIGSEGV and SIGPIPE signals.
2020-11-12 23:43:38 +03:00
RipleyTom
1378645413
Adds SIGPIPE to ignored exceptions(unix)
2020-11-12 07:08:59 +03:00
Nekotekina
3888b0429c
atomic.cpp: print some stats on stop
2020-11-12 05:52:22 +03:00
Nekotekina
70761a4ef0
atomic.cpp: fix notification bug from few commits before
...
Make sure forced notification ignores mask comparison.
Also fix masks provided by smaller types to correct ones.
2020-11-12 05:01:44 +03:00
Nekotekina
e37df998e9
atomic.cpp: minor optimization
...
Silly MSVC emits unnecessary initialize-on-first-use code guards.
Didn't check other compiler. But workaround just works anyway.
2020-11-12 03:41:19 +03:00
Nekotekina
c30cdfb3a7
atomic.cpp: merge more atomic variables for simplicity
...
Compress 16-bit ref counter and two 48+64 bit slot allocators.
This allowed to remove some weird unnecessary logic paths.
Adjust hashtable size to keep it the same.
2020-11-12 03:39:05 +03:00
Nekotekina
350b704cd7
atomic.cpp: combine two atomics (ref ctr and wait ptr)
...
Should fit into cache line perfectly.
Also makes ptr check more robust.
2020-11-12 01:06:12 +03:00
Nekotekina
ad013d59f4
atomic.cpp: don't load actual memory on empty mask
...
It's not an optimization. It just allows some tricks safely.
2020-11-11 23:59:09 +03:00
Nekotekina
d391133524
atomic.cpp: minor notification improvement
...
Check mask before locking the reference.
Can help to not bother non-eligible waiters.
2020-11-11 23:51:41 +03:00
Nekotekina
4b823469f7
atomic.cpp: restore notify_all() behaviour
...
Restore batch notification with non-blocking attempts.
2020-11-11 22:43:13 +03:00
Nekotekina
7cd1e767be
atomic.cpp: implement some atomic wait operations.
...
Instead of plain waiting while equal to some value,
it can be something like less, or greater, or even bitcount.
But it's a draft and untested. Hopefully doesn't break anything.
2020-11-11 20:46:37 +03:00
Eladash
829a697c39
Fix vm::check_addr calls in Thread.cpp
2020-11-11 17:40:46 +03:00
Eladash
fefab50e06
Fix vm::range_lock, imporve vm::check_addr
2020-11-11 10:30:09 +03:00
Eladash
6e27ab60ca
Registers Editor: Implement SPU/PPU register value broadcast
2020-11-11 10:27:45 +03:00
Eladash
74274f6d77
Debugger: Improve SPU/PPU vector registers
2020-11-11 10:27:45 +03:00
RipleyTom
908b2703f3
Fix missing controller mapping
2020-11-11 07:16:45 +03:00
Nekotekina
c047ab6147
atomic.cpp: waitable atomics got brutally rewritten
...
Hashtable increased and flatten, tree-alike extensions removed.
Some things simplified, so it can actually decrease perf a bit.
But most platforms shouldn't be affected.
Removed limit of 56 waiters per pointer.
Real limit now is about 65535.
2020-11-11 05:35:27 +03:00
Eladash
52fa69d93d
SPU Debugger: Improve registers panel
2020-11-10 22:51:52 +03:00
RipleyTom
a83df01bfd
rpcn 0.3.5 ( #9227 )
2020-11-10 08:55:49 +00:00
Eladash
b32d989a10
Fix PPU stack contents on allocation
2020-11-10 06:30:35 +03:00
Nekotekina
d1ee7c651f
Make memory locking optional (mlock, VirtualLock).
...
Fix desired locking operation (to fix "sudo" memory).
It was discovered that some systems have outdated configuration.
With too tight limit, it's almost impossible to lock anything in memory.
2020-11-10 06:05:37 +03:00
Nekotekina
dcbe8ef5f4
Import VirtualAlloc2 if available (Win10+)
...
Import MapViewOfFile3 as well.
Unused, this crap is tricky.
2020-11-10 03:04:38 +03:00
Nekotekina
bd5253047b
Improve DYNAMIC_IMPORT
...
Don't call get_proc_address every time if if failed.
Also rename Utilities/dynamic_library.h to util/dyn_lib.hpp
2020-11-10 01:44:31 +03:00