mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
SPU: Cleanup GETLLAR
This commit is contained in:
parent
f228ca7961
commit
dbb02241c5
1 changed files with 16 additions and 14 deletions
|
@ -4583,13 +4583,11 @@ bool spu_thread::process_mfc_cmd()
|
||||||
busy_wait(300);
|
busy_wait(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
last_gtsc = utils::get_tsc();
|
// Reset perf
|
||||||
}
|
perf0.restart();
|
||||||
else
|
|
||||||
{
|
|
||||||
last_gtsc = perf0.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
last_gtsc = perf0.get();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4603,9 +4601,6 @@ bool spu_thread::process_mfc_cmd()
|
||||||
|
|
||||||
get_resrv_waiters_count(addr)--;
|
get_resrv_waiters_count(addr)--;
|
||||||
|
|
||||||
// Reset perf
|
|
||||||
perf0.restart();
|
|
||||||
|
|
||||||
// Quick check if there were reservation changes
|
// Quick check if there were reservation changes
|
||||||
const u64 new_time = res;
|
const u64 new_time = res;
|
||||||
|
|
||||||
|
@ -4630,17 +4625,19 @@ bool spu_thread::process_mfc_cmd()
|
||||||
u8& val = getllar_wait_time[pc / 32].front();
|
u8& val = getllar_wait_time[pc / 32].front();
|
||||||
val = static_cast<u8>(std::min<u32>(val + 1, u8{umax}));
|
val = static_cast<u8>(std::min<u32>(val + 1, u8{umax}));
|
||||||
|
|
||||||
last_gtsc = utils::get_tsc();
|
// Reset perf
|
||||||
|
perf0.restart();
|
||||||
|
last_gtsc = perf0.get();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static atomic_t<u32> g_ctr, g_fail;
|
static atomic_t<u32> g_changed, g_unchanged;
|
||||||
|
|
||||||
if (new_time == this_time && res == this_time)
|
if (new_time == this_time && res == this_time)
|
||||||
{
|
{
|
||||||
spu_log.trace("RTIME unchanged on address 0x%x", addr);
|
spu_log.trace("RTIME unchanged on address 0x%x", addr);
|
||||||
|
|
||||||
g_fail++;
|
g_unchanged++;
|
||||||
|
|
||||||
// Try to forcefully change timestamp in order to notify threads
|
// Try to forcefully change timestamp in order to notify threads
|
||||||
if (get_resrv_waiters_count(addr) && res.compare_and_swap_test(this_time, this_time + 128))
|
if (get_resrv_waiters_count(addr) && res.compare_and_swap_test(this_time, this_time + 128))
|
||||||
|
@ -4650,11 +4647,13 @@ bool spu_thread::process_mfc_cmd()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_ctr++;
|
g_changed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g_ctr + g_fail) % 200 == 0)
|
if ((g_changed + g_unchanged) % 200 == 0)
|
||||||
spu_log.trace("SPU 100WAIT: fail=%d, ok=%d", +g_fail, +g_ctr);
|
{
|
||||||
|
spu_log.trace("SPU GETLLAR wait on RTIME stats: unchanged=%d, changed=%d", +g_unchanged, +g_changed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4670,6 +4669,9 @@ bool spu_thread::process_mfc_cmd()
|
||||||
// We can't, LR needs to be set now
|
// We can't, LR needs to be set now
|
||||||
set_events(SPU_EVENT_LR);
|
set_events(SPU_EVENT_LR);
|
||||||
static_cast<void>(test_stopped());
|
static_cast<void>(test_stopped());
|
||||||
|
|
||||||
|
// Reset perf
|
||||||
|
perf0.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
last_getllar = pc;
|
last_getllar = pc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue