1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

Kernel: Combine Thread::backtrace() and backtrace_impl() into one

This commit is contained in:
Andreas Kling 2021-02-07 17:58:29 +01:00
parent fd3eca3acc
commit 5c45b0d32d
2 changed files with 3 additions and 10 deletions

View file

@ -393,7 +393,7 @@ void Thread::finalize()
} }
if (m_dump_backtrace_on_finalization) if (m_dump_backtrace_on_finalization)
dbgln("{}", backtrace_impl()); dbgln("{}", backtrace());
kfree_aligned(m_fpu_state); kfree_aligned(m_fpu_state);
drop_thread_count(false); drop_thread_count(false);
@ -959,11 +959,6 @@ void Thread::set_state(State new_state, u8 stop_signal)
} }
} }
String Thread::backtrace()
{
return backtrace_impl();
}
struct RecognizedSymbol { struct RecognizedSymbol {
u32 address; u32 address;
const KernelSymbol* symbol { nullptr }; const KernelSymbol* symbol { nullptr };
@ -992,7 +987,7 @@ static bool symbolicate(const RecognizedSymbol& symbol, const Process& process,
return true; return true;
} }
String Thread::backtrace_impl() String Thread::backtrace()
{ {
Vector<RecognizedSymbol, 128> recognized_symbols; Vector<RecognizedSymbol, 128> recognized_symbols;

View file

@ -126,8 +126,6 @@ public:
Process& process() { return m_process; } Process& process() { return m_process; }
const Process& process() const { return m_process; } const Process& process() const { return m_process; }
String backtrace();
String name() const String name() const
{ {
// Because the name can be changed, we can't return a const // Because the name can be changed, we can't return a const
@ -1231,7 +1229,7 @@ private:
LockMode unlock_process_if_locked(u32&); LockMode unlock_process_if_locked(u32&);
void relock_process(LockMode, u32); void relock_process(LockMode, u32);
String backtrace_impl(); String backtrace();
void reset_fpu_state(); void reset_fpu_state();
mutable RecursiveSpinLock m_lock; mutable RecursiveSpinLock m_lock;