mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +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:
parent
94b514b981
commit
fb00d3ed25
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/awesomekling
Commit: fb00d3ed25
Pull-request: https://github.com/SerenityOS/serenity/pull/16113
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/supercomputer7 ✅
4 changed files with 33 additions and 9 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -34,9 +35,12 @@ ErrorOr<void> SysFSInterrupts::try_generate(KBufferBuilder& builder)
|
|||
TRY(obj.add("purpose"sv, handler.purpose()));
|
||||
TRY(obj.add("interrupt_line"sv, handler.interrupt_number()));
|
||||
TRY(obj.add("controller"sv, handler.controller()));
|
||||
TRY(obj.add("cpu_handler"sv, 0)); // FIXME: Determine the responsible CPU for each interrupt handler.
|
||||
TRY(obj.add("device_sharing"sv, (unsigned)handler.sharing_devices_count()));
|
||||
TRY(obj.add("call_count"sv, handler.call_count()));
|
||||
auto per_cpu_call_counts = TRY(obj.add_array("per_cpu_call_counts"sv));
|
||||
for (auto call_count : handler.per_cpu_call_counts()) {
|
||||
TRY(per_cpu_call_counts.add(call_count));
|
||||
}
|
||||
TRY(per_cpu_call_counts.finish());
|
||||
TRY(obj.finish());
|
||||
return {};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue