函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ll in basic accounting fields

函数原型:void bacct_add_tsk(struct user_namespace *user_ns, struct pid_namespace *pid_ns, struct taskstats *stats, struct task_struct *tsk)

返回类型:void

参数:

类型参数名称
struct user_namespace *user_ns
struct pid_namespace *pid_ns
struct taskstats *stats
struct task_struct *tsk
28  BUILD_BUG_ON - break compile if a condition is true(should be >= TASK_COMM_LEN* in linux/sched.h < Task command name length: )
31  delta等于ktime_get_ns()减进程创建时间戳
33  do_div() is NOT a C function(delta, NSEC_PER_USEC)
34  ac_etime等于delta
36  do_div() is NOT a C function(delta, USEC_PER_SEC)
37  Begin time [sec since 1970] 等于These interfaces are all based on the old timespec type* and should get replaced with the timespec64 based versions* over time so we can remove the file here.delta
38  如果thread_group_leader(tsk)则
39  Exit status 等于进程退出时发出的标号
40  如果任务标志按位与已调度未运行 Record flags 或等于... executed fork, but did not exec
43  如果任务标志按位与使用超级用户权限 Record flags 或等于... used super-user privileges
45  如果任务标志按位与Dumped core Record flags 或等于... dumped core
47  如果任务标志按位与Killed by a signal Record flags 或等于... was killed by a signal
49  task_nice 等于返回给定任务的值
50  ac_sched等于任务调度策略
51  Process ID 等于task_pid_nr_ns(tsk, pid_ns)
52  _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
53  tcred等于__task_cred - Access a task's objective credentials*@task: The task to query* Access the objective credentials of a task. The caller must hold the RCU* readlock.* The result of this function should not be passed directly to get_cred();(tsk)
54  ac_uid等于m_kuid_munged - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid.
55  Group ID 等于m_kgid_munged - Create a gid from a kgid user-namespace pair.*@targ: The user namespace we want a gid in.*@kgid: The kernel internal gid to start with.* Map @kgid into the user-namespace specified by @targ and* return the resulting gid.
56  Parent process ID 等于如果pid_alive - check that a task structure is not stale*@p: Task structure to be checked.* Test if a process is not yet dead (at most zombie state)* If pid_alive fails, then pointers within the task structure* can be stale and must not be dereferenced.task_tgid_nr_ns(cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(真正的父进程), pid_ns)否则0
58  _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()
60  task_cputime(tsk, & utime, & stime)
61  User CPU time [usec] 等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
62  SYstem CPU time [usec] 等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
64  task_cputime_scaled(tsk, & utimescaled, & stimescaled)
65  utime scaled on frequency etc 等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
66  stime scaled on frequency etc 等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
68  Minor Page Fault Count 等于换页信息
69  Major Page Fault Count 等于换页信息
71  strncpy( Command name , 是否使用FPU, Command name 的长度)
调用者
名称描述
fill_stats