mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +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
|
@ -38,10 +38,6 @@ HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all()
|
|||
process.amount_virtual = process_object.get("amount_virtual").to_u32();
|
||||
process.amount_resident = process_object.get("amount_resident").to_u32();
|
||||
process.amount_shared = process_object.get("amount_shared").to_u32();
|
||||
process.syscall_count = process_object.get("syscall_count").to_u32();
|
||||
process.inode_faults = process_object.get("inode_faults").to_u32();
|
||||
process.zero_faults = process_object.get("zero_faults").to_u32();
|
||||
process.cow_faults = process_object.get("cow_faults").to_u32();
|
||||
process.icon_id = process_object.get("icon_id").to_int();
|
||||
|
||||
auto thread_array = process_object.get("threads").as_array();
|
||||
|
@ -53,6 +49,10 @@ HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all()
|
|||
thread.state = thread_object.get("state").to_string();
|
||||
thread.ticks = thread_object.get("ticks").to_u32();
|
||||
thread.priority = thread_object.get("priority").to_string();
|
||||
thread.syscall_count = thread_object.get("syscall_count").to_u32();
|
||||
thread.inode_faults = thread_object.get("inode_faults").to_u32();
|
||||
thread.zero_faults = thread_object.get("zero_faults").to_u32();
|
||||
thread.cow_faults = thread_object.get("cow_faults").to_u32();
|
||||
process.threads.append(move(thread));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue