函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\cputime.c Create Date:2022-07-27 10:38:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Account system CPU time to a process.*@p: the process that the CPU time gets accounted to*@hardirq_offset: the offset to subtract from hardirq_count()*@cputime: the CPU time spent in kernel space since the last update

函数原型:void account_system_time(struct task_struct *p, int hardirq_offset, u64 cputime)

返回类型:void

参数:

类型参数名称
struct task_struct *p
inthardirq_offset
u64cputime
188  如果任务标志按位与I'm a virtual CPU irq_count()减hardirq_offset恒等于0则
189  Account guest CPU time to a process.*@p: the process that the CPU time gets accounted to*@cputime: the CPU time spent in virtual machine since the last update
190  返回
193  如果hardirq_count()减hardirq_offsetindex等于CPUTIME_IRQ
195  否则如果in_serving_softirq()则index等于CPUTIME_SOFTIRQ
197  否则index等于CPUTIME_SYSTEM
200  Account system CPU time to a process and desired cpustat field*@p: the process that the CPU time gets accounted to*@cputime: the CPU time spent in kernel space since the last update*@index: pointer to cpustat field that has to be updated
调用者
名称描述
account_process_tick更新当前进程的内核态和用户态占用率