mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
Kernel: Show more (b)locking info when dumping the process list
This commit is contained in:
parent
47af812a23
commit
2bf5052608
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/timschumi
Commit: 2bf5052608
Pull-request: https://github.com/SerenityOS/serenity/pull/15019
2 changed files with 49 additions and 5 deletions
|
@ -564,6 +564,17 @@ void dump_thread_list(bool with_stack_traces)
|
|||
thread.times_scheduled());
|
||||
break;
|
||||
}
|
||||
if (thread.state() == Thread::State::Blocked && thread.blocking_mutex()) {
|
||||
dmesgln(" Blocking on Mutex {:#x} ({})", thread.blocking_mutex(), thread.blocking_mutex()->name());
|
||||
}
|
||||
if (thread.state() == Thread::State::Blocked && thread.blocker()) {
|
||||
dmesgln(" Blocking on Blocker {:#x}", thread.blocker());
|
||||
}
|
||||
#if LOCK_DEBUG
|
||||
thread.for_each_held_lock([](auto const& entry) {
|
||||
dmesgln(" Holding lock {:#x} ({}) at {}", entry.lock, entry.lock->name(), entry.lock_location);
|
||||
});
|
||||
#endif
|
||||
if (with_stack_traces) {
|
||||
auto trace_or_error = thread.backtrace();
|
||||
if (!trace_or_error.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue