1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

SPU: print current chunk hash in dump

This commit is contained in:
Nekotekina 2020-03-17 20:10:49 +03:00
parent 20f7544a8a
commit 6a2571d0e1

View File

@ -1014,6 +1014,21 @@ std::string spu_thread::dump() const
std::string ret = cpu_thread::dump();
fmt::append(ret, "\nBlock Weight: %u (Retreats: %u)", block_counter, block_failure);
if (g_cfg.core.spu_prof)
{
// Get short function hash
const u64 name = atomic_storage<u64>::load(block_hash);
fmt::append(ret, "\nCurrent block: %s", fmt::base57(be_t<u64>{name}));
// Print only 7 hash characters out of 11 (which covers roughly 48 bits)
ret.resize(ret.size() - 4);
// Print chunk address from lowest 16 bits
fmt::append(ret, "...chunk-0x%05x", (name & 0xffff) * 4);
}
fmt::append(ret, "\n[%s]", ch_mfc_cmd);
fmt::append(ret, "\nLocal Storage: 0x%08x..0x%08x", offset, offset + 0x3ffff);
fmt::append(ret, "\nTag Mask: 0x%08x", ch_tag_mask);