SPU: Fix some stat printing

This commit is contained in:
Nekotekina 2020-11-15 03:26:10 +03:00
parent 333fe9a561
commit dfae7bd073
2 changed files with 18 additions and 5 deletions

View file

@ -2231,7 +2231,7 @@ bool thread_base::join() const
if (warn) 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; return (m_sync & 3) == 3;

View file

@ -2591,6 +2591,13 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
return false; 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) if (ok)
{ {
break; break;
@ -2623,7 +2630,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
{ {
if (count > 20000 && g_cfg.core.perf_report) [[unlikely]] 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; break;
@ -2719,7 +2726,7 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write)
if (g_use_rtm) [[likely]] 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) if (result == 0)
{ {
@ -2732,9 +2739,15 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write)
res += 127; 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<void>(cpu->test_stopped()); static_cast<void>(cpu->test_stopped());