From 72d1ac22aa18ccb37ff93b6f05681e195fa2a572 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 19 Oct 2020 15:31:10 +0300 Subject: [PATCH] SPU: report too many PUTLLC attempts (TSX) Mirrored to PPU STCX code and PUTLLUC (STORE128). --- rpcs3/Emu/Cell/PPUThread.cpp | 18 +++++++++++++----- rpcs3/Emu/Cell/SPUThread.cpp | 25 ++++++++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index c59e97be3b..7945681f51 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1511,14 +1511,14 @@ const auto ppu_stcx_accurate_tx = build_function_asm 60 && g_cfg.core.perf_report) [[unlikely]] + { + perf_log.warning("STCX: took too long: %u", count); + } + return true; } - default: break; } return cpu_thread::suspend_all(&ppu, [&] diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 111c8b168c..347b67d291 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -562,14 +562,14 @@ const auto spu_putllc_tx = build_function_asmunpause(); return ok; } - case 1: return true; case 0: return false; - default: ASSUME(0); + default: + { + if (count > 60 && g_cfg.core.perf_report) [[unlikely]] + { + perf_log.warning("PUTLLC: took too long: %u", count); + } + + return true; + } } } @@ -2225,6 +2232,10 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write) vm::reservation_acquire(addr, 128) += 127; }); } + else if (result > 60 && g_cfg.core.perf_report) [[unlikely]] + { + perf_log.warning("STORE128: took too long: %u", result); + } if (render) render->unpause(); static_cast(cpu->test_stopped());