mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +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
|
@ -947,11 +947,11 @@ u32* cpu_thread::get_pc2()
|
|||
|
||||
std::shared_ptr<CPUDisAsm> make_disasm(const cpu_thread* cpu);
|
||||
|
||||
std::string cpu_thread::dump_all() const
|
||||
void cpu_thread::dump_all(std::string& ret) const
|
||||
{
|
||||
std::string ret = dump_misc();
|
||||
ret += dump_misc();
|
||||
ret += '\n';
|
||||
ret += dump_regs();
|
||||
dump_regs(ret);
|
||||
ret += '\n';
|
||||
ret += dump_callstack();
|
||||
ret += '\n';
|
||||
|
@ -972,13 +972,10 @@ std::string cpu_thread::dump_all() const
|
|||
ret += '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string cpu_thread::dump_regs() const
|
||||
void cpu_thread::dump_regs(std::string&) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string cpu_thread::dump_callstack() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue