mirror of
https://github.com/RGBCube/serenity
synced 2025-07-17 11:47:37 +00:00
Kernel: Reorganize and colorize the scheduler thread list dump
This commit is contained in:
parent
2bf5052608
commit
8ba6e96d05
1 changed files with 8 additions and 5 deletions
|
@ -544,23 +544,26 @@ void dump_thread_list(bool with_stack_traces)
|
||||||
};
|
};
|
||||||
|
|
||||||
Thread::for_each([&](Thread& thread) {
|
Thread::for_each([&](Thread& thread) {
|
||||||
|
auto color = thread.process().is_kernel_process() ? "\x1b[34;1m"sv : "\x1b[33;1m"sv;
|
||||||
switch (thread.state()) {
|
switch (thread.state()) {
|
||||||
case Thread::State::Dying:
|
case Thread::State::Dying:
|
||||||
dmesgln(" {:14} {:30} @ {:04x}:{:08x} Finalizable: {}, (nsched: {})",
|
dmesgln(" {}{:30}\x1b[0m @ {:04x}:{:08x} is {:14} (Finalizable: {}, nsched: {})",
|
||||||
thread.state_string(),
|
color,
|
||||||
thread,
|
thread,
|
||||||
get_cs(thread),
|
get_cs(thread),
|
||||||
get_eip(thread),
|
get_eip(thread),
|
||||||
|
thread.state_string(),
|
||||||
thread.is_finalizable(),
|
thread.is_finalizable(),
|
||||||
thread.times_scheduled());
|
thread.times_scheduled());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dmesgln(" {:14} Pr:{:2} {:30} @ {:04x}:{:08x} (nsched: {})",
|
dmesgln(" {}{:30}\x1b[0m @ {:04x}:{:08x} is {:14} (Pr:{:2}, nsched: {})",
|
||||||
thread.state_string(),
|
color,
|
||||||
thread.priority(),
|
|
||||||
thread,
|
thread,
|
||||||
get_cs(thread),
|
get_cs(thread),
|
||||||
get_eip(thread),
|
get_eip(thread),
|
||||||
|
thread.state_string(),
|
||||||
|
thread.priority(),
|
||||||
thread.times_scheduled());
|
thread.times_scheduled());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue