mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Implement perf stat counter for PPU/SPU reservation ops
Adds Emu/perf_meter.hpp header file. Uses RDTSC for speed. Prints stats at exit.
This commit is contained in:
parent
adf50b7c4b
commit
120849c734
10 changed files with 281 additions and 8 deletions
|
|
@ -14,7 +14,7 @@
|
|||
#include "Emu/Cell/lv2/sys_memory.h"
|
||||
#include "Emu/RSX/GSRender.h"
|
||||
#include "Emu/Cell/SPURecompiler.h"
|
||||
#include <atomic>
|
||||
#include "Emu/perf_meter.hpp"
|
||||
#include <thread>
|
||||
#include <deque>
|
||||
|
||||
|
|
@ -391,6 +391,8 @@ namespace vm
|
|||
|
||||
if (addr >= 0x10000)
|
||||
{
|
||||
perf_meter<"SUSPEND"_u64> perf0;
|
||||
|
||||
for (auto lock = g_locks.cbegin(), end = lock + g_cfg.core.ppu_threads; lock != end; lock++)
|
||||
{
|
||||
if (auto ptr = +*lock; ptr && !(ptr->state & cpu_flag::memory))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue