Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\cputime.c Create Date:2022-07-28 09:37:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
struct task_cputime *times
295  sig = Signal handlers:
309  If same_thread_group(current process, tsk) Then 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  Do
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  When 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) cycle
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()
Caller
NameDescribe
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