mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
Userland: Replace lsinterrupts with lsirq
Also, lsirq will return more useful data than lsinterrupts did
This commit is contained in:
parent
e2889e665f
commit
259ead5d7a
Notes:
sideshowbarker
2024-07-19 08:52:17 +09:00
Author: https://github.com/supercomputer7
Commit: 259ead5d7a
Pull-request: https://github.com/SerenityOS/serenity/pull/1353
1 changed files with 4 additions and 3 deletions
|
@ -58,17 +58,18 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%-18s %-10s %-13s\n", "Device", "Interrupt", "Call Counter");
|
printf("%4s %-10s\n", " ", "CPU0");
|
||||||
auto file_contents = proc_interrupts->read_all();
|
auto file_contents = proc_interrupts->read_all();
|
||||||
auto json = JsonValue::from_string(file_contents).as_array();
|
auto json = JsonValue::from_string(file_contents).as_array();
|
||||||
json.for_each([](auto& value) {
|
json.for_each([](auto& value) {
|
||||||
auto handler = value.as_object();
|
auto handler = value.as_object();
|
||||||
auto purpose = handler.get("purpose").to_string();
|
auto purpose = handler.get("purpose").to_string();
|
||||||
auto interrupt = handler.get("interrupt_line").to_string();
|
auto interrupt = handler.get("interrupt_line").to_string();
|
||||||
|
auto controller = handler.get("controller").to_string();
|
||||||
auto call_count = handler.get("call_count").to_string();
|
auto call_count = handler.get("call_count").to_string();
|
||||||
|
|
||||||
printf("%-18s %-10s %-13s\n",
|
printf("%4s: %-10s %-10s %-30s\n",
|
||||||
purpose.characters(), interrupt.characters(), call_count.characters());
|
interrupt.characters(), call_count.characters(), controller.characters(), purpose.characters());
|
||||||
});
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
Loading…
Add table
Add a link
Reference in a new issue