PPU: Add loop logging in STWCX/STDCX

This commit is contained in:
Nekotekina 2020-10-13 11:05:49 +03:00
parent 17f805ae64
commit 7a76fb1469
1 changed files with 6 additions and 1 deletions

View File

@ -1648,7 +1648,7 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
// Aligned 8-byte reservations will be used here
addr &= -8;
while (true)
for (u64 count = 0;; count++)
{
auto [_old, _ok] = res.fetch_op([&](u64& r)
{
@ -1669,6 +1669,11 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
if (_ok)
{
if (count >= 20)
{
ppu_log.notice("%s took too long (%u):", sizeof(T) == 4 ? "STWCX" : "STDCX", count);
}
break;
}