From 8a3973e46941b6a8c88a49594364a04ee4b1d84e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 16 Jul 2025 20:48:35 -0400 Subject: kernel: accnt: Keep track of per-cpu stats Signed-off-by: Ian Moffett --- sys/include/arch/amd64/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/include/arch') diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index a5f09fb..a047cef 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -53,6 +54,7 @@ struct cpu_info { size_t lapic_tmr_freq; uint8_t irq_mask; vaddr_t shootdown_va; + struct sched_cpu stat; struct tss_entry *tss; struct proc *curtd; struct spinlock lock; @@ -67,6 +69,8 @@ void cpu_enable_smep(void); void cpu_disable_smep(void); struct cpu_info *cpu_get(uint32_t index); +struct sched_cpu *cpu_get_stat(uint32_t cpu_index); + uint32_t cpu_count(void); void cpu_shootdown_tlb(vaddr_t va); -- cgit v1.2.3