mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Memoize and print r3-r6 under Current function in the ppu_thread::dump()
This commit is contained in:
parent
7d33ca7059
commit
e606130262
@ -9,7 +9,7 @@ using ppu_function_t = bool(*)(ppu_thread&);
|
|||||||
const auto old_f = ppu.current_function;\
|
const auto old_f = ppu.current_function;\
|
||||||
if (!old_f) ppu.last_function = #func;\
|
if (!old_f) ppu.last_function = #func;\
|
||||||
ppu.current_function = #func;\
|
ppu.current_function = #func;\
|
||||||
ppu.syscall_r3 = ppu.gpr[3];\
|
std::memcpy(ppu.syscall_args, ppu.gpr + 3, sizeof(ppu.syscall_args)); \
|
||||||
ppu_func_detail::do_call(ppu, func);\
|
ppu_func_detail::do_call(ppu, func);\
|
||||||
ppu.current_function = old_f;\
|
ppu.current_function = old_f;\
|
||||||
ppu.cia += 4;\
|
ppu.cia += 4;\
|
||||||
|
@ -432,7 +432,9 @@ std::string ppu_thread::dump() const
|
|||||||
ret += "Current function: ";
|
ret += "Current function: ";
|
||||||
ret += _func;
|
ret += _func;
|
||||||
ret += '\n';
|
ret += '\n';
|
||||||
fmt::append(ret, "syscall r3: 0x%llx\n", syscall_r3);
|
|
||||||
|
for (u32 i = 3; i <= 6; i++)
|
||||||
|
fmt::append(ret, " ** GPR[%d] = 0x%llx\n", i, syscall_args[i - 3]);
|
||||||
}
|
}
|
||||||
else if (is_paused())
|
else if (is_paused())
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ public:
|
|||||||
cmd64 cmd_get(u32 index) { return cmd_queue[cmd_queue.peek() + index].load(); }
|
cmd64 cmd_get(u32 index) { return cmd_queue[cmd_queue.peek() + index].load(); }
|
||||||
|
|
||||||
u64 start_time{0}; // Sleep start timepoint
|
u64 start_time{0}; // Sleep start timepoint
|
||||||
u64 syscall_r3{0}; // Save r3 before syscalls
|
alignas(64) u64 syscall_args[4]{0}; // Last syscall arguments stored
|
||||||
const char* current_function{}; // Current function name for diagnosis, optimized for speed.
|
const char* current_function{}; // Current function name for diagnosis, optimized for speed.
|
||||||
const char* last_function{}; // Sticky copy of current_function, is not cleared on function return
|
const char* last_function{}; // Sticky copy of current_function, is not cleared on function return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user