mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel: Print scheduler state to the display console
This commit is contained in:
parent
20743e8aed
commit
99eab4667a
3 changed files with 5 additions and 2 deletions
|
@ -35,6 +35,7 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
|
|||
|
||||
if (m_modifiers == (Mod_Alt | Mod_Shift) && byte == 0x58) {
|
||||
// Alt+Shift+F12 pressed, dump some kernel state to the debug console.
|
||||
ConsoleManagement::the().switch_to_debug();
|
||||
Scheduler::dump_scheduler_state();
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ void dump_thread_list()
|
|||
Thread::for_each([&](Thread& thread) {
|
||||
switch (thread.state()) {
|
||||
case Thread::Dying:
|
||||
dbgln(" {:14} {:30} @ {:04x}:{:08x} Finalizable: {}, (nsched: {})",
|
||||
dmesgln(" {:14} {:30} @ {:04x}:{:08x} Finalizable: {}, (nsched: {})",
|
||||
thread.state_string(),
|
||||
thread,
|
||||
get_cs(thread),
|
||||
|
@ -596,7 +596,7 @@ void dump_thread_list()
|
|||
thread.times_scheduled());
|
||||
break;
|
||||
default:
|
||||
dbgln(" {:14} Pr:{:2} {:30} @ {:04x}:{:08x} (nsched: {})",
|
||||
dmesgln(" {:14} Pr:{:2} {:30} @ {:04x}:{:08x} (nsched: {})",
|
||||
thread.state_string(),
|
||||
thread.priority(),
|
||||
thread,
|
||||
|
|
|
@ -26,6 +26,8 @@ public:
|
|||
void switch_to(unsigned);
|
||||
void initialize();
|
||||
|
||||
void switch_to_debug() { switch_to(1); }
|
||||
|
||||
NonnullRefPtr<VirtualConsole> first_tty() const { return m_consoles[0]; }
|
||||
NonnullRefPtr<VirtualConsole> debug_tty() const { return m_consoles[1]; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue