mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
Kernel: Make syscall counters and page fault counters per-thread
Now that we show individual threads in SystemMonitor and "top", it's also very nice to have individual counters for the threads. :^)
This commit is contained in:
parent
712ae73581
commit
5b8cf2ee23
Notes:
sideshowbarker
2024-07-19 11:03:10 +09:00
Author: https://github.com/awesomekling
Commit: 5b8cf2ee23
9 changed files with 38 additions and 38 deletions
|
@ -689,10 +689,6 @@ Optional<KBuffer> procfs$all(InodeIdentifier)
|
|||
process_object.add("amount_virtual", (u32)process.amount_virtual());
|
||||
process_object.add("amount_resident", (u32)process.amount_resident());
|
||||
process_object.add("amount_shared", (u32)process.amount_shared());
|
||||
process_object.add("syscall_count", process.syscall_count());
|
||||
process_object.add("inode_faults", process.inode_faults());
|
||||
process_object.add("zero_faults", process.zero_faults());
|
||||
process_object.add("cow_faults", process.cow_faults());
|
||||
process_object.add("icon_id", process.icon_id());
|
||||
auto thread_array = process_object.add_array("threads");
|
||||
process.for_each_thread([&](const Thread& thread) {
|
||||
|
@ -702,6 +698,10 @@ Optional<KBuffer> procfs$all(InodeIdentifier)
|
|||
thread_object.add("ticks", thread.ticks());
|
||||
thread_object.add("state", thread.state_string());
|
||||
thread_object.add("priority", to_string(thread.priority()));
|
||||
thread_object.add("syscall_count", thread.syscall_count());
|
||||
thread_object.add("inode_faults", thread.inode_faults());
|
||||
thread_object.add("zero_faults", thread.zero_faults());
|
||||
thread_object.add("cow_faults", thread.cow_faults());
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue