mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12: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
|
@ -1030,10 +1030,8 @@ spu_imm_table_t::spu_imm_table_t()
|
|||
}
|
||||
}
|
||||
|
||||
std::string spu_thread::dump_regs() const
|
||||
void spu_thread::dump_regs(std::string& ret) const
|
||||
{
|
||||
std::string ret;
|
||||
|
||||
const bool floats_only = debugger_float_mode.load();
|
||||
|
||||
SPUDisAsm dis_asm(cpu_disasm_mode::normal, ls);
|
||||
|
@ -1148,8 +1146,6 @@ std::string spu_thread::dump_regs() const
|
|||
fmt::append(ret, "[0x%02x] %08x %08x %08x %08x\n", i * sizeof(data[0])
|
||||
, data[i + 0], data[i + 1], data[i + 2], data[i + 3]);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string spu_thread::dump_callstack() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue