diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index f85f0ef136..ff29628ee9 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -2231,7 +2231,7 @@ bool thread_base::join() const if (warn) { - sig_log.error("Thread [%s] is too sleepy. Took %.3fµs to wake it up!", *m_tname.load(), stamp0 / (utils::get_tsc_freq() / 1000000.)); + sig_log.error(u8"Thread [%s] is too sleepy. Took %.3fµs to wake it up!", *m_tname.load(), stamp0 / (utils::get_tsc_freq() / 1000000.)); } return (m_sync & 3) == 3; diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 8bdc2e9f91..451373959a 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -2591,6 +2591,13 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args) return false; }); + const u64 count2 = __rdtsc() - perf2.get(); + + if (count2 > 20000 && g_cfg.core.perf_report) [[unlikely]] + { + perf_log.warning(u8"PUTLLC: took too long: %.3fµs (%u c) (addr=0x%x) (S)", count2 / (utils::get_tsc_freq() / 1000'000.), count2, addr); + } + if (ok) { break; @@ -2623,7 +2630,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args) { if (count > 20000 && g_cfg.core.perf_report) [[unlikely]] { - perf_log.warning(u8"PUTLLC: took too long: %.3fµs (%u c)", count / (utils::get_tsc_freq() / 1000'000.), count); + perf_log.warning(u8"PUTLLC: took too long: %.3fµs (%u c) (addr = 0x%x)", count / (utils::get_tsc_freq() / 1000'000.), count, addr); } break; @@ -2719,7 +2726,7 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write) if (g_use_rtm) [[likely]] { - const u64 result = spu_putlluc_tx(addr, to_write, cpu); + u64 result = spu_putlluc_tx(addr, to_write, cpu); if (result == 0) { @@ -2732,9 +2739,15 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write) res += 127; }); } - else if (result > 20000 && g_cfg.core.perf_report) [[unlikely]] + + if (!result) { - perf_log.warning(u8"STORE128: took too long: %.3fµs (%u c)", result / (utils::get_tsc_freq() / 1000'000.), result); + result = __rdtsc() - perf0.get(); + } + + if (result > 20000 && g_cfg.core.perf_report) [[unlikely]] + { + perf_log.warning(u8"STORE128: took too long: %.3fµs (%u c) (addr=0x%x)", result / (utils::get_tsc_freq() / 1000'000.), result, addr); } static_cast(cpu->test_stopped());