Kernel: Pressing F1 now toggles rendering of CPU loads to the terminal

This can be nice for seeing the performance and problems on the load
balancing algorithm.
This commit is contained in:
2024-07-22 00:43:13 +03:00
parent f8261c60c0
commit 3e0150f847
3 changed files with 46 additions and 0 deletions

View File

@@ -177,6 +177,7 @@ namespace Kernel
static ProcessorID s_bsb_id;
static BAN::Atomic<uint8_t> s_processor_count;
static BAN::Atomic<bool> s_is_smp_enabled;
static BAN::Atomic<bool> s_should_print_cpu_load;
ProcessorID m_id { PROCESSOR_NONE };
@@ -188,6 +189,11 @@ namespace Kernel
Scheduler* m_scheduler { nullptr };
uint64_t m_start_ns { 0 };
uint64_t m_idle_ns { 0 };
uint64_t m_last_update_ns { 0 };
uint64_t m_next_update_ns { 0 };
BAN::Atomic<bool> m_smp_pending_lock { false };
SMPMessage* m_smp_pending { nullptr };