mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Debugger: Optimize cpu_thread::dump_regs()
Reuse string buffer. Copies and reallocations are expensive with such large strings.
This commit is contained in:
parent
794cbd8708
commit
5e01ffdfd8
12 changed files with 35 additions and 41 deletions
|
|
@ -161,8 +161,16 @@ void RSXDisAsm::Write(std::string_view str, s32 count, bool is_non_inc, u32 id)
|
|||
{
|
||||
case cpu_disasm_mode::interpreter:
|
||||
{
|
||||
last_opcode = count >= 0 ? fmt::format("[%08x] (%s%u)", dump_pc, is_non_inc ? "+" : "", count) :
|
||||
fmt::format("[%08x] (x)", dump_pc);
|
||||
last_opcode.clear();
|
||||
|
||||
if (count >= 0)
|
||||
{
|
||||
fmt::append(last_opcode, "[%08x] (%s%u)", dump_pc, is_non_inc ? "+" : "", count);
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt::append(last_opcode, "[%08x] (x)", dump_pc);
|
||||
}
|
||||
|
||||
auto& res = last_opcode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue