1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

Kernel+lsirq: Track per-CPU IRQ handler call counts

Each GenericInterruptHandler now tracks the number of calls that each
CPU has serviced.

This takes care of a FIXME in the /sys/kernel/interrupts generator.

Also, the lsirq command line tool now displays per-CPU call counts.
This commit is contained in:
Andreas Kling 2022-11-18 22:07:57 +01:00
parent 94b514b981
commit fb00d3ed25
4 changed files with 33 additions and 9 deletions

View file

@ -67,9 +67,14 @@ void GenericInterruptHandler::change_interrupt_number(u8 number)
register_generic_interrupt_handler(InterruptManagement::acquire_mapped_interrupt_number(interrupt_number()), *this);
}
Span<u32 const> GenericInterruptHandler::per_cpu_call_counts() const
{
return m_per_cpu_call_counts.span().slice(0, Processor::count());
}
void GenericInterruptHandler::increment_call_count()
{
++m_call_count;
++m_per_cpu_call_counts[Processor::current_id()];
}
}