mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Everywhere: Make tracking cpu usage independent from system ticks
This switches tracking CPU usage to more accurately measure time in user and kernel land using either the TSC or another time source. This will also come in handy when implementing a tickless kernel mode.
This commit is contained in:
parent
7e77a2ec40
commit
a635ff4e60
13 changed files with 174 additions and 85 deletions
|
@ -15,8 +15,8 @@ namespace Core {
|
|||
struct ThreadStatistics {
|
||||
pid_t tid;
|
||||
unsigned times_scheduled;
|
||||
unsigned ticks_user;
|
||||
unsigned ticks_kernel;
|
||||
u64 time_user;
|
||||
u64 time_kernel;
|
||||
unsigned syscall_count;
|
||||
unsigned inode_faults;
|
||||
unsigned zero_faults;
|
||||
|
@ -66,8 +66,8 @@ struct ProcessStatistics {
|
|||
|
||||
struct AllProcessesStatistics {
|
||||
Vector<ProcessStatistics> processes;
|
||||
u64 total_ticks_scheduled;
|
||||
u64 total_ticks_scheduled_kernel;
|
||||
u64 total_time_scheduled;
|
||||
u64 total_time_scheduled_kernel;
|
||||
};
|
||||
|
||||
class ProcessStatisticsReader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue