函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Accumulate raw cputime values of dead tasks (sig->[us]time) and live* tasks (sum on group iteration) belonging to @tsk's group.

函数原型:void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
struct task_cputime *times
295  sig等于信号
309  如果same_thread_group(当前进程, tsk)则Return accounted runtime for the task.* In case the task is currently running, return the runtime plus current's* pending runtime that have not been accounted yet.
312  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
314  nextseq等于0
315  循环
316  seq等于nextseq
317  flags等于read_seqbegin_or_lock_irqsave( & Cumulative resource counters for dead threads in the group,* and for reaped dead child processes forked by this group.* Live threads maintain their own counters and add to these* in __exit_signal, except for the group leader., & seq)
318  utime等于utime
319  stime等于stime
320  sum_exec_runtime等于Cumulative ns of schedule CPU time fo dead threads in the* group, not including a zombie group leader, (This only differs* from jiffies_to_ns(utime + stime) if sched_clock uses something* other than jiffies.)
323  task_cputime(t, & utime, & stime)
324  utime加等于utime
325  stime加等于stime
329  nextseq等于1
330 need_seqretry( & Cumulative resource counters for dead threads in the group,* and for reaped dead child processes forked by this group.* Live threads maintain their own counters and add to these* in __exit_signal, except for the group leader., seq)循环
331  done_seqretry_irqrestore( & Cumulative resource counters for dead threads in the group,* and for reaped dead child processes forked by this group.* Live threads maintain their own counters and add to these* in __exit_signal, except for the group leader., seq, flags)
332  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
调用者
名称描述
thread_group_cputime_adjusted
thread_group_start_cputimehread_group_start_cputime - Start cputime and return a sample*@tsk: Task for which cputime needs to be started*@samples: Storage for time samples* The thread group cputime accouting is avoided when there are no posix* CPU timers armed
__thread_group_cputime